Apply a patch from Gisle Vanem to make tor-gencert build under MSVC
[tor/neena.git] / doc / Makefile.am
blob6cdd66d517ddce26a4b563ba49ff6c84262143ba
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
18 if USE_ASCIIDOC
19 if USE_FW_HELPER
20 nodist_man_MANS = $(all_mans:=.1)
21 doc_DATA = $(all_mans:=.html)
22 else
23 nodist_man_MANS = $(regular_mans:=.1)
24 doc_DATA = $(regular_mans:=.html)
25 endif
26 html_in = $(all_mans:=.html.in)
27 man_in = $(all_mans:=.1.in)
28 txt_in = $(all_mans:=.1.txt)
29 else
30 html_in =
31 man_in =
32 txt_in =
33 nodist_man_MANS =
34 doc_DATA =
35 endif
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        \
41              state-contents.txt
43 docdir = @docdir@
45 asciidoc_product = $(nodist_man_MANS) $(doc_DATA)
47 # Generate the html documentation from asciidoc, but don't do
48 # machine-specific replacements yet
49 $(html_in) :
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
60 $(man_in) :
61         $(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ $(top_srcdir)/doc/$@
63 tor.1.in : tor.1.txt
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.
71 $(asciidoc_product) :
72         if test -e $(top_srcdir)/doc/$@.in && ! test -e ./$@.in ; then \
73                 cp $(top_srcdir)/doc/$@.in .; \
74         fi
75         ../config.status --file=$@;
77 tor.1 : tor.1.in
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)