> -----Original Message----- > From: Paul Smith [mailto:[EMAIL PROTECTED] On Behalf Of Paul D. Smith > Sent: Friday, April 07, 2006 11:22 AM > To: PATTON, BILLY (SBCSI) > Cc: [email protected] > Subject: Re: What is wrong ? > > > %% "PATTON, BILLY \(SBCSI\)" <[EMAIL PROTECTED]> writes: > > pb> I'm using the gmsl lib to help me with this. > pb> define refresh_proj_bb > pb> $(1)$(sep)$(2)$(sep)$(3) : $(warning $($(call > uc,$(1))$(sep)$(2)$(sep)$(3))) > pb> endef > > pb> $(1) = refresh > pb> $(2) = proj > pb> $(3) = bb > pb> $(sep) = + > > Eh? Don't you mean: > > 1 = refresh > 2 = proj > 3 = bb > sep = +
When I do a $(call refresh_proj_bb,refresh,$(proj),$(bb)) > > ? Also naming these variables "1", "2", and "3" will really > confuse you > when using $(call ...); I strongly urge you to use something else: > > pre = refresh > mid = proj > end = bb > sep = + > > pb> If I do: > pb> $(warning $(call uc,$(1))) > > Then: $(warning $(call uc,$(pre))) > > etc. > > pb> I will print REFRESH as expected > > pb> I have: > pb> $(warning $($(call uc,$(1))$(sep)$(2)$(sep)$(3))) > ^^ ^ > Why do you have the extra $( ... ) here? > > That means you're taking the result of $(call > uc,$(1))$(sep)$(2)$(sep)$(3) > which is 'REFRESH+proj+bb', and using it as the name of a variable and > dereferencing it. That is exactly what I'm trying to do. And I have manually verified that that variable does exist. > > Assuming you have no variable named REFRESH+proj+bb, that > will yield the > empty string. > > pb> I wan it to print : > pb> REFRESH+proj+bb > > Change to: > > $(warning $(call uc,$(1))$(sep)$(2)$(sep)$(3)) > > pb> What is wrong? probably need $$ somewhere :( > > No. You're going nuts-o with the extra variable nuts-o is right :) > referencing!! Only use > it where necessary. You can't just add them all over the place like > extra escape sequences :-). > > -- > -------------------------------------------------------------- > ----------------- > Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: > http://www.gnu.org http://make.paulandlesley.org > "Please remain calm...I may be mad, but I am a > professional." --Mad Scientist > _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
