I have the following code:

define build_proj_template
$(1):  $(foreach bb,$(BB_$(patsubst build+%,%,$(1))),$(addsuffix
+$(bb),$(addprefix build+,$(patsubst build+%,%,$(1)))))
        @echo "build_proj_template target : '$1' , dependencies : '$+'"
endef

## build+<proj> : build+<proj>+<bb>
$(foreach proj,$(PROJECTS),$(eval $(call build_proj_template,$(addprefix
build+,$(proj)))))


In a normal hard coded rule

build+ldb : build+ldb+dogs
        @echo "build_proj_template target : '$1' , dependencies : '$+'"

Would print
build_proj_template target : 'build+ldb' , dependencies :
'build+ldb+dogs'

But what I get is:
build_proj_template target : 'build+ldb' , dependencies : ''

The $+ is getting lost in the define statement


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to