summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2008-04-28 07:41:16 -0700
committerDan Nicholson <dbn.lists@gmail.com>2008-04-28 07:44:19 -0700
commitd98360b945cd44701a925192f36d7ef681a92823 (patch)
tree9636c459fbc6b6e502eb4b836ae0090842d91b43
parenta068f3fbc7c522bba62991dd7ffc7a2eb4aeee2e (diff)
Only build man pages when docbook2man is available
Since not everyone has the whole DocBook chain, the building of the man pages is now conditional on the docbook2man utility being available. The built man pages are always included in `make dist', meaning that docbook2man must be available in that situation.
-rw-r--r--configure.ac6
-rw-r--r--man/Makefile.am15
2 files changed, 16 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 1246e8f..79ffdc7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,12 @@ dnl ---------------------------------------------------------------------------
CPPFLAGS="$CPPFLAGS -g"
dnl ---------------------------------------------------------------------------
+dnl - Manual page build
+dnl ---------------------------------------------------------------------------
+AC_PATH_PROG(DOCBOOK2MAN, docbook2man, no)
+AM_CONDITIONAL(HAVE_DOCBOOK, [test "x$DOCBOOK2MAN" != xno])
+
+dnl ---------------------------------------------------------------------------
dnl - Make paths available for source files
dnl ---------------------------------------------------------------------------
AC_SUBST(SYSCONFDIR, $sysconfdir)
diff --git a/man/Makefile.am b/man/Makefile.am
index 3ab7be6..376a714 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -1,20 +1,25 @@
-man_MANS = \
+pm_mans = \
on_ac_power.1 \
pm-pmu.1
+if HAVE_DOCBOOK
+man_MANS = \
+ $(pm_mans)
+endif
+
EXTRA_DIST = \
on_ac_power.sgml \
pm-pmu.sgml \
- $(man_MANS)
+ $(pm_mans)
MAINTAINERCLEANFILES = \
- $(man_MANS)
+ $(pm_mans)
pm-pmu.1: pm-pmu.sgml
- docbook2man $?
+ $(DOCBOOK2MAN) $?
on_ac_power.1: on_ac_power.sgml
- docbook2man $?
+ $(DOCBOOK2MAN) $?
clean-local :
rm -f *~