[Top][All Lists]
[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:32:32 -0600 |
I shortened your foreach statement to
$(foreach proj,$(PROJECTS), $(eval $(call bb_template,$(BB_$(proj)))))
Doesn't this eliminate one foreach loop?
-----Original Message-----
From: John Graham-Cumming [mailto:address@hidden On Behalf Of John
Graham-Cumming
Sent: Thursday, March 16, 2006 8:29 AM
To: PATTON, BILLY (SBCSI)
Cc: address@hidden
Subject: Re: looking for help with auto creating rules with eval
hierarchically
PATTON, BILLY (SBCSI) wrote:
> __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,$(PROJECTS),$(eval $(call proj_template,$(var))))
>
> $(filter-out ldb,${PROJECTS}) : ldb
>
> $(foreac proj,$(PROJECTS),$(foreach bb,$(BB_$(proj)), $(eval $(call
> bb_template,$(bb)))))
>
> #$(foreach proj \
> # , ${PROJECTS} \
> # , $(foreach bb \
> # , $(addprefix BB_ , ${PROJECTS}) \
> # , $(eval $(call bb_template, ${bb})) \
> # ) \
> # )
>
> __END__
1. You copy and pasted my code from a previous mail which contained a
typo: foreac should be foreach
2. You've still got lots of $(addprefix BB_,...) in your Makefile and
that's not doing what you think and needs to be changed as I described
before.
John.
- RE: looking for help with auto creating rules with eval hierarchically, PATTON, BILLY \(SBCSI\), 2006/03/16
- RE: looking for help with auto creating rules with eval hierarchically, PATTON, BILLY \(SBCSI\), 2006/03/16
- RE: looking for help with auto creating rules with eval hierarchically,
PATTON, BILLY \(SBCSI\) <=
- RE: looking for help with auto creating rules with eval hierarchically, PATTON, BILLY \(SBCSI\), 2006/03/16
- RE: looking for help with auto creating rules with eval hierarchically, PATTON, BILLY \(SBCSI\), 2006/03/16