makefile comples targets and dependencies
- From: "billy" <bp1497@xxxxxxx>
- Date: 24 Feb 2006 11:08:40 -0800
I need to have for complex rules and targets, at least I think they are
comples, to avoid copying the same thing over and over.
Here's a sample of what I have and tried.
gmake 3.79 HPUX
__BEGIN__
define stuff
@echo $(1); sleep 10
endef
PROJ := proj1 proj2 proj3 proj4 proj5 proj6 proj7
BB := bb1 bb2 bb3 bb4 bb5 bb6 bb7
all : $(PROJ)
$(filter proj1,$(PROJ)) : proj1
$(PROJ) : $(addprefix %_ , $(BB))
$(call stuff,$@)
# this is line 24 by hitting arrow down
$(addprefix %_ , $(BB)) :
$(call stuff,$@)
__END__
I need every project to depend on <proj>_<bb>
Then <proj>_<bb> to do a call Using this would eliminate from having
to write 49 rules to make sure that every proj has every bb. This will
go even deeper but this will do for the question. I have to provide
entry for many levels and most will be empty commands
When I execute the above I get :
Makefile:24: *** mixed implicit and normal rules. Stop.
.
- Follow-Ups:
- Prev by Date: Re: how to concatenate several fields in comma delimited file.
- Next by Date: Re: "make all" does not make all!
- Previous by thread: how to concatenate several fields in comma delimited file.
- Next by thread: Re: makefile comples targets and dependencies
- Index(es):