3 # Copyright (c) The Tor Project, Inc.
4 # See LICENSE for licensing information
5 # Run this to generate .html.in or .1.in files from asciidoc files.
7 # html|man asciidocpath outputfile
15 SOURCE_DATE_EPOCH
="$(git -C "$
(dirname "$0")" show --no-patch --format='%ct')"
16 export SOURCE_DATE_EPOCH
20 if [ "$1" = "html" ]; then
21 input
=${output%%.html.in}.1.txt
22 base
=${output%%.html.in}
24 if [ "$2" != none
]; then
25 TZ
=UTC
"$2" -f "$(dirname "$0")/nofooter.conf" -d manpage
-o "$output" "$input";
27 echo "=================================="
29 echo "You need asciidoc installed to be able to build the manpage."
30 echo "To build without manpages, use the --disable-asciidoc argument"
31 echo "when calling configure."
33 echo "=================================="
36 elif [ "$1" = "man" ]; then
37 input
=${output%%.1.in}.1.txt
40 if test "$2" = none
; then
41 echo "=================================="
43 echo "You need asciidoc installed to be able to build the manpage."
44 echo "To build without manpages, use the --disable-asciidoc argument"
45 echo "when calling configure."
47 echo "=================================="
50 if "$2" -f manpage
"$input"; then
51 mv "$base.1" "$output"
54 ==================================
55 You need a working asciidoc installed to be able to build the manpage.
57 a2x is installed, but for some reason it isn't working. Sometimes
58 this happens because required docbook support files are missing.
59 Please install docbook-xsl, docbook-xml, and xmlto (Debian) or
60 similar. If you use homebrew on Mac OS X, install the docbook formula
61 and add "export XML_CATALOG_FILES=/usr/local/etc/xml/catalog" to your
64 Alternatively, to build without manpages, use the --disable-asciidoc
65 argument when calling configure.
66 ==================================