[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: order-only prerequisites don't behave as I'd have expected after rea
From: |
Philip Guenther |
Subject: |
Re: order-only prerequisites don't behave as I'd have expected after reading the documentation |
Date: |
Mon, 11 Jun 2012 10:03:18 -0700 |
On Mon, Jun 11, 2012 at 9:40 AM, Stefano Lattarini
<address@hidden> wrote:
> The GNU make 3.82 manual reads:
>
> Normally, this is exactly what you want: if a target's prerequisite
> is updated, then the target should also be updated.
>
> Occasionally, however, you have a situation where you want to impose
> a specific ordering on the rules to be invoked without forcing the
> target to be updated if one of those rules is executed.
>
> But if I write a makefile like this:
>
> ALL = a b c d
> default:
> echo Specify a target: $(ALL); exit 1
> .PHONY: $(ALL)
What is your intent for declaring all the targets PHONY in this Makefile?
(Note: to quote 4.6 Phony Targets:
A phony target should not be a prerequisite of a real target file;
if it is, its recipe will be run every time `make' goes to update that
file. As long as a phony target is never a prerequisite of a real
target, the phony target recipe will be executed only when the phony
target is a specified goal (*note Arguments to Specify the Goals:
Goals.).
)
Philip Guenther
Re: order-only prerequisites don't behave as I'd have expected after reading the documentation, Paul Smith, 2012/06/12