[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Missing prerequisites on implicit rules
From: |
Peer Georgi |
Subject: |
Missing prerequisites on implicit rules |
Date: |
Sat, 20 Jan 2007 07:25:52 +0100 (MET) |
User-agent: |
KMail/1.9.5 |
Hi all,
I have a problem with the behavior of implicit rules if one or more
prerequisites are not exists.
The following works (explicit rule for test.out):
--
all: test.out
test.out: test.in
@cat test.in >> test.out
%.in:
@echo "Missing file address@hidden"
@exit 1
.PHONY: all
--
If test.in not exists the implicit target %.in will trigger and shows the
message. This even happens if test.out already exists!
The following does not work:
--
all: test.out
# Implicit rule for test.out
%.out: test.in
cat test.in >> test.out
%.in:
@echo "Missing file address@hidden"
@exit 1
.PHONY: all
--
Here %.in will only trigger if test.out does not exists. If I remove test.in
(while test.out exists) the %.in target will never trigger...
Now my question:
Why the behavior on implicit rules is different compared with explicit
rules ?
I need a mechanism to find out missing prerequisites even with implicit rules.
Many thanks and Best Regards,
Peer Georgi.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Missing prerequisites on implicit rules,
Peer Georgi <=