The syntax +=
is a GNU Make extension that was first introduced in Sun make
in the late 80s. It is not part of the syntax of the POSIX make
standard or the original AT & T make
.
If you use extensions, you end up when switching to a system that does not support them. You either have to redo things (hard) or stick to the original system.
One way to modify the file to work with nmake
is probably:
FILE1 = $(shell) *.c FILE2 = $(shell) *.cpp FILE = $(FILE1) $(FILE2) exec: @echo $(FILE)
Or, given that the shell
macro is not defined, even:
FILE1 = *.c FILE2 = *.cpp FILE = $(FILE1) $(FILE2) exec: @echo $(FILE)
source share