2 # We use a two-step process to generate documentation from asciidoc files.
4 # First, we use asciidoc/a2x to process the asciidoc files into .1.in and
5 # .html.in files (see the asciidoc-helper.sh script). These are the same as
6 # the regular .1 and .html files, except that they still have some autoconf
7 # variables set in them.
9 # Second, we use config.status to turn .1.in files into .1 files and
10 # .html.in files into .html files.
12 # We do the steps in this order so that we can ship the .*.in files as
13 # part of the source distribution, so that people without asciidoc can
14 # just use the .1 and .html files.
17 asciidoc_files = tor tor-gencert tor-resolve torify
18 html_in = $(asciidoc_files:=.html.in)
19 man_in = $(asciidoc_files:=.1.in)
20 txt_in = $(asciidoc_files:=.1.txt)
21 nodist_man_MANS = $(asciidoc_files:=.1)
22 doc_DATA = $(asciidoc_files:=.html)
32 EXTRA_DIST = HACKING asciidoc-helper.sh \
33 $(html_in) $(man_in) $(txt_in) \
34 tor-rpm-creation.txt \
35 tor-win32-mingw-creation.txt
39 asciidoc_product = $(nodist_man_MANS) $(doc_DATA)
45 # Generate the html documentation from asciidoc, but don't do
46 # machine-specific replacements yet
48 $(top_srcdir)/doc/asciidoc-helper.sh html @ASCIIDOC@ $(top_srcdir)/doc/$@
50 tor.html.in : tor.1.txt
51 torify.html.in : torify.1.txt
52 tor-gencert.html.in : tor-gencert.1.txt
53 tor-resolve.html.in : tor-resolve.1.txt
55 # Generate the manpage from asciidoc, but don't do
56 # machine-specific replacements yet
58 $(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ $(top_srcdir)/doc/$@
61 torify.1.in : torify.1.txt
62 tor-gencert.1.in : tor-gencert.1.txt
63 tor-resolve.1.in : tor-resolve.1.txt
65 # use ../config.status to swap all machine-specific magic strings
66 # in the asciidoc with their replacements.
68 if test -e $(top_srcdir)/doc/$@.in && ! test -e ./$@.in ; then \
69 cp $(top_srcdir)/doc/$@.in .; \
71 ../config.status --file=$@;
74 torify.1 : torify.1.in
75 tor-gencert.1 : tor-gencert.1.in
76 tor-resolve.1 : tor-resolve.1.in
77 tor.html : tor.html.in
78 torify.html : torify.html.in
79 tor-gencert.html : tor-gencert.html.in
80 tor-resolve.html : tor-resolve.html.in
82 CLEANFILES = $(asciidoc_product) config.log
83 DISTCLEANFILES = $(html_in) $(man_in)