The changes in nmake 10 are largely backward compatible with alu3.9. Every effort has been made to insure code changes do not unexpectedly change the documented behavior of nmake features.
The following may impact builds and require changes.
-Kpicflags are obsolete and the
-xcode=pic13flags should be used instead. The probe tool now detects the new flags before the old ones and will typically set probe variable
CC.PIC=-xcode=pic32for the pic flag when using these compilers. If
-Kpicare hard-coded in
CCFLAGSfor building a shared library nmake will not be able to detect the pic flag and may not generate a shared library with the
:LIBRARY:operator or may issue a warning with the
-xcode=pic13pic flags such as Sun Studio.
CC.PICinstead of hard-coding the pic flag. This also provides portability since
CC.PICwill be set correctly for different compilers and platforms. For example:
CCFLAGS = $(CC.PIC)When adding to
CCFLAGSuse the following to delay variable expansion:
CCFLAGS += $$(CC.PIC)
\r\nsequences in makefiles or job action blocks are changed to literal
\n, possibly changing program behavior. These cases are believed to be rare. It is recommended to change such cases to use equivalent escape sequences. Here is a simple example:
$ cat Makefile a= 'y^M z' t : .MAKE print $(a:C|\r|e|:C|\n|f|) $ od -cb Makefile 0000000 a = ' y \r \n z ' \n \n t : . 141 075 040 047 171 015 012 172 047 012 012 164 040 072 040 056 0000020 M A K E \n \t p r i n t $ ( a : 115 101 113 105 012 011 160 162 151 156 164 040 044 050 141 072 0000040 C | \ r | e | : C | \ n | f | ) 103 174 134 162 174 145 174 072 103 174 134 156 174 146 174 051 0000060 \n 040 012 0000062 # Old nmake: $ nmake 'yefz' # New nmake: $ nmake 'yfz'
\r\nsequences in their makefiles.
$ cat Makefile a= 'y$("\x0D") z' t : .MAKE print $(a:C|\r|e|:C|\n|f|) $ nmake 'yefz' $ cat Makefile a= 'y$("\x0D")$("\x0A")z' t : .MAKE print $(a:C|\r|e|:C|\n|f|) $ nmake 'yefz'
MAKELEVELvariable is now incremented in the parent make when setting up the environment for all shell action blocks. In alu3.9
MAKELEVELwas incremented at
.MAKEINITtime in sub-makes. The new approach makes the new value of
MAKELEVELuniformly available throughout sub-make and action block execution. However, it leads to an incompatibility when accessing
MAKELEVELdirectly from shell action blocks. For example, in the shell action of a first level sub-make,
$MAKELEVELused to expand to 0, now it expands to 1.
MAKELEVELvariable in shell action blocks.
MAKELEVELas an nmake variable (e.g.
$(MAKELEVEL)) and not a shell variable (e.g.