[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make dependency on a directory without regards to timestamp
From: |
Ralf Wildenhues |
Subject: |
Re: Make dependency on a directory without regards to timestamp |
Date: |
Wed, 29 Aug 2007 07:41:11 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hello Doug,
* Doug wrote on Wed, Aug 29, 2007 at 12:17:01AM CEST:
>
> default: myfile
> myfile: mydir
> touch mydir/myfile
> mydir:
> mkdir -p mydir
[...]
>
> I know I could just put the mkdir under the myfile rule, but my actual
> scenario isn't this straightforward. I am calling another program to
> create the directory and don't want to call it every time.
That doesn't yet explain why you can't just do
myfile:
test -d mydir || mkdir mydir
touch mydir/myfile
Cheers,
Ralf