[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
make: problem with multiple pattern targets
From: |
Damian Marriott |
Subject: |
make: problem with multiple pattern targets |
Date: |
Mon, 2 Apr 2001 18:20:45 +0930 (CST) |
Hi
I think I have found a problem with GNU make 3.79. Under "Multiple
Targets in a Rule" it gives an example which says something like
a b: c; d $@ is equivalent to a: c; d $@ and b: c; d address@hidden Now I have
a
situation where I want to do this where a and b are patterns. Does
this statement still hold. I would suggest the implementation at this
point says no. So should it still hold? I would like it to!
Here's an example to try (which is located in a directory simple):
----
TARGET=../simple
TARGETLIBS=${TARGET}/t1 ${TARGET}/t2
all: ${TARGETLIBS}
%/t1-orig %/t2-orig: FORCE
touch $@
%/t1: %/t1-orig
cp $? $@
%/t2: %/t2-orig
cp $? $@
clean:
rm -f t1 t2 t1-orig t2-orig
FORCE:
----
Typing make with the above results in the non-firing of the FORCEd
rule, whereas if I change it so that there are two rules, one for
t1-orig and one for t2-orig, then it works fine.
Your comments would be appreciated. This is not a show stopper since
I can simply replicate the appropriate lines as a workaround.
This does remind me of a requirement which I have thought would be
nice, and that is to be able to use the foreach expansion or something
similar to expand complete rules, possibly to be used in combination
with define. Just a thought.
Cheers
Damian
--
Damian Marriott Email: address@hidden
DSTO Information Technology Division Phone: +61 8 8259 5749
PO Box 1500, Salisbury SA 5108, Australia Fax: +61 8 8259 6011
- make: problem with multiple pattern targets,
Damian Marriott <=