blob: 011cc7fd0d6c40a6e9447a99dca708f88e416fa8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# We use a two-step process to generate documentation from asciidoc files.
#
# First, we use asciidoc/a2x to process the asciidoc files into .1.in and
# .html.in files (see the asciidoc-helper.sh script). These are the same as
# the regular .1 and .html files, except that they still have some autoconf
# variables set in them.
#
# Second, we use config.status to turn .1.in files into .1 files and
# .html.in files into .html files.
#
# We do the steps in this order so that we can ship the .*.in files as
# part of the source distribution, so that people without asciidoc can
# just use the .1 and .html files.
regular_mans = doc/tor doc/tor-gencert doc/tor-resolve doc/torify
all_mans = $(regular_mans) doc/tor-fw-helper
if USE_ASCIIDOC
if USE_FW_HELPER
nodist_man1_MANS = $(all_mans:=.1)
doc_DATA = $(all_mans:=.html)
else
nodist_man1_MANS = $(regular_mans:=.1)
doc_DATA = $(regular_mans:=.html)
endif
html_in = $(all_mans:=.html.in)
man_in = $(all_mans:=.1.in)
txt_in = $(all_mans:=.1.txt)
else
html_in =
man_in =
txt_in =
nodist_man1_MANS =
doc_DATA =
endif
EXTRA_DIST+= doc/HACKING doc/asciidoc-helper.sh \
$(html_in) $(man_in) $(txt_in) \
doc/tor-rpm-creation.txt \
doc/tor-win32-mingw-creation.txt doc/spec/README \
doc/state-contents.txt
docdir = @docdir@
asciidoc_product = $(nodist_man1_MANS) $(doc_DATA)
# Generate the html documentation from asciidoc, but don't do
# machine-specific replacements yet
$(html_in) : $(txt_in)
$(AM_V_GEN)$(top_srcdir)/doc/asciidoc-helper.sh html @ASCIIDOC@ $(top_srcdir)/$@
# Generate the manpage from asciidoc, but don't do
# machine-specific replacements yet
$(man_in) : $(txt_in)
$(AM_V_GEN)$(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ $(top_srcdir)/$@
# use ../config.status to swap all machine-specific magic strings
# in the asciidoc with their replacements.
$(asciidoc_product) : $(txt_in) $(man_in)
$(MKDIR_P) $(@D)
$(AM_V_GEN)if test -e $(top_srcdir)/$@.in && ! test -e $@.in ; then \
cp $(top_srcdir)/$@.in $@; \
fi
$(AM_V_GEN)./config.status --file=$@;
CLEANFILES+= $(asciidoc_product) config.log
DISTCLEANFILES+= $(html_in) $(man_in)
|