bump to 0.2.2.14-alpha-dev
[tor/rransom.git] / doc / Makefile.am
blobe7edb0476bd0db071d6e0ff067d5f1585d59c2e3
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.
16 if USE_ASCIIDOC
17 asciidoc_files = tor tor-gencert tor-resolve torify
18 else
19 asciidoc_files =
20 endif
22 html_in = $(asciidoc_files:=.html.in)
24 man_in = $(asciidoc_files:=.1.in)
26 EXTRA_DIST = HACKING asciidoc-helper.sh                      \
27              $(html_in) $(man_in) $(asciidoc_files:=.1.txt)  \
28              tor-osx-dmg-creation.txt tor-rpm-creation.txt   \
29              tor-win32-mingw-creation.txt
31 nodist_man_MANS = $(asciidoc_files:=.1)
33 docdir = @docdir@
35 doc_DATA = $(asciidoc_files:=.html)
37 asciidoc_product = $(nodist_man_MANS) $(doc_DATA)
39 SUBDIRS = spec
41 DIST_SUBDIRS = spec
43 # Generate the html documentation from asciidoc, but don't do
44 # machine-specific replacements yet
45 $(html_in) :
46         $(top_srcdir)/doc/asciidoc-helper.sh html @ASCIIDOC@ $(top_srcdir)/doc/$@
48 tor.html.in : tor.1.txt
49 torify.html.in : torify.1.txt
50 tor-gencert.html.in : tor-gencert.1.txt
51 tor-resolve.html.in : tor-resolve.1.txt
53 # Generate the manpage from asciidoc, but don't do
54 # machine-specific replacements yet
55 $(man_in) :
56         $(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ $(top_srcdir)/doc/$@
58 tor.1.in : tor.1.txt
59 torify.1.in : torify.1.txt
60 tor-gencert.1.in : tor-gencert.1.txt
61 tor-resolve.1.in : tor-resolve.1.txt
63 # use ../config.status to swap all machine-specific magic strings
64 # in the asciidoc with their replacements.
65 $(asciidoc_product) :
66         if test -e $(top_srcdir)/doc/$@.in && ! test -e ./$@.in ; then \
67                 cp $(top_srcdir)/doc/$@.in .; \
68         fi
69         ../config.status --file=$@;
71 tor.1 : tor.1.in
72 torify.1 : torify.1.in
73 tor-gencert.1 : tor-gencert.1.in
74 tor-resolve.1 : tor-resolve.1.in
75 tor.html : tor.html.in
76 torify.html : torify.html.in
77 tor-gencert.html : tor-gencert.html.in
78 tor-resolve.html : tor-resolve.html.in
80 CLEANFILES = $(asciidoc_product)
81 DISTCLEANFILES = $(html_in) $(man_in)