From c12d635ca3ef24345e37aca7bd2bb1aa280c0e34 Mon Sep 17 00:00:00 2001 From: Giorgio Dal Molin Date: Wed, 12 Nov 2014 17:41:05 +0100 Subject: build: add autotools support for the 'doc' subdir 'nft' documentation is originally contained in the XML file 'doc/nft.xml'. Processing this file with the proper tools we can obtain a PDF document, 'nft.pdf', and a unix man page, 'nft.8'. To produce the PDF we need the tool 'dblatex' (current release pypi.python.org/pypi/dblatex/0.3.5). To produce the man page we use the tool 'docbook2man'; it is part of the package 'docbook2X' (docbook2x.sourceforge.net). On some linux distributions the tool can have slightly different names as 'docbook2x-man' or 'db2x_docbook2man' so we search for all three names and use the first one found and issue the command: # ${DB2MAN} --xinclude $< Signed-off-by: Giorgio Dal Molin Signed-off-by: Pablo Neira Ayuso --- doc/Makefile.am | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 doc/Makefile.am (limited to 'doc/Makefile.am') diff --git a/doc/Makefile.am b/doc/Makefile.am new file mode 100644 index 00000000..a92de7f5 --- /dev/null +++ b/doc/Makefile.am @@ -0,0 +1,19 @@ +if BUILD_MAN +man_MANS = nft.8 +endif + +if BUILD_PDF +pdf_DATA = nft.pdf +endif + +pdfdir=${docdir}/pdf + +.xml.pdf: + ${AM_V_GEN}dblatex -q -t pdf -o $@ $< + +.xml.8: + ${AM_V_GEN}${DB2MAN} --xinclude $< + +EXTRA_DIST = nft.xml + +CLEANFILES = nft.pdf nft.8 *~ -- cgit v1.2.3