help-make
[Top][All Lists]
Advanced

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

Re: .PHONY non-rules


From: Magnus Fromreide
Subject: Re: .PHONY non-rules
Date: Fri, 22 Mar 2013 01:37:01 +0100
User-agent: Mutt/1.5.12-2006-07-14

On Thu, Mar 21, 2013 at 03:33:43PM -0700, Dave Hylands wrote:
> Hi Magnus,
> 
> On Thu, Mar 21, 2013 at 2:25 PM, Magnus Fromreide <address@hidden>
> wrote:
>
> It compiles and builds the executable. This is because make has a bunch of
> builtin rules. Running "make -p" will print the builtin rules.

Yes, but normally the builtin rules require some predecessor. In your case
the file hello-world.c the thing that enables the pattern rule '%: %.c'.

In my case we have

$ > Makefile
$ make target
make: *** No rule to make target `target'.  Stop.
$ echo '.PHONY: target' > Makefile
$ make target
make: Nothing to be done for `target'.

and my question is why there is a difference and wether there should be a
difference. I couldn't find anything about .PHONY making it's dependants into
targets in the manual.

/MF



reply via email to

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