From 285850edc43f05ab7de620612d1ef4b12d6c06d4 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 12 Dec 2014 10:01:53 -0700 Subject: [PATCH] doc: Configure --disable-* should disable build as well as install. Add a TARGETS variable to collect ENabled targets, like INST_TARGETS. --- doc/configure.ac | 5 +++++ doc/make-common.in | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/configure.ac b/doc/configure.ac index 36b234bd8..8af9794fa 100644 --- a/doc/configure.ac +++ b/doc/configure.ac @@ -38,6 +38,7 @@ then INSTALL="${INSTALL} --preserve-timestamps" fi +TARGETS= INST_TARGETS= AC_ARG_ENABLE([html], @@ -49,6 +50,7 @@ elif test "${enable_html}" = "no"; then else htmldir="${enable_html}" fi +test "${htmldir}" = "" || TARGETS="${TARGETS} \$(TARGET_ROOT)/index.html" test "${htmldir}" = "" || INST_TARGETS="${INST_TARGETS} install-html" AC_SUBST([htmldir]) @@ -61,6 +63,7 @@ elif test "${enable_pdf}" = "no"; then else pdfdir="${enable_pdf}" fi +test "${pdfdir}" = "" || TARGETS="${TARGETS} \$(TARGET_ROOT).pdf" test "${pdfdir}" = "" || INST_TARGETS="${INST_TARGETS} install-pdf" AC_SUBST([pdfdir]) @@ -73,9 +76,11 @@ elif test "${enable_ps}" = "no"; then else psdir="${enable_ps}" fi +test "${psdir}" = "" || TARGETS="${TARGETS} \$(TARGET_ROOT).ps" test "${psdir}" = "" || INST_TARGETS="${INST_TARGETS} install-ps" AC_SUBST([psdir]) +AC_SUBST([TARGETS]) AC_SUBST([INST_TARGETS]) AC_CONFIG_FILES([ diff --git a/doc/make-common.in b/doc/make-common.in index 0a689eee5..81f64b945 100644 --- a/doc/make-common.in +++ b/doc/make-common.in @@ -60,6 +60,7 @@ htmldir = @htmldir@ pdfdir = @pdfdir@ psdir = @psdir@ +TARGETS = @TARGETS@ INST_TARGETS = @INST_TARGETS@ INFO_TARGET = $(TARGET_ROOT).info @@ -70,7 +71,7 @@ PS_TARGET = $(TARGET_ROOT).ps TEX_OPTIONS = --quiet $(EXTRA_TEX_OPTIONS) -all: $(INFO_TARGET) $(HTML_TARGET)/index.html $(PDF_TARGET) $(PS_TARGET) +all: $(INFO_TARGET) $(TARGETS) $(INFO_TARGET): $(SOURCES) rm -f $(INFO_TARGET)* -- 2.25.1