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 <[email protected]>
> 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

_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to