diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-03-04 23:30:53 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-03-04 23:30:53 -0500 |
commit | 871974876757f40be7d8056a3f457f0eae2398d9 (patch) | |
tree | f1dcf6fe48cc828aaf561f51179d31233c91b77c /doc | |
parent | eb2e56ad3c469eeee38b63902361e86585da8c7c (diff) | |
parent | 4db5e7ae7698393552c34d2c28180bbefa87fd62 (diff) | |
download | tor-871974876757f40be7d8056a3f457f0eae2398d9.tar.gz tor-871974876757f40be7d8056a3f457f0eae2398d9.zip |
Merge commit 'sebastian/manpage'
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile.am | 10 | ||||
-rwxr-xr-x | doc/asciidoc-helper.sh | 47 |
2 files changed, 22 insertions, 35 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index 492dd3bd51..e7edb0476b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -13,13 +13,17 @@ # 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) man_in = $(asciidoc_files:=.1.in) -EXTRA_DIST = HACKING \ +EXTRA_DIST = HACKING asciidoc-helper.sh \ $(html_in) $(man_in) $(asciidoc_files:=.1.txt) \ tor-osx-dmg-creation.txt tor-rpm-creation.txt \ tor-win32-mingw-creation.txt @@ -39,7 +43,7 @@ DIST_SUBDIRS = spec # Generate the html documentation from asciidoc, but don't do # machine-specific replacements yet $(html_in) : - $(top_srcdir)/doc/asciidoc-helper.sh html @ASCIIDOC@ @SED@ $(top_srcdir)/doc/$@ + $(top_srcdir)/doc/asciidoc-helper.sh html @ASCIIDOC@ $(top_srcdir)/doc/$@ tor.html.in : tor.1.txt torify.html.in : torify.1.txt @@ -49,7 +53,7 @@ tor-resolve.html.in : tor-resolve.1.txt # Generate the manpage from asciidoc, but don't do # machine-specific replacements yet $(man_in) : - $(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ @SED@ $(top_srcdir)/doc/$@ + $(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ $(top_srcdir)/doc/$@ tor.1.in : tor.1.txt torify.1.in : torify.1.txt diff --git a/doc/asciidoc-helper.sh b/doc/asciidoc-helper.sh index 90a003d496..d24b31918c 100755 --- a/doc/asciidoc-helper.sh +++ b/doc/asciidoc-helper.sh @@ -4,51 +4,34 @@ # See LICENSE for licensing information # Run this to generate .html.in or .1.in files from asciidoc files. # Arguments: -# html|man asciidocpath sedpath outputfile +# html|man asciidocpath outputfile set -e -if [ $# != 4 ]; then +if [ $# != 3 ]; then exit 1; fi -output=$4 -input=`echo $output | $3 -e 's/html\.in$/1\.txt/g' -e 's/1\.in$/1\.txt/g'` -base=`echo $output | $3 -e 's/\.html\.in$//g' -e 's/\.1\.in$//g'` +output=$3 if [ "$1" = "html" ]; then - 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 + input=${output%%.html.in}.1.txt + base=${output%%.html.in} + "$2" -d manpage -o $output $input; elif [ "$1" = "man" ]; then - 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; + input=${output%%.1.in}.1.txt + base=${output%%.1.in} + + 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; \ |