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 <[EMAIL PROTECTED]> wrote:
> Hello Brian,
>
> * [EMAIL PROTECTED] 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