[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
looking for help with auto creating rules with eval hierarchically
From: |
PATTON, BILLY \(SBCSI\) |
Subject: |
looking for help with auto creating rules with eval hierarchically |
Date: |
Thu, 16 Mar 2006 07:40:00 -0600 |
I have to create rules , 555 currently with perl, that make use of
lists. Not all lists are the same size.
Here is a sample of 2 of the of the list (currently I have 87, but that
will increase)
PROJECTS := \
lde \
ldm \
ldf \
ldg \
ldw \
lbf \
ldb
BB_lde := \
ld_exp \
ld_bch
BB_ldm := \
ldmrbcomc \
ldmrbc \
ldmrbcomg \
ldmmdc \
ldmcolc \
ldmapc \
ldmmdg \
ldmcomc \
ldmcolg \
ldmapg \
ldmcomg
TOPIC_ldm_ldmrbcomc := \
rfc
As a sample example I created this
proj := lde ldg ldm ldf ldw lbf ldb
.PHONY : all ${proj}
define dummy_template
$(1): ; @echo $(1)
endef
all : ${proj}
$(foreach var,$(proj),$(eval $(call dummy_template,$(var))))
$(filter-out ldb,${proj}) : ldb
This works fine for proj alias PROJECTS
Now looking at each of the PROJECTS I need to create the same thing
$(foreach var for each of the
BB_<proj> But I don't want to hard code all the names. This needs to
be expandable in the future
This will then be further created for the TOPIC_<proj>_<bb>
My first best try
$foreach proj,${PROJECTS},
Will give me the list names
$(addprefix BB_,${PROJECTS})
So would it be something like
$(foreach proj,${PROJECTS} # to capture project name
, $(foreach bb, $(addprefix BB_,${proj})) # name of list BB_<proj>
, $(eval $(call dummy_template, ${bb})) # call define
) # foreach
If this works. Can I put comments as I have above.
If I don't document this VERY well, I'll neveru figure it out 6 months
from now.
- looking for help with auto creating rules with eval hierarchically,
PATTON, BILLY \(SBCSI\) <=