There are two issues with substring replacement
$(ALLOBJ:.@OBJEXT@=.c).
@OBJEXT@ has no effect since macro expansion is not supported by nmake:
https://stackoverflow.com/questions/18374299/how-do-i-substitute-a-string-and-add-a-prefix-or-suffix-in-microsoft-nmakeTherefore it has to be rewritten with string literals, as such:
$(ALLOBJ:.obj=.c)
Fixing all the bugs mentioned in the posts so far, we get:
asm\warnings.time: $(ALLOBJ:.obj=.c)
type NUL > asm\warnings.time
$(MAKE) $(WARNFILES)
But eventhough this string replacement works, we still have cyclic dependencies, for example:
asm\warnings.time -> asm\warnings.c -> asm\warnings.time
The last dependency occurs due to line 237:
asm\warnings.c: asm\warnings.pl asm\warnings.times
and the first dependency due to
asm\warnings.time: $(ALLOBJ:.obj=.c)
Whatever the purpose of this added code to the makefile was, it will not work with nmake, due to the cyclic dependency. So until the original developer fixes it, the best option is to edit the makefile as mentioned in my
third post.