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

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

Re: Make: target not updated until run again


From: Ralf Wildenhues
Subject: Re: Make: target not updated until run again
Date: Sun, 5 Oct 2008 12:18:09 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Brian,

* mearns.b@gmail.com wrote on Fri, Oct 03, 2008 at 12:04:04AM CEST:
> I'm trying to create an "archive" (copy of the project) as follows:
> The top level Makefile creates the directory and copies some stuff
> into it. Then it recurses into subdirectories, and tells them to add
> their own files to the directory it created.

Sounds like you're more or less doing manually what Automake provides
with its 'distdir' rule.

> If the subdirectory
> Makefiles decide to actually add anything to the directory, they touch
> it to make it up to date.

That's the problem, AFAICS: you cannot have several rules updating the
same file, that will confuse make.

Whenever you can't express the dependencies between files as a directed
tree, you have to either use stamp files, and/or reinvoke make within a
rule to let it recompute the set of needed rules based on updated
timestamps.

For example, post-update actions can typically be realized like this:

target: deps...
        update_target
        $(MAKE) post-action-for-target

Hope that helps to get you going (otherwise please report back).

Cheers,
Ralf




reply via email to

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