[Spice-devel] [PATCH] Make asciidoc a hard requirement

Eduardo Lima (Etrunko) etrunko at redhat.com
Mon Apr 25 21:23:25 UTC 2016


The problem happens when you run 'make dist' in a system without
asciidoc installed. Even though in configure time there is a check for
building the manual, it is required to be built for distribution.

Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
---
 configure.ac            | 25 ++++++-------------------
 docs/Makefile.am        |  2 --
 docs/manual/Makefile.am |  8 +-------
 3 files changed, 7 insertions(+), 28 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8419508..18b907a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,24 +155,12 @@ if test "x$enable_automated_tests" = "xyes"; then
 fi
 
 
-AC_ARG_ENABLE([manual],
-               AS_HELP_STRING([--enable-manual=@<:@auto/yes/no@:>@],
-                              [Build SPICE manual]),
-               [],
-               [enable_manual="auto"])
-if test "x$enable_manual" != "xno"; then
-    AC_PATH_PROG([ASCIIDOC], [asciidoc])
-    AS_IF([test -z "$ASCIIDOC" && test "x$enable_manual" = "xyes"],
-          [AC_MSG_ERROR([asciidoc is missing and build of manual was requested])])
-    AC_PATH_PROG([A2X], [a2x])
-    AS_IF([test -z "$A2X" && test "x$enable_manual" = "xyes"],
-          [AC_MSG_ERROR([a2x is missing and build of manual was requested])])
-fi
-AS_IF([test -n "$ASCIIDOC"], [have_asciidoc=yes], [have_asciidoc=no])
-AM_CONDITIONAL([BUILD_MANUAL], [test -n "$ASCIIDOC" || test -n "$A2X"])
-AM_CONDITIONAL([BUILD_HTML_MANUAL], [test -n "$ASCIIDOC"])
-AM_CONDITIONAL([BUILD_CHUNKED_MANUAL], [test -n "$A2X"])
-
+AC_PATH_PROG([ASCIIDOC], [asciidoc])
+AS_IF([test -z "$ASCIIDOC"],
+      [AC_MSG_ERROR([asciidoc is missing])])
+AC_PATH_PROG([A2X], [a2x])
+AS_IF([test -z "$A2X"],
+      [AC_MSG_ERROR([a2x is missing])])
 
 dnl ===========================================================================
 dnl check compiler flags
@@ -245,7 +233,6 @@ AC_MSG_NOTICE([
         Smartcard:                ${have_smartcard}
         SASL support:             ${have_sasl}
         Automated tests:          ${enable_automated_tests}
-        Manual:                   ${have_asciidoc}
 
         Now type 'make' to build $PACKAGE
 ])
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 18e785f..e76efaf 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,3 +1 @@
-if BUILD_MANUAL
 SUBDIRS = manual
-endif
diff --git a/docs/manual/Makefile.am b/docs/manual/Makefile.am
index 24a11fe..beda615 100644
--- a/docs/manual/Makefile.am
+++ b/docs/manual/Makefile.am
@@ -16,13 +16,7 @@ EXTRA_DIST =					\
 manual.chunked: manual.txt
 	$(AM_V_GEN) $(A2X) -f chunked -D $(builddir) $(ASCIIDOC_FLAGS) $<
 
-docfiles =
-if BUILD_HTML_MANUAL
-docfiles += manual.html
-endif
-if BUILD_CHUNKED_MANUAL
-docfiles += manual.chunked
-endif
+docfiles = manual.html manual.chunked
 
 all-local: $(docfiles)
 
-- 
2.5.5



More information about the Spice-devel mailing list