aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2010-03-01 03:17:48 +0100
committerSebastian Hahn <sebastian@torproject.org>2010-03-01 05:02:27 +0100
commit4db5e7ae7698393552c34d2c28180bbefa87fd62 (patch)
tree1b47dcd25ff08f43cea1bc6564219d372106e677
parent0cd1b499b46fa112e0d81e467a0d07f79e04bbdb (diff)
downloadtor-4db5e7ae7698393552c34d2c28180bbefa87fd62.tar
tor-4db5e7ae7698393552c34d2c28180bbefa87fd62.tar.gz
Add configure switch to disable use of asciidoc
Also break the build if that switch isn't used and asciidoc isn't available.
-rw-r--r--ChangeLog6
-rw-r--r--configure.in23
-rw-r--r--doc/Makefile.am4
-rwxr-xr-xdoc/asciidoc-helper.sh34
4 files changed, 40 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index 4b291047a..fa4057248 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -15,6 +15,10 @@ Changes in version 0.2.2.10-alpha - 2010-??-??
circuits now only differ from fast ones in that they can use nodes
not marked with the Fast flag.
+ o Minor features:
+ - Allow disabling building of the manpages. This speeds up the
+ build considerably.
+
o Minor bugfixes:
- Fix a memleak in the EXTENDCIRCUIT logic. Spotted by coverity.
Bugfix on 0.2.2.9-alpha.
@@ -31,6 +35,8 @@ Changes in version 0.2.2.10-alpha - 2010-??-??
- Fix some urls in the exit notice file and make it XHTML1.1 strict
compliant. Based on a patch from Christian Kujau.
- Don't use sed in asciidoc-helper anymore.
+ - Make the build process fail if asciidoc cannot be found, and
+ building with asciidoc isn't disabled.
Changes in version 0.2.2.9-alpha - 2010-02-22
o Directory authority changes:
diff --git a/configure.in b/configure.in
index e045c08b3..6e73a2aad 100644
--- a/configure.in
+++ b/configure.in
@@ -49,6 +49,15 @@ AC_ARG_ENABLE(transparent,
*) AC_MSG_ERROR(bad value for --enable-transparent) ;;
esac], [transparent=true])
+AC_ARG_ENABLE(asciidoc,
+ AS_HELP_STRING(--disable-asciidoc, don't use asciidoc (disables building of manpages)),
+ [case "${enableval}" in
+ yes) asciidoc=true ;;
+ no) asciidoc=false ;;
+ *) AC_MSG_ERROR(bad value for --disable-asciidoc) ;;
+ esac], [asciidoc=true])
+
+
AC_ARG_ENABLE(threads,
AS_HELP_STRING(--disable-threads, disable multi-threading support))
@@ -97,6 +106,20 @@ 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)
AC_PATH_PROG([SHA1SUM], [sha1sum], none)
AC_PATH_PROG([OPENSSL], [openssl], none)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index dbc44f0fb..e7edb0476 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -13,7 +13,11 @@
# part of the source distribution, so that people without asciidoc can
# just use the .1 and .html files.
+if USE_ASCIIDOC
asciidoc_files = tor tor-gencert tor-resolve torify
+else
+asciidoc_files =
+endif
html_in = $(asciidoc_files:=.html.in)
diff --git a/doc/asciidoc-helper.sh b/doc/asciidoc-helper.sh
index 25b438cd8..d24b31918 100755
--- a/doc/asciidoc-helper.sh
+++ b/doc/asciidoc-helper.sh
@@ -17,41 +17,21 @@ output=$3
if [ "$1" = "html" ]; then
input=${output%%.html.in}.1.txt
base=${output%%.html.in}
- if [ "$2" != none ]; then
- "$2" -d manpage -o $output $input;
- else
- echo "==================================";
- echo;
- echo "The manpage in html form for $base will ";
- echo "NOT be available, because asciidoc doesn't appear to be ";
- echo "installed!";
- echo;
- echo "==================================";
- fi
+ "$2" -d manpage -o $output $input;
elif [ "$1" = "man" ]; then
input=${output%%.1.in}.1.txt
base=${output%%.1.in}
- if test "$2" != none; then
- if $2 -f manpage $input; then
- mv $base.1 $output;
- else
- echo "==================================";
- echo;
- echo "a2x is installed, but some required docbook support files are";
- echo "missing. Please install docbook-xsl and docbook-xml (Debian)";
- echo "or similar.";
- echo;
- echo "==================================";
- fi;
+ if "$2" -f manpage $input; then
+ mv $base.1 $output;
else
echo "==================================";
echo;
- echo "The manpage for $base will NOT be ";
- echo "available, because a2x doesn't appear to be installed!";
+ echo "a2x is installed, but some required docbook support files are";
+ echo "missing. Please install docbook-xsl and docbook-xml (Debian)";
+ echo "or similar.";
echo;
echo "==================================";
+ exit 1;
fi
fi
-
-touch $output; \