help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I get the dependencies to print with an echo? From inside a defin


From: PATTON, BILLY \(SBCSI\)
Subject: How do I get the dependencies to print with an echo? From inside a define
Date: Fri, 17 Mar 2006 07:35:10 -0600

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]