bug-make
[Top][All Lists]
Advanced

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

Re: Circular dependency with order-only dependencies


From: Paul Smith
Subject: Re: Circular dependency with order-only dependencies
Date: Wed, 23 Jan 2019 14:49:42 -0500

On Wed, 2019-01-23 at 21:21 +0200, Eli Zaretskii wrote:
> > From: Paul Smith <address@hidden>
> > Cc: address@hidden
> > Date: Wed, 23 Jan 2019 13:55:49 -0500
> > 
> > That's not how it works.  Order-only prerequisites are considered
> > identically to normal prerequisites in every way except one: after
> > all the prerequisites, including order-only prerequisites, are
> > brought up to date following the standard algorithm and we're
> > determining whether the target is outdated, we skip order-only
> > prerequisites.
> 
> That's too bad, because it doesn't allow to have targets which can
> only be updated by one of their dependencies.
> 
> In Emacs, we have a header file that is generated from an certain
> data file, but its generation requires an Emacs binary, which runs a
> Lisp command to massage the data file into a C header.  And the
> binary depends on that header because one of the source files
> #include's the header.  The header is also kept in the VCS, so some,
> perhaps outdated version of it is always available.  But I cannot
> find a way of having a target that remakes the header when the data
> file changes, because this creates a circular dependency which Make
> throws away.
> 
> I thought order-only dependencies could be a way out of this
> conundrum, but they aren't :-(

One way this can be done is by using a recursive invocation of make. 
That will allow you to "jump" to a completely disjoint dependency graph
(indeed, the main point of the famous "Recursive Make Considered
Harmful" paper is that the two makes can't coordinate their DAG
information).

Does that help at all?




reply via email to

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