[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tue, 22 May 2012 06:46:52 +0200 (CEST)
[Not sure whether my previous attempt in sending this email was
successful since I've just subscribed to the list, and I can't see it
in the archive, so I'm retrying. Sorry for any double posts.]
it's not clear to me whether I shall post this question in the
automake or autoconf mailing list, but since I use the automake
framework, I start here :-)
In my package, I have generated documentation files: foo.html and
foo.pdf. In the tarball I want to distribute them. In the git
repository they are not present, and rules in the Makefile generate
Now my question: I need pandoc and pdftex for building the docs.
What's the best way to test for them in the configure script? Note
that I have already an option --without-doc to completely disable a
doc build, so this is not a problem here.
(1) If the user unpacks the tarball, the rules are not executed.
(2) If the user does a bootstrap from the repository to do `make
dist', they are needed.
(3) If the user changes a doc source file in the tarball and wants to
regenerate the documentation, the rules are needed too.
The possible solutions for configure.ac I've found so far are as
(a) Test for pandoc and pdftex only if foo.html and foo.pdf are not
present. Abort if one of them is missing. This works fine for
(1) and (2), but fails for (3).
(b) If the tests for pandoc and pdftex fail, disable the build rules
or provide no-ops. This is OK for (1) and (3), but not
satisfactory for (2).
Any other ideas? Is there a `standard' way to handle this problem?