NMAKE does not contain much string processing, except substitution of a substring, and even this cannot perform macro distribution. However, since NMAKE supports the inclusion of makefile, there is an obvious technique that you can use, although its implementation is somewhat complicated.
The idea is to create a temporary makefile that, when included in a recursive call, performs another macro extension where necessary. This can be used to add variable prefixes, suffixes, or delimiters to line lists. Further expansion rounds can also be performed if necessary.
The following snippet illustrates the method. It converts the abcde list to [a];[b];[c];[d];[e] (that is, it adds a prefix, suffix, and separator between elements). The original makefile (the rules that will be executed if NMAKE supports the secondary extension) basically does not change. Finally, NMAKE does not leave temporary files after the entire run.
The only caveat to this is that command line macros are not passed to recursive calls and therefore are not so useful.
source share