help-make
[Top][All Lists]
Advanced

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

Re: can't always get make to auto create build directory


From: Tony Theodore
Subject: Re: can't always get make to auto create build directory
Date: Thu, 30 Jun 2016 16:51:24 +1000

> On 30 Jun 2016, at 04:50, Paul Smith <address@hidden> wrote:
> 
> However, you should generally not have targets depend on directories,
> because make treats them just like any other file when it checks
> modification times; however directories do not act like normal files
> when it comes to modification times.

We use a dummy file as an order-only prerequisite that plays nicely 
with -j, -n, and -t options and recursive invocation:

%/.keep:
        address@hidden -p '$(dir $@)'
        @touch 'address@hidden

Cheers,

Tony




reply via email to

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