Alec Flett wrote:
> 
> As you may have seen in bug 98371, I'm adding REQUIRES support to the
> windows build system. At the moment, the capability is there, and I'm
> doing the last round of cleanups in the makefile.win files all over the
> tree. I expect to have landed all the makefile.win's by friday when the
> tree opens (possibly through a carpool)
> 
> One issue I'm having with the whole system is that I can't figure out
> how to convert the REQUIRES variable from "foo bar baz" into
> "-I$(XPDIST)\include\foo -I$(XPDIST)\include\bar
> -I$(XPDIST)\include\baz" Currently, I'm using perl because I can't
> figure out an internal nmake-specific way of doing this transformation,
> but this slows down the build by probably 5-10%.
> 
> If anyone has any ideas about doing this string transformation in nmake,
> let me know.
> 
> the equivalent in gmake is:
> $(foreach d,$(REQUIRES),-I$(DIST)/include/$d)
> 
> Alec

There is a thing the help file calls "Macro Substitution". The help file says
    To substitute text within a macro, use the following syntax:

    $(macroname:string1=string2)

    When macroname is invoked, each occurrence of string1 in its definition string is 
replaced by
    string2. Macro substitution is case sensitive and is literal; string1 and string2 
cannot invoke
    macros. Substitution does not modify the original definition. You can substitute 
text in any
    predefined macro except $$@.

    No spaces or tabs precede the colon; any after the colon are interpreted as 
literal. If string2 is
    null, all occurrences of string1 are deleted from the macro's definition string.

I never used this feature, but does 
    -I$$(DIST)/include/$(REQUIRES: = $$(DIST)/include/)
produce what you want ?

Reply via email to