help-make
[Top][All Lists]
Advanced

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

RE: looking for help with auto creating rules with eval hierarchically


From: PATTON, BILLY \(SBCSI\)
Subject: RE: looking for help with auto creating rules with eval hierarchically
Date: Thu, 16 Mar 2006 08:03:33 -0600

Here's what I've 'done so far
__BEGIN__
PROJECTS := lde ldg ldm ldf ldw lbf ldb
BB_lde := a
BB_ldg := b c
BB_ldm := d e f
BB_ldf := g h i j
BB_ldw := k l n m o
BB_lbf := p q r s t u
BB_ldb := v w x y z aa ab

.PHONY : all \
         ${PROJECTS} \
         $(addprefix BB_ , ${PROJECTS})

define proj_template
 $(1): $(addprefix BB_ , ${PROJECTS})
        echo $(1)
endef
define bb_template
 $(1):
        echo $(1)
endef

all : ${PROJECTS}

$(foreach var,$(proj),$(eval $(call proj_template,$(var))))

$(filter-out ldb,${proj}) : ldb

$(foreach proj \
   , ${PROJECTS} \
   , $(foreach bb \
       , $(addprefix BB_ , ${PROJECTS}) \
       , $(eval $(call bb_template, ${bb})) \
      ) \
 )

# then there will be a TOPIC_<proj>_<bb>
# then TARGET_<proj>_<bb>_<topic>
__END__


gmake -f x
gmake: Nothing to be done for `all'.




reply via email to

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