List Info

Thread: Make: Missing prerequisites on implicit rules




Make: Missing prerequisites on implicit rules
user name
2007-01-19 20:29:51
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 $!"
	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 $!"
	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:
  Is this a bug or well defined behavior.
  I need a mechanism to find out missing prerequisites like
above.

Many thanks and Best Regards,
  Peer Georgi.


_______________________________________________
help-gnu-utils mailing list
help-gnu-utilsgnu.org

http://lists.gnu.org/mailman/listinfo/help-gnu-utils

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )