I'm looking for something like the Exclude filter for msbuild, but I Want it in a makefile processed by nmake.
Is that possible?
Suppose I have a makefile that defines this macro:
SOURCES=xxx.c yyy.c zzz.c
and I invoke it with nmake OLD=xxx.c NEW=bbb.c
...can I produce, within the makefile, a macro with a value like:
yyy.c zzz.c bbb.c
...basically substituting bbb.c for xxx.c ?
The files can appear in any order.
This would be pretty easy if the string substitution that is possible in nmake macros, allowed for evaluation of macros.
In other words, I can do
sources=xxx.c yyy.c zzz.c
objs=$(sources:.c=.o)
and the value of $(objs) is
xxx.o yyy.o zzz.o
But nmake does not allow a macro for the value of either argument to that substitution. I cannot do this:
new=.o
sources=xxx.c yyy.c zzz.c
objs=$(sources:.c=$(new))