* [PATCH nft] build: Fix doc build, restore A2X assignment for doc/Makefile
@ 2020-05-24 12:59 Stefano Brivio
2020-05-25 15:52 ` Phil Sutter
2020-05-25 20:04 ` Pablo Neira Ayuso
0 siblings, 2 replies; 3+ messages in thread
From: Stefano Brivio @ 2020-05-24 12:59 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: Matt Turner, netfilter-devel
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>
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3496e410dbbe..5a1f89a0104c 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])])
])
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH nft] build: Fix doc build, restore A2X assignment for doc/Makefile
2020-05-24 12:59 [PATCH nft] build: Fix doc build, restore A2X assignment for doc/Makefile Stefano Brivio
@ 2020-05-25 15:52 ` Phil Sutter
2020-05-25 20:04 ` Pablo Neira Ayuso
1 sibling, 0 replies; 3+ messages in thread
From: Phil Sutter @ 2020-05-25 15:52 UTC (permalink / raw)
To: Stefano Brivio; +Cc: Pablo Neira Ayuso, Matt Turner, netfilter-devel
Hi,
On Sun, May 24, 2020 at 02:59:36PM +0200, Stefano Brivio wrote:
> 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
Thanks for your fix! I fell into that myself since my "build everything
again" script did just that. My quick "fix" was to 'make clean' before
configure, not after (which sucks, too).
[...]
>
> 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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH nft] build: Fix doc build, restore A2X assignment for doc/Makefile
2020-05-24 12:59 [PATCH nft] build: Fix doc build, restore A2X assignment for doc/Makefile Stefano Brivio
2020-05-25 15:52 ` Phil Sutter
@ 2020-05-25 20:04 ` Pablo Neira Ayuso
1 sibling, 0 replies; 3+ messages in thread
From: Pablo Neira Ayuso @ 2020-05-25 20:04 UTC (permalink / raw)
To: Stefano Brivio; +Cc: Matt Turner, netfilter-devel
On Sun, May 24, 2020 at 02:59:36PM +0200, Stefano Brivio wrote:
> 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.
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-25 20:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-24 12:59 [PATCH nft] build: Fix doc build, restore A2X assignment for doc/Makefile Stefano Brivio
2020-05-25 15:52 ` Phil Sutter
2020-05-25 20:04 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).