diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2020-05-24 14:59:36 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-05-25 21:53:16 +0200 |
commit | 6c824e781e45ff8474f4d72d8d5000872bf4cdfe (patch) | |
tree | 0c93e3b4230eda15425dc25880cbe70dea4b0c22 /configure.ac | |
parent | be034ccfbfc077655dec7ef4f84c07703f9a56f8 (diff) |
build: Fix doc build, restore A2X assignment for doc/Makefile
Commit 4f2813a313ae ("build: Include generated man pages in dist
tarball") skips AC_CHECK_PROG for A2X altogether if doc/nft.8 is
already present.
Now, starting from a clean situation, we can have this sequence:
./configure # doc/nft.8 not there, A2X set in doc/Makefile
make # builds doc/nft.8
./configure # doc/nft.8 is there, A2X left empty in doc/Makefile
make clean # removes doc/nft.8
make
resulting in:
[...]
GEN nft.8
/bin/sh: -L: command not found
make[2]: *** [Makefile:639: nft.8] Error 127
and the only way to get out of this is to issue ./configure again
after make clean, which is rather unexpected.
Instead of skipping AC_CHECK_PROG when doc/nft.8 is present, keep
it and simply avoid returning failure if a2x(1) is not available but
doc/nft.8 was built, so that A2X is properly set in doc/Makefile
whenever needed.
Fixes: 4f2813a313ae ("build: Include generated man pages in dist tarball")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Acked-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 3496e410..5a1f89a0 100644 --- a/configure.ac +++ b/configure.ac @@ -50,9 +50,9 @@ AC_EXEEXT AC_DISABLE_STATIC CHECK_GCC_FVISIBILITY -AS_IF([test "x$enable_man_doc" = "xyes" -a ! -f "${srcdir}/doc/nft.8"], [ +AS_IF([test "x$enable_man_doc" = "xyes"], [ AC_CHECK_PROG(A2X, [a2x], [a2x], [no]) - AS_IF([test "$A2X" = "no"], + AS_IF([test "$A2X" = "no" -a ! -f "${srcdir}/doc/nft.8"], [AC_MSG_ERROR([a2x not found, please install asciidoc])]) ]) |