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: mearns . b
Subject: Re: Make: target not updated until run again
Date: Sun, 5 Oct 2008 14:48:24 -0700 (PDT)
User-agent: G2/1.0

Thanks, so much, Ralf. I guess I didn't have a good understanding of
how Make handles dependencies, but your response has made it more
clear. I'll take another (more thorough) look over the Make manual,
and then try it again with your suggestion.

FYI, I'm not using automake because I'm trying to keep my project
easily cross-platform: I'm not sure if there's an easy to use set of
auto tools for windows. If you know of such a set, that'd be great.

Thanks for the help,
-Brian

On Oct 5, 6:18 am, Ralf Wildenhues <Ralf.Wildenh...@gmx.de> wrote:
> Hello Brian,
>
> * mearn...@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]