[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible bug: Intermediate file deletion using pattern rules with m
From: |
Paul D. Smith |
Subject: |
Re: Possible bug: Intermediate file deletion using pattern rules with multiple targets |
Date: |
Mon, 29 Apr 2002 03:14:27 -0400 |
%% "Johan Bezem" <address@hidden> writes:
jb> since I didn't get any reaction at all, neither in this mailing
jb> list nor at the bug report I created at 'savannah', I'd like to
jb> resubmit. Paul possibly has seen this problem before, and may even
jb> have a patch available;
Yes, it seems to be a bug. Yes, I can reproduce it. No, I don't have a
patch yet.
> echo "intfile, target $(subst -nodelete,,$*).int" > $(subst
-nodelete,,$*).int
> echo "intfile nodelete, target $(subst -nodelete,,$*)-nodelete.int" >
$(subst -nodelete,,$*)-nodelete.int
FYI, you don't need all this fancy subst stuff.
The value of $* is defined to be the stem, so for:
%-nodelete.int %.int : %.input
all: file-nodelete.int file.int
$* will be just "file", regardless of which target you build "first".
So you can just write:
echo "intfile, target $*.int > $*.int
echo "intfile nodelete, target $*-nodelete.int" > $*-nodelete.int
jb> Thanks again,
HTH! :)
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist