[v2] nft: doc: changes in configure file for PDF creation

Message ID 20180807210437.GA3262@arushi-HP-Laptop-15-bs1xx
State Superseded
Delegated to: Pablo Neira
Headers show
Series
  • [v2] nft: doc: changes in configure file for PDF creation
Related show

Commit Message

Arushi Singhal Aug. 7, 2018, 9:04 p.m.
changes in package dependencies for PDF creation (nft.pdf) from
asciidoc.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
changes in v2
-remove duplicacy of code

 configure.ac | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

Comments

Pablo Neira Ayuso Aug. 8, 2018, 5:21 p.m. | #1
On Wed, Aug 08, 2018 at 02:34:37AM +0530, Arushi Singhal wrote:
> changes in package dependencies for PDF creation (nft.pdf) from
> asciidoc.

If I apply this patch, I can hit the following error:

make[2]: Entering directory
'/home/git/nftables/doc'
a2x --doctype manpage --format manpage -D . libnftables-json.adoc
a2x --doctype manpage --format manpage -D . libnftables.adoc
a2x --doctype manpage --format pdf -D . libnftables-json.adoc
  GEN      nft.8
a2x --doctype manpage --format pdf -D . libnftables.adoc
  GEN      nft.pdf
a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
a2x: ERROR: "dblatex" -t pdf -p "/etc/asciidoc/dblatex/asciidoc-dblatex.xsl" -s "/etc/asciidoc/dblatex/asciidoc-dblatex.sty" "/home/git/nftables/doc/libnftables.xml"
returned non-zero exit status 1
Makefile:673: recipe for target 'libnftables.pdf' failed
make[2]: *** [libnftables.pdf] Error 1
make[2]: *** Waiting for unfinished jobs....
a2x: ERROR: "dblatex" -t pdf -p "/etc/asciidoc/dblatex/asciidoc-dblatex.xsl" -s "/etc/asciidoc/dblatex/asciidoc-dblatex.sty" "/home/git/nftables/doc/libnftables-json.xml"
returned non-zero exit status 1
Makefile:673: recipe for target 'libnftables-json.pdf' failed
make[2]: *** [libnftables-json.pdf] Error 1

Before this patch, I was all the time hitting:

        enable pdf documentation:     no

So I guess now PDF compilation is turned on, but it was not working.

Does this generate the PDF file there?

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Duncan Roe Aug. 13, 2018, 3:27 a.m. | #2
Hi Pablo,

On Wed, Aug 08, 2018 at 07:21:49PM +0200, Pablo Neira Ayuso wrote:
> On Wed, Aug 08, 2018 at 02:34:37AM +0530, Arushi Singhal wrote:
> > changes in package dependencies for PDF creation (nft.pdf) from
> > asciidoc.
>
> If I apply this patch, I can hit the following error:
>
> make[2]: Entering directory
> '/home/git/nftables/doc'
> a2x --doctype manpage --format manpage -D . libnftables-json.adoc
> a2x --doctype manpage --format manpage -D . libnftables.adoc
> a2x --doctype manpage --format pdf -D . libnftables-json.adoc
>   GEN      nft.8
> a2x --doctype manpage --format pdf -D . libnftables.adoc
>   GEN      nft.pdf
> a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
> a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
> a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
> a2x: WARNING: --destination-dir option is only applicable to HTML based outputs
> a2x: ERROR: "dblatex" -t pdf -p "/etc/asciidoc/dblatex/asciidoc-dblatex.xsl" -s "/etc/asciidoc/dblatex/asciidoc-dblatex.sty" "/home/git/nftables/doc/libnftables.xml"
> returned non-zero exit status 1
> Makefile:673: recipe for target 'libnftables.pdf' failed
> make[2]: *** [libnftables.pdf] Error 1
> make[2]: *** Waiting for unfinished jobs....
> a2x: ERROR: "dblatex" -t pdf -p "/etc/asciidoc/dblatex/asciidoc-dblatex.xsl" -s "/etc/asciidoc/dblatex/asciidoc-dblatex.sty" "/home/git/nftables/doc/libnftables-json.xml"
> returned non-zero exit status 1
> Makefile:673: recipe for target 'libnftables-json.pdf' failed
> make[2]: *** [libnftables-json.pdf] Error 1
>
> Before this patch, I was all the time hitting:
>
>         enable pdf documentation:     no
>
> So I guess now PDF compilation is turned on, but it was not working.
>
> Does this generate the PDF file there?
>
> Thanks.

I got that error as well from "make -j7" but *plain "make" runs to completion*.
You get 3 pdfs created - one for each man page.

Anyway the patch is wrong - you need to keep the test for dblatex and discard
the subsequent duplicate test for a2x.

After fixing that, the readline check failed (becaue it needs to specify
-lncurses when building conftest). I have no idea why that didn't trip before,
but fixed it anyway.

Expect a patch shortly,

Cheers ... Duncan.

Patch

diff --git a/configure.ac b/configure.ac
index c1c9035..11e1ebb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,15 +56,7 @@  AM_PROG_LIBTOOL
 
 AC_CHECK_PROG(A2X, [a2x], [a2x])
 AM_CONDITIONAL([BUILD_MAN], [test -n "$A2X"])
-
-AM_COND_IF([BUILD_PDF], [
-	AC_CHECK_PROG(DBLATEX, [dblatex], [found], [no])
-	AS_IF([test "$DBLATEX" == "no"],
-	      [AC_MSG_ERROR([dblatex not found])])
-	AS_IF([test -z "$A2X"],
-	      [AC_MSG_ERROR([a2x not found])])
-	[need_a2x=yes]
-])
+AM_CONDITIONAL([BUILD_PDF], [test -n "$A2X"])
 
 AS_IF([test "$need_a2x" = "yes"], [
        AC_CHECK_PROG(A2X, [a2x], [found], [no])