* [PATCH 0/1] autotools conversion: added autotools support for the 'doc' subdir.
@ 2014-11-10 14:57 Giorgio Dal Molin
2014-11-10 14:57 ` Giorgio Dal Molin
2014-11-10 14:57 ` [PATCH 1/1] " Giorgio Dal Molin
0 siblings, 2 replies; 4+ messages in thread
From: Giorgio Dal Molin @ 2014-11-10 14:57 UTC (permalink / raw)
To: netfilter-devel; +Cc: Giorgio
From: Giorgio <giorgio.nicole@arcor.de>
This patch adds support to eventually build the nft docs: 'nft.8' and
'nft.pdf' in case the proper documentation tools are found on the system.
To build the man page 'nft.8' we look for one the three programs:
'docbook2x-man', 'docbook2man' and 'db2x_docbook2man'; in case one was found
it is used to build the man page with the command:
# ${DB2MAN} --xinclude $<
To build the .pdf we search for 'dblatex'.
giorgio (1):
autotools conversion: added autotools support for the 'doc' subdir.
Makefile.am | 5 ++---
configure.ac | 45 ++++++++++++++++++++++-----------------------
doc/Makefile.am | 19 +++++++++++++++++++
doc/Makefile.in | 20 --------------------
4 files changed, 43 insertions(+), 46 deletions(-)
create mode 100644 doc/Makefile.am
delete mode 100644 doc/Makefile.in
--
2.1.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 0/1] autotools conversion: added autotools support for the 'doc' subdir.
2014-11-10 14:57 [PATCH 0/1] autotools conversion: added autotools support for the 'doc' subdir Giorgio Dal Molin
@ 2014-11-10 14:57 ` Giorgio Dal Molin
2014-11-10 14:57 ` [PATCH 1/1] " Giorgio Dal Molin
1 sibling, 0 replies; 4+ messages in thread
From: Giorgio Dal Molin @ 2014-11-10 14:57 UTC (permalink / raw)
To: netfilter-devel; +Cc: Giorgio
From: Giorgio <giorgio.nicole@arcor.de>
To build the man page 'nft.8' we look for the three programs:
'docbook2x-man', 'docbook2man' and 'db2x_docbook2man'; in case one was found
it is used to build the man page with the command:
# ${DB2MAN} --xinclude $<
giorgio (1):
autotools conversion: added autotools support for the 'doc' subdir.
Makefile.am | 5 ++---
configure.ac | 45 ++++++++++++++++++++++-----------------------
doc/Makefile.am | 19 +++++++++++++++++++
doc/Makefile.in | 20 --------------------
4 files changed, 43 insertions(+), 46 deletions(-)
create mode 100644 doc/Makefile.am
delete mode 100644 doc/Makefile.in
--
2.1.3
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/1] autotools conversion: added autotools support for the 'doc' subdir.
2014-11-10 14:57 [PATCH 0/1] autotools conversion: added autotools support for the 'doc' subdir Giorgio Dal Molin
2014-11-10 14:57 ` Giorgio Dal Molin
@ 2014-11-10 14:57 ` Giorgio Dal Molin
2014-11-12 12:05 ` Pablo Neira Ayuso
1 sibling, 1 reply; 4+ messages in thread
From: Giorgio Dal Molin @ 2014-11-10 14:57 UTC (permalink / raw)
To: netfilter-devel; +Cc: Giorgio
From: Giorgio <giorgio.nicole@arcor.de>
---
Makefile.am | 5 ++---
configure.ac | 45 ++++++++++++++++++++++-----------------------
doc/Makefile.am | 19 +++++++++++++++++++
doc/Makefile.in | 20 --------------------
4 files changed, 43 insertions(+), 46 deletions(-)
create mode 100644 doc/Makefile.am
delete mode 100644 doc/Makefile.in
diff --git a/Makefile.am b/Makefile.am
index f48b08c..5268c38 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,4 @@
-include Make_global.am
-
ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = src
+SUBDIRS = src \
+ doc
diff --git a/configure.ac b/configure.ac
index 15bb3e9..ba3299c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,29 +49,24 @@ then
exit 1
fi
-AC_CHECK_PROG(CONFIG_MAN1, [docbook2x-man], [y], [n])
-if test "$CONFIG_MAN1" == "y"
-then
- CONFIG_MAN=y
- DB2MAN=docbook2x-man
-else
- AC_CHECK_PROG(CONFIG_MAN2, [db2x_docbook2man], [y], [n])
- if test "$CONFIG_MAN2" == "y"
- then
- CONFIG_MAN=y
- DB2MAN=db2x_docbook2man
- else
- AC_MSG_WARN([docbookx2-man/db2x_docbook2man not found, no manpages will be built])
- fi
-fi
-AC_SUBST(CONFIG_MAN)
+AC_CHECK_PROG(DOCBOOK2X_MAN, [docbook2x-man], [docbook2x-man], [no])
+AC_CHECK_PROG(DOCBOOK2MAN, [docbook2man], [docbook2man], [no])
+AC_CHECK_PROG(DB2X_DOCBOOK2MAN, [db2x_docbook2man], [db2x_docbook2man], [no])
+AS_IF([test "$DOCBOOK2X_MAN" != "no"], [DB2MAN="$DOCBOOK2X_MAN"],
+ [AS_IF([test "$DOCBOOK2MAN" != "no"], [DB2MAN="$DOCBOOK2MAN"],
+ [AS_IF([test "$DB2X_DOCBOOK2MAN" != "no"], [DB2MAN="$DB2X_DOCBOOK2MAN"],
+ [AC_MSG_WARN([docbookx2-man/db2x_docbook2man not found, no manpages will be built])]
+ )]
+ )]
+)
AC_SUBST(DB2MAN)
+AM_CONDITIONAL([BUILD_MAN], [test -n "$DB2MAN"])
-AC_CHECK_PROG(CONFIG_PDF, dblatex, y, n)
-if test "$CONFIG_PDF" != "y"
-then
- AC_MSG_WARN([dblatex not found, no PDF manpages will be built])
-fi
+AC_CHECK_PROG(DBLATEX, [dblatex], [found], [no])
+AS_IF([test "$DBLATEX" == "no"],
+ [AC_MSG_WARN([dblatex not found, no PDF manpages will be built])]
+)
+AM_CONDITIONAL([BUILD_PDF], [test "$DBLATEX" == "found"])
# Checks for libraries.
PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.3])
@@ -119,6 +114,10 @@ AC_TYPE_UINT64_T
# Checks for library functions.
AC_CHECK_FUNCS([memmove memset strchr strdup strerror strtoull])
-AC_CONFIG_FILES([Makefile])
-AC_CONFIG_FILES([src/Makefile])
+AC_CONFIG_FILES([ \
+ Makefile \
+ src/Makefile \
+ doc/Makefile \
+ ])
+
AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..a92de7f
--- /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 *~
diff --git a/doc/Makefile.in b/doc/Makefile.in
deleted file mode 100644
index 1ec856c..0000000
--- a/doc/Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
-mandocs-@CONFIG_MAN@ += doc/nft.8
-pdfdocs-@CONFIG_PDF@ += doc/nft.pdf
-
-all: $(mandocs-y) $(pdfdocs-y)
-clean:
- @echo -e " CLEAN\t\tdoc"
- $(RM) $(mandocs-y) $(pdfdocs-y)
-
-install: $(mandocs-y) $(pdfdocs-y)
- @echo -e " INSTALL\tdoc"
- if test -n "$(mandocs-y)"; then \
- $(MKDIR_P) $(DESTDIR)/${mandir}/man8 ;\
- $(INSTALL) -m 755 -p $(mandocs-y) \
- $(DESTDIR)/${mandir}/man8/ ;\
- fi
- if test -n "$(pdfdocs-y)"; then \
- $(MKDIR_P) $(DESTDIR)/${pdfdir} ;\
- $(INSTALL) -m 755 -p $(pdfdocs-y) \
- $(DESTDIR)/${pdfdir}/ ;\
- fi
--
2.1.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] autotools conversion: added autotools support for the 'doc' subdir.
2014-11-10 14:57 ` [PATCH 1/1] " Giorgio Dal Molin
@ 2014-11-12 12:05 ` Pablo Neira Ayuso
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2014-11-12 12:05 UTC (permalink / raw)
To: Giorgio Dal Molin; +Cc: netfilter-devel, Giorgio
On Mon, Nov 10, 2014 at 03:57:05PM +0100, Giorgio Dal Molin wrote:
> From: Giorgio <giorgio.nicole@arcor.de>
Thanks for finishing the work.
Please, add the description that you included in 0/1, so this remain
in the repository and justify why we need to check for three different
programs.
Add the 'Signed-off-by' tag to your patches and resubmit. Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-12 12:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-10 14:57 [PATCH 0/1] autotools conversion: added autotools support for the 'doc' subdir Giorgio Dal Molin
2014-11-10 14:57 ` Giorgio Dal Molin
2014-11-10 14:57 ` [PATCH 1/1] " Giorgio Dal Molin
2014-11-12 12:05 ` 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).