[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Calculated Variables as Pre-requisites
From: |
Alister Shipman |
Subject: |
Calculated Variables as Pre-requisites |
Date: |
Fri, 31 Jan 2003 18:20:44 -0800 (PST) |
Hi,
I'm hoping I can get some help on this problem -
any help appreciated. I have a build system with many
static libraries to be built and wish to write a
single makefile containig the rules for building them.
Each library (aka archive) has it's own set of .o
files on which it is dependant. Can I avoid writing a
rule for each library ?
****In pseudo make "code" ********
libsl_blah1.a : 1.o 2.o 3.o
...
libsl_blah2.a : 4.o 5.o 6.o
- I would like to combine this to say
blah1_OBJS = 1.o 2.o 3.o
blah2_OBJS = 4.o 5.o 6.o
$(LIBRARY_LIST) : libsl_%.a : $(%_OBJS)
- Another way of doing this is that I want a local
variable for each rule, but I want that variable
available at the time the pre-requisties for that rule
are available
libsl_blah1.a : OBJS = 1.o 2.o 3.o
libsl_blah2.a : OBJS = 4.o 5.o 6.0
$(LIBRARY_LIST) : libsl_%.a : $(OBJS)
and then when the pattern rule is evaluated it uses
the local value of OBJS for that rule
Any other techniques for making "local variables"
available on calculation of pre-requisites - or other
ways of doing the same are welcome
Thanks,
Alister
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
- Calculated Variables as Pre-requisites,
Alister Shipman <=