Makefile, complex targets and dependencies
- From: bp1497@xxxxxxx
- Date: 24 Feb 2006 11:05:27 -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.
When I execute the above I get :
Makefile:24: *** mixed implicit and normal rules. Stop.
.
- Prev by Date: Re: Random sloppy serial reads
- Next by Date: Re: Trolltech QT license question
- Previous by thread: Will GCC-6.0 Warn On Spelling Mistakes In Comments And Function Names?
- Next by thread: AF_UNIX sockets problem - no error but datagram never arrives - 5 attachments
- Index(es):