summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 23f4736)
raw | patch | inline | side by side (parent: 23f4736)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 8 Feb 2012 19:43:30 +0000 (20:43 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 8 Feb 2012 19:43:30 +0000 (20:43 +0100) |
If these tools are not found, don't try to build the documentation.
Makefile.am | patch | blob | history | |
configure.ac | patch | blob | history | |
doc/Makefile.am | patch | blob | history |
diff --git a/Makefile.am b/Makefile.am
index 76a10167110337ae3d8bc6bc14fccf5f39df88ba..3fab3faac2ce52117ee4115f290c7c99f68451e4 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
-SUBDIRS = doc src
+SUBDIRS = src
+if BUILD_DOCUMENTATION
+SUBDIRS += doc
+endif
EXTRA_DIST = autogen.sh version-gen.sh
diff --git a/configure.ac b/configure.ac
index 715639bfdcc667f5467b3391461126d28e52f44d..5f0be652dbade58b9b735754eca21cfd959bc7d7 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AC_CHECK_HEADERS(libgen.h)
+dnl Check for dependencies.
+build_documentation="yes"
+
+have_xsltproc="yes"
+AC_PATH_PROG([XSLTPROC], [xsltproc])
+if test "x$XSLTPROC" = "x"; then
+ have_xsltproc="no"
+ build_documentation="no (missing xsltproc)"
+fi
+
+have_a2x="yes"
+AC_PATH_PROG([A2X], [a2x])
+if test "x$A2X" = "x"; then
+ have_a2x="no"
+ build_documentation="no (missing a2x)"
+fi
+AC_SUBST([A2X])
+
+AM_CONDITIONAL([BUILD_DOCUMENTATION], test "x$build_documentation" = "xyes")
+
AC_CONFIG_FILES([Makefile doc/Makefile src/Makefile])
AC_OUTPUT
package version: $PACKAGE_VERSION
build date: `date --utc '+%F %T'` (UTC)
+ Tools:
+ AsciiDoc (a2x): . . . . . . $have_a2x
+ xsltproc: . . . . . . . . . $have_xsltproc
+
+ Features:
+ documentation: . . . . . . $build_documentation
+
This package is maintained by $PACKAGE_MAINTAINER.
Please report bugs to $PACKAGE_BUGREPORT.
diff --git a/doc/Makefile.am b/doc/Makefile.am
index aca1d7e1779484dd8d6efe214d9e70e265114fca..f25dab50678e7b5bee59e079f9a3da38ef414429 100644 (file)
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
fb.1: fb.txt ../version
.txt.1:
- a2x -d manpage -f manpage \
+ @A2X@ -d manpage -f manpage \
-apackage_version=$(PACKAGE_VERSION) \
-abuild_date="$$( date --utc '+%F' )" \
$<