bug-make
[Top][All Lists]
Advanced

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

Re: bug/feature regarding target filename resolution


From: Hua Yu
Subject: Re: bug/feature regarding target filename resolution
Date: Sat, 29 Jun 2002 11:37:47 -0400

In message <address@hidden>, "Paul D
. Smith" writes:
>%% address@hidden writes:
>
>  h> I'm not sure whether it's a bug or a feature. But it's annoying
>  h> to me at the very least. Targets in a makefile are filenames,
>  h> in most cases.
>
>They may be filenames in most cases, but make treats them as strings in
>virtually all cases.  Make does simple string matching, not complex path
>matching.

Well, I also noticed that gmake produces a different message in this case,
comparing to when it gets a non-existent target. If target names are strings,
the "No rule to make target ..." message is much clearer and easier for me
to debug the makefile.

$ pwd
/home/hyu
$ cat Makefile
a.o: a.c
        touch a.o
$ touch a.c
$ gmake ../hyu/a.o
gmake: Nothing to be done for `../hyu/a.o'.
$ gmake whatever
gmake: *** No rule to make target `whatever'.  Stop.

Hua




reply via email to

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