|
From: | Noel Yap |
Subject: | Re: cost of -MP |
Date: | Thu, 27 May 2004 15:01:07 -0400 |
User-agent: | Mozilla Thunderbird 0.5 (Windows/20040212) |
This shouldn't be the case. For example: $ cat GNUmakefile .PHONY: all all: my.o my.o: my.h touch $(@) my.h: $ ls my.h ls: my.h: No such file or directory $ gmake touch my.o $ gmake touch my.o $ touch my.h $ gmake touch my.o $ gmake gmake: Nothing to be done for `all'. $ cat GNUmakefile .PHONY: all all: my.o my.o: my.h touch $(@) .PHONY: my.h my.h: $ ls my.h my.h $ gmake touch my.o $ gmake touch my.o IOW, things dependent upon a .PHONY will be rebuilt regardless of the dependency's timestamp. Empty targets are treated differently. Noel Boris Kolpackov wrote:
Noel Yap <address@hidden> writes:I misunderstood. When you said PHONY targets, I thought you meant it generates ".PHONY: my_header" as well, not just an empty target.No, gcc generates just header.h: And since there are no commands for this target make assumes it is phony. -boris
[Prev in Thread] | Current Thread | [Next in Thread] |