From 1be4e490fc1259940d1af1c699e9f899c6fa4048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= <ondrej@sury.org> Date: Mon, 11 Jun 2012 13:34:34 +0200 Subject: [PATCH] Conditionally build doc/ dir --- Makefile.am | 2 +- configure.ac | 2 +- doc/Makefile.am | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index b0bf1071a4..a3ae405610 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,2 +1,2 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = src samples @DOC@ +SUBDIRS = src samples doc diff --git a/configure.ac b/configure.ac index e6ee1d8754..630835e2db 100644 --- a/configure.ac +++ b/configure.ac @@ -57,7 +57,7 @@ XMLTO= AS_IF([test "x$with_documentation" != "xno"], [AC_CHECK_PROG([XMLTO], [xmlto], [xmlto], [AC_MSG_ERROR([xmlto needed for building the documentation])]) - AC_SUBST([DOC], [doc]) + AM_CONDITIONAL([build_documentation], [test "x$XMLTO" != "x"]) ]) AC_PROG_YACC diff --git a/doc/Makefile.am b/doc/Makefile.am index b7c4c0635c..942455da44 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -10,8 +10,12 @@ XML_SOURCES=configuration.xml \ security.xml \ troubleshooting.xml +if build_documentation + htmldir = $(prefix)/share/doc/@PACKAGE@ dist_html_DATA = @PACKAGE@.html @PACKAGE@.html: @PACKAGE@.xml $(XML_SOURCES) $(XMLTO) $(XMLTO_FLAGS) html-nochunks @PACKAGE@.xml + +fi -- GitLab