[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Check for the existance of variable.
From: |
PATTON, BILLY \(SBCSI\) |
Subject: |
Check for the existance of variable. |
Date: |
Tue, 11 Apr 2006 06:47:14 -0500 |
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 :)
- Check for the existance of variable.,
PATTON, BILLY \(SBCSI\) <=