help-gnu-utils
[Top][All Lists]
Advanced

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

Re: Make dependency on a directory without regards to timestamp


From: Henrik Carlqvist
Subject: Re: Make dependency on a directory without regards to timestamp
Date: Wed, 29 Aug 2007 08:05:24 +0200
User-agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)

Doug <address@hidden> wrote:
> Is there a way with GNU make to specify a dependency on the existence
> of a directory while ignoring the timestamp of the directory?
> 
> Specifically, say I have the following makefile:
> 
> default: myfile
> myfile: mydir
>       touch mydir/myfile
> mydir:
>       mkdir -p mydir

The following will avoid your problem:

myfile: $(filter-out $(wildcard mydir), mydir)
        touch mydir/myfile

Above, you will onldy depend on mydir if the directory does not exist.

regards Henrik
-- 
The address in the header is only to prevent spam. My real address is:
hc1(at)poolhem.se Examples of addresses which go to spammers:
address@hidden address@hidden



reply via email to

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