Paul, my reply seemed a little harsh after reading it. I did not mean to sound that way. You have been VERY helpful. Just getting it through my thick head about the separation of make and shell and expansion.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of PATTON, BILLY (SBCSI) > Sent: Tuesday, April 11, 2006 6:47 AM > To: [email protected] > Subject: Check for the existance of variable. > > > Ok Paul, > commands are shell syntax and make file is for make syntax. I cannot > check for the existence > of a make variable in the commands of a rule. So with that > said I must > check for the existence > of the variable before I create the rule. > > Here's what I have: > $(foreach flow,refresh real_refresh, \ > $(foreach sub,pub shr extra, \ > $(foreach proj,$(PROJECTS),\ > $(foreach bb,$(BB+$(proj)),\ > $(eval $(call > refresh_proj_bb_sub,$(flow),$(proj),$(bb),$(sub))))))) > > The variable I need : proj has 7 values, bb may have 1 to 80 names, > depends on proj > REFRESH+proj+bb+pub > > Steps I would need to create this > 1. create the string > $(call merge,+,$(call uc,$(flow)) $(proj) $(bb) $(sub)) > 2. find the origin of the string > $(origin $(call merge,+,$(call uc,$(flow)) $(proj) $(bb) $(sub)) > 3. find the string "file" > $(findstring file,$(origin $(call merge,+,$(call > uc,$(flow)) $(proj) > $(bb) $(sub)) > 4 do if then > $(if $(findstring file,$(origin $(call merge,+,$(call uc,$(flow)) > $(proj) $(bb) $(sub)) > then do the eval. > > So I believe I would need something like > $(foreach flow,refresh real_refresh, \ > $(foreach sub,pub shr extra, \ > $(foreach proj,$(PROJECTS),\ > $(foreach bb,$(BB+$(proj)),\ > $(if $(findstring file,$(origin $(call > $(merge +,$(call uc,$(flow)) $(proj) $(bb) $(sub))))) > ,$(eval $(call > refresh_proj_bb_sub,$(flow),$(proj),$(bb),$(sub)))))) > missing lots of ) parens :) > > > I'll be testing this, but if you see anything wrong with my > logic please > tell me :) > > > _______________________________________________ > Help-make mailing list > [email protected] > http://lists.gnu.org/mailman/listinfo/help-make > _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
