bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

% vs. "No rule to make target"


From: jidanni
Subject: % vs. "No rule to make target"
Date: Fri, 06 Jun 2008 19:49:35 +0800

All is well:
  $ cat Makefile
  all:z.bak
  %.bak:;
  $ make
  make: Nothing to be done for `all'.
Until we add a %:
  $ cat Makefile
  all:z.bak
  %.bak:%;
  $ make
  make: *** No rule to make target `z.bak', needed by `all'.  Stop.
Suddenly it can't find the rule anymore. Or prints the wrong message.
Indeed, instead of % use
  %.bak:some_file_that_exists;
No problem. But
  %.bak:some_file_that_does_not_exist;
then make says it can't find the rule to make target z.bak, when it
should say it can't find the rule to make target some_file_that_does_not_exist,
which it does when one uses
  z.bak:some_file_that_does_not_exist;

Maybe the story lies on Info page "10.8 Implicit Rule Search Algorithm"
and maybe -d showing "Avoiding implicit rule recursion." is a clue.
Anyway, I'm not one of the 0.1% of the population to be able to
comprehend all these things. GNU Make 3.81




reply via email to

[Prev in Thread] Current Thread [Next in Thread]