MPS issue job003713

TitleInconvenient to add new parts on Windows
Assigned userGareth Rees
DescriptionWhen you add a new "part" (a group of files that are compiled together), you have to edit all the platform nmake files (w3i3mv.nmk, w3i6mv.nmk and so on) to add lines of the form:

    PARTOBJ0 = $(PART:<=w3i3mv\hot\)

for each variety and:

    PARTOBJ = $(PARTOBJ0:>=.obj)
AnalysisWe'd like to write:

    PARTOBJ0 = $(PART:<=$(PFM)\$(VARIETY)\)

just once in commpost.nmk, but Nmake doesn't expand macros in the replacement, so this wouldn't work. But this answer on Stack Overflow [1] shows a technique for doing by writing out an intermediate makefile and including it.

The other repeated bit:

    PARTOBJ = $(PARTOBJ0:>=.obj)

could be moved to commpost.nmk as-is.
How foundinspection
Evidence[1] <>
Created byGareth Rees
Created on2014-03-24 13:34:59
Last modified byGareth Rees
Last modified on2014-10-20 19:15:58
History2014-03-24 GDR Created.


Change Effect Date User Description
187299 closed 2014-10-20 19:15:57 Gareth Rees Simplify platform makefiles on Windows, using a temporary makefile to work around nmake's lack of variable expansion in string replacement. This means that when adding a new part you no longer need to edit the platform makefiles, just commpre.nmk and commpost.nmk.