[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] [tor/master] Don't require asciidoc when building Tor from a tarball



Author: Sebastian Hahn <sebastian@xxxxxxxxxxxxxx>
Date: Mon, 8 Mar 2010 21:01:52 +0100
Subject: Don't require asciidoc when building Tor from a tarball
Commit: fca673bcd32e184a520edec2b93bc369c29ffe7d

If asciidoc is required, the user receives an error message telling
them about the --disable-asciidoc configure switch and the build
breaks.
---
 .../build_manpage_from_tarball_without_asciidoc    |    8 ++++++
 configure.in                                       |   12 ----------
 doc/asciidoc-helper.sh                             |   24 +++++++++++++++++++-
 3 files changed, 31 insertions(+), 13 deletions(-)
 create mode 100644 changes/build_manpage_from_tarball_without_asciidoc

diff --git a/changes/build_manpage_from_tarball_without_asciidoc b/changes/build_manpage_from_tarball_without_asciidoc
new file mode 100644
index 0000000..7e7bb56
--- /dev/null
+++ b/changes/build_manpage_from_tarball_without_asciidoc
@@ -0,0 +1,8 @@
+  o Minor bugfixes:
+    - When building the manpage from a tarball, we required asciidoc, even
+      though the asciidoc -> roff/html conversion was already done while
+      building the tarball. We now make it so that make complains when
+      we need asciidoc (either because someone is compiling directly from git,
+      or because they altered the asciidoc manpage in their tarball). Bugfix
+      on 0.2.2.9-alpha.
+
diff --git a/configure.in b/configure.in
index 126bc67..04af241 100644
--- a/configure.in
+++ b/configure.in
@@ -106,18 +106,6 @@ AC_CHECK_PROG([SED],[sed],[sed],[/bin/false])
 dnl check for asciidoc and a2x
 AC_PATH_PROG([ASCIIDOC], [asciidoc], none)
 AC_PATH_PROG([A2X], [a2x], none)
-AC_PATH_PROG([XSLTPROC], [xsltproc], none)
-if test x$asciidoc = xtrue ; then
-   if test x$ASCIIDOC = xnone ; then
-       AC_MSG_ERROR("Couldn't find asciidoc. reconfigure with --disable-asciidoc to build without asciidoc.")
-   fi
-   if test x$A2X = xnone ; then
-       AC_MSG_ERROR("Couldn't find a2x. reconfigure with --disable-asciidoc to build without a2x.")
-   fi
-   if test x$XSLTPROC = xnone ; then
-       AC_MSG_ERROR("Couldn't find xsltproc. reconfigure with --disable-asciidoc to build without xsltproc.")
-   fi
-fi
 
 AM_CONDITIONAL(USE_ASCIIDOC, test x$asciidoc = xtrue)
 
diff --git a/doc/asciidoc-helper.sh b/doc/asciidoc-helper.sh
index d24b319..8e9e5ed 100755
--- a/doc/asciidoc-helper.sh
+++ b/doc/asciidoc-helper.sh
@@ -17,11 +17,32 @@ output=$3
 if [ "$1" = "html" ]; then
     input=${output%%.html.in}.1.txt
     base=${output%%.html.in}
-    "$2" -d manpage -o $output $input;
+    if [ "$2" != none ]; then
+      "$2" -d manpage -o $output $input;
+    else
+      echo "==================================";
+      echo;
+      echo "You need asciidoc installed to be able to build the manpage.";
+      echo "To build without manpages, use the --disable-asciidoc argument";
+      echo "when calling configure.";
+      echo;
+      echo "==================================";
+      exit 1;
+    fi
 elif [ "$1" = "man" ]; then
     input=${output%%.1.in}.1.txt
     base=${output%%.1.in}
     
+    if test "$2" = none; then
+      echo "==================================";
+      echo;
+      echo "You need asciidoc installed to be able to build the manpage.";
+      echo "To build without manpages, use the --disable-asciidoc argument";
+      echo "when calling configure.";
+      echo;
+      echo "==================================";
+      exit 1;
+    fi
     if "$2" -f manpage $input; then
       mv $base.1 $output;
     else
@@ -35,3 +56,4 @@ elif [ "$1" = "man" ]; then
       exit 1;
     fi
 fi
+
-- 
1.6.5