On Fri, Jun 6, 2008 at 5:49 AM, <[EMAIL PROTECTED]> wrote: > 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.
Perhaps the message should say "No _applicable_ rule to make target...". Note that make doesn't suggest that "z" is missing because it has no particular reason to believe that that is the missing source file: with that Makefile, make can visualize a way to create z.bak from 9 different source files: z z.bak,v RCS/z.bak,v s.z.bak SCCS/s.z.bak z,v RCS/z,v s.z SCCS/s.z (For a file without a suffix, the default rules give make 70+ source files to check for.) ... > 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; There are several pattern rules that match "z.bak"; make cannot read the Makefile author's mind, so it cannot be 100% sure which of those rules (if any!) was the intended match for this file. Making a misleading claim that file B is missing when it's really file A that's missing, or worse, it's pattern rule C that should have matched but didn't because of a typo, is going to hinder more than it will help. Philip Guenther _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make