help-make
[Top][All Lists]
Advanced

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

implicit rules


From: Noel Yap
Subject: implicit rules
Date: Mon, 26 Apr 2004 13:17:55 -0400
User-agent: Mozilla Thunderbird 0.5 (Windows/20040212)

I've read and reread the docs on this and I'm still confused.

When I have:

.PHONY: all
all: aoeu/aoeu.mk

%.mk: %.mk
        cp $(<) $(@)

%/.:
        mkdir -p $(@)

aoeu/aoeu.mk: aoeu.mk | aoeu/.


The output is:

$ gmake
gmake: Circular aoeu/aoeu.mk <- aoeu/aoeu.mk dependency dropped.
gmake: Circular aoeu.mk <- aoeu.mk dependency dropped.
mkdir -p aoeu/.
cp aoeu.mk aoeu/aoeu.mk


But if it's changed to:

.PHONY: all
all: aoeu/aoeu.mk

%.mk: %.m
        cp $(<) $(@)

%/.:
        mkdir -p $(@)

aoeu/aoeu.mk: aoeu.m | aoeu/.


The output becomes:

$ gmake
mkdir -p aoeu/.


Can someone explain, please?

Thanks,
Noel




reply via email to

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