On Tue, Feb 8, 2011 at 12:15 +0100, Iustin Pop <ius...@google.com> wrote:
> This fixes the doc builds broken by commit b292b986, but is only an
> ugly workaround due to our dependency chain.

> opcodes.py imports (both directly and indirectly) constants.py, which
> imports _autoconf.py. Hence one could say that all .py files have a
> logical dependency on _autoconf.py, since you can't "import opcodes"
> before _autoconf.py is built. So the sphinx rule should depend on
> _autoconf.py as a prerequisite.

> But we can't use a normal prerequisite, since that would cause the
> html docs to be rebuilt whenever _autoconf.py gets rebuilt, i.e. even
> on end-users machines after ./configure; this is bad, and it also
> breaks distcheck (as the html files are not removed in distclean,
> since we do want them distributed).

> So we only add an order-only prerequisite, which does the right thing
> (although our dependency chain is still ugly).
> ---
>  Makefile.am |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

LGTM

>  doc/html/index.html: $(docrst) $(docpng) doc/conf.py configure.ac \
> -     $(RUN_IN_TEMPDIR) lib/build/sphinx_ext.py lib/opcodes.py lib/ht.py
> +     $(RUN_IN_TEMPDIR) lib/build/sphinx_ext.py lib/opcodes.py lib/ht.py \
> +     | lib/_autoconf.py

I'd say order-only prerequisites are a rather rare make feature (at
least, I had never come accross them myself). Perhaps it'd be good to
add a comment before the rule, briefly explaining what is being done?
(Saving a trip to git-blame.)

A brief summay of the commit message should do the trick.

-- 
Adeodato Simo | d...@google.com
Corp Computing Services SRE (Dublin)

Reply via email to