I tested the following: all: ; var1=$(subst this,that,this is a, text) $(warning $(var1)) makefile28:3: that is a, text make: `all' is up to date. ----------------------------- Why the result seems OK and expected while "subst" function seems to get 4 arguments?
2011/4/27 Semen Trygubenko <[email protected]> > 2011/4/27 ali hagigat <[email protected]>: > > 8.1 Function Call Syntax > > Commas and unmatched parentheses or braces cannot appear in the text > > of an argument > > written; > > ------------------------------- > > var= this,is a text > > all: ; > > var1=$(subst this,that,$(var)) > > $(warning $(var1)) > > > > makefile28:4: that,is a text > > make: `all' is up to date. > > --------------------------------- > > Why "," was used successfully then? > > Because "," appears in the right hand side of a variable "var" > definition and not in the argument to $(subst ) function. > If you were to write $(subst this,that,this,is a text) "this,is a > text" will be parsed as two arguments to $(subst ) function because > of "," delimiter ... > > HTH > > > -- > Семен > _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
