1 # We use a two-step process to generate documentation from asciidoc files.
3 # First, we use asciidoc/a2x to process the asciidoc files into .1.in and
4 # .html.in files (see the asciidoc-helper.sh script). These are the same as
5 # the regular .1 and .html files, except that they still have some autoconf
6 # variables set in them.
8 # Second, we use config.status to turn .1.in files into .1 files and
9 # .html.in files into .html files.
11 # We do the steps in this order so that we can ship the .*.in files as
12 # part of the source distribution, so that people without asciidoc can
13 # just use the .1 and .html files.
15 regular_mans = tor tor-gencert tor-resolve torify
16 all_mans = $(regular_mans) tor-fw-helper
20 nodist_man_MANS = $(all_mans:=.1)
21 doc_DATA = $(all_mans:=.html)
23 nodist_man_MANS = $(regular_mans:=.1)
24 doc_DATA = $(regular_mans:=.html)
26 html_in = $(all_mans:=.html.in)
27 man_in = $(all_mans:=.1.in)
28 txt_in = $(all_mans:=.1.txt)
37 EXTRA_DIST = HACKING asciidoc-helper.sh \
38 $(html_in) $(man_in) $(txt_in) \
39 tor-rpm-creation.txt \
40 tor-win32-mingw-creation.txt spec/README \
45 asciidoc_product = $(nodist_man_MANS) $(doc_DATA)
47 # Generate the html documentation from asciidoc, but don't do
48 # machine-specific replacements yet
50 $(top_srcdir)/doc/asciidoc-helper.sh html @ASCIIDOC@ $(top_srcdir)/doc/$@
52 tor.html.in : tor.1.txt
53 torify.html.in : torify.1.txt
54 tor-gencert.html.in : tor-gencert.1.txt
55 tor-resolve.html.in : tor-resolve.1.txt
56 tor-fw-helper.html.in : tor-fw-helper.1.txt
58 # Generate the manpage from asciidoc, but don't do
59 # machine-specific replacements yet
61 $(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ $(top_srcdir)/doc/$@
64 torify.1.in : torify.1.txt
65 tor-gencert.1.in : tor-gencert.1.txt
66 tor-resolve.1.in : tor-resolve.1.txt
67 tor-fw-helper.1.in : tor-fw-helper.1.txt
69 # use ../config.status to swap all machine-specific magic strings
70 # in the asciidoc with their replacements.
72 if test -e $(top_srcdir)/doc/$@.in && ! test -e ./$@.in ; then \
73 cp $(top_srcdir)/doc/$@.in .; \
75 ../config.status --file=$@;
78 torify.1 : torify.1.in
79 tor-gencert.1 : tor-gencert.1.in
80 tor-resolve.1 : tor-resolve.1.in
81 tor-fw-helper.1 : tor-fw-helper.1.in
82 tor.html : tor.html.in
83 torify.html : torify.html.in
84 tor-gencert.html : tor-gencert.html.in
85 tor-resolve.html : tor-resolve.html.in
86 tor-fw-helper.html : tor-fw-helper.html.in
88 CLEANFILES = $(asciidoc_product) config.log
89 DISTCLEANFILES = $(html_in) $(man_in)