[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug with multiple targets in pattern rules?
From: |
Reich, Hannes |
Subject: |
bug with multiple targets in pattern rules? |
Date: |
Thu, 26 Jun 2003 17:31:44 +0100 |
Hi there,
I have a makefile which says (in essence):
%.foo %.bar :
touch $@
Now, I can't find a specific reference to pattern rules with multiple
targets in the manual, but it seems reasonable to me that this would be
the same thing as writing:
%.foo :
touch $@
%.bar :
touch $@
And indeed it works as expected for cases like
make X.foo
make X.bar
make X.foo Y.foo Z.bar
(by 'as expected' I mean that make executes one 'touch' command for each
of the targets).
However... when I try
make X.foo X.bar
I would expect the resulting output to be
touch X.foo
touch X.bar
But instead I get this:
touch X.foo
make: Nothing to be done for `X.bar'.
It appears that the second target is never remade if the '%' matches the
same string in two targets specified in the command line. Is this a bug?
I'm seeing this with make 3.79.1 on Linux and Solaris.
Thanks,
/Hannes
--
Hannes Reich, SCM & Build Engineer
Intel Communications, Shannon, Ireland
"Can we fix it? Yes we can." - Bob the Builder
- bug with multiple targets in pattern rules?,
Reich, Hannes <=