bug-make
[Top][All Lists]
Advanced

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

Re: [bug #30505] Make doesn't update the entire dependency chain?


From: Edward Welbourne
Subject: Re: [bug #30505] Make doesn't update the entire dependency chain?
Date: Wed, 21 Jul 2010 10:28:46 +0200

> previous_var:
>       echo $(VAR) > previous_var
> .PHONY: previous_var

I suggest you eliminate this .PHONY - previous_var is a real file on
disk, so not a phony target.  There might be a case for it to be
declared .PHONY in an *else* clause, when PREVIOUS_VAR agrees with
VAR.

> /source/test $ make VAR=abc
> cat: previous_var: No such file or directory

I suggest
PREVIOUS_VAR := $(if $(wildcard previous_var),$(shell cat previous_var),)
to avoid that one, or simply
PREVIOUS_VAR := $(shell cat previous_var 2>/dev/null)

Not that I expect either of these to fix your problem (albeit the
first might) !

        Eddy.



reply via email to

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