[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: do phony deps take "precedence" over regular deps?
From: |
Robert P. J. Day |
Subject: |
Re: do phony deps take "precedence" over regular deps? |
Date: |
Mon, 7 Feb 2005 11:07:18 -0500 (EST) |
On Mon, 7 Feb 2005, John Graham-Cumming wrote:
> On Mon, 2005-02-07 at 09:54, Robert P. J. Day wrote:
> > $(Program): build_msg (OBJECTS) $(BUILTINS_DEP) ...
> > ... regular commands here ...
> >
> > .PHONY: build_msg
> > build_msg:
> > @printf ... building $(Program) ...
> >
> > the text reads:
> >
> > "Because the printf is in a phony target, the message is printed
> > immediately before any prerequisites are updated."
> >
> > really?
>
> No. Just try an experiment:
>
> .PHONY: all
> all: real-target phony-target other-real-target
>
> real-target: ; @echo $@
> other-real-target: ; @echo $@
>
> .PHONY: phony-target
> phony-target: ; @echo $@
>
> And you'll see the output is
>
> real-target
> phony-target
> other-real-target
>
> Try permuting the prerequisites of all and you see that Make
> traverses them left to right. PHONY only affects whether the
> prerequisite will be updated or not.
i suspected as much, but you can see how the way that sentence is
phrased in the book would lead someone to a noticeably different
conclusion, right?
certainly, if you were doing a parallel make, make would have the
freedom to process the dependencies any way it wanted, no?
rday