[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Oddity with make and % macro
From: |
Brian J. Murrell |
Subject: |
Re: Oddity with make and % macro |
Date: |
Mon, 26 Mar 2001 18:45:45 -0800 |
User-agent: |
Mutt/1.3.15i |
On Mon, Mar 26, 2001 at 10:43:50AM -0500, Paul D. Smith wrote:
> %% "Brian J. Murrell" <address@hidden> writes:
>
> bjm> I guess that one cannot use the % macro in .SECONDARY targets?
>
> Correct.
:-(
> It's simple to keep a target from being considered intermediate, if you
> want, by merely mentioning it as a prerequisite somewhere in the
> makefile.
Well that is what made sense to me, that does not work; hence my
posting the question about it.
Given the make rules:
sync%: .sync-foo-% .sync-bar-%
echo "all done"
.sync-foo-%: foo
@DEST=$(subst .sync-foo-,,$@); \
echo Sending foo file to $$DEST; \
scp ...
touch $@
.sync-bar-%: bar-%
@DEST=$(subst .sync-bar-,,$@); \
echo Sending bar file to $$DEST; \
scp ...
touch $@
and the command:
# make synctest
I still get:
Sending foo file to test
touch .sync-foo-test
Sending bar file to test
touch .sync-bar-test
echo "all done"
all done
rm .sync-foo-test .sync-bar-test
The only way I have been able to get it to work is with .PRECIOUS.
b.
--
Brian J. Murrell