Title | Inconvenient to add new parts on Windows |
Status | closed |
Priority | nice |
Assigned user | Gareth Rees |
Organization | Ravenbrook |
Description | When 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) |
Analysis | We'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 found | inspection |
Evidence | [1] <http://stackoverflow.com/questions/183...d-a-prefix-or-suffix-in-microsoft-nmake > |
Created by | Gareth Rees |
Created on | 2014-03-24 13:34:59 |
Last modified by | Gareth Rees |
Last modified on | 2014-10-20 19:15:58 |
History | 2014-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. |