2010-01-20 23:28:32 -05:00
|
|
|
# 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.
|
|
|
|
|
2014-03-26 12:11:38 -04:00
|
|
|
base_mans = doc/tor doc/tor-gencert doc/tor-resolve doc/torify
|
|
|
|
all_mans = $(base_mans) doc/tor-fw-helper
|
2010-09-30 22:44:11 +02:00
|
|
|
if USE_FW_HELPER
|
2014-03-26 12:11:38 -04:00
|
|
|
install_mans = $(all_mans)
|
2010-09-30 22:44:11 +02:00
|
|
|
else
|
2014-03-26 12:11:38 -04:00
|
|
|
install_mans = $(base_mans)
|
2010-09-30 22:44:11 +02:00
|
|
|
endif
|
2014-03-26 12:11:38 -04:00
|
|
|
|
|
|
|
if USE_ASCIIDOC
|
|
|
|
nodist_man1_MANS = $(install_mans:=.1)
|
|
|
|
doc_DATA = $(install_mans:=.html)
|
2011-06-12 13:55:32 +02:00
|
|
|
html_in = $(all_mans:=.html.in)
|
|
|
|
man_in = $(all_mans:=.1.in)
|
|
|
|
txt_in = $(all_mans:=.1.txt)
|
2010-03-01 03:17:48 +01:00
|
|
|
else
|
2010-08-09 21:44:21 +02:00
|
|
|
html_in =
|
|
|
|
man_in =
|
|
|
|
txt_in =
|
2012-08-23 12:36:31 -04:00
|
|
|
nodist_man1_MANS =
|
2010-08-09 21:44:21 +02:00
|
|
|
doc_DATA =
|
2010-03-01 03:17:48 +01:00
|
|
|
endif
|
2010-01-18 22:15:38 +01:00
|
|
|
|
2012-08-02 23:31:43 +10:00
|
|
|
EXTRA_DIST+= doc/HACKING doc/asciidoc-helper.sh \
|
|
|
|
$(html_in) $(man_in) $(txt_in) \
|
|
|
|
doc/state-contents.txt
|
2003-10-07 16:30:05 +00:00
|
|
|
|
2010-01-28 08:59:20 +01:00
|
|
|
docdir = @docdir@
|
|
|
|
|
2012-08-23 12:36:31 -04:00
|
|
|
asciidoc_product = $(nodist_man1_MANS) $(doc_DATA)
|
2004-08-06 19:54:29 +00:00
|
|
|
|
2010-01-18 22:15:38 +01:00
|
|
|
# Generate the html documentation from asciidoc, but don't do
|
|
|
|
# machine-specific replacements yet
|
2012-09-14 10:36:42 -04:00
|
|
|
$(html_in) :
|
2012-08-02 23:31:43 +10:00
|
|
|
$(AM_V_GEN)$(top_srcdir)/doc/asciidoc-helper.sh html @ASCIIDOC@ $(top_srcdir)/$@
|
2010-01-18 22:15:38 +01:00
|
|
|
|
|
|
|
# Generate the manpage from asciidoc, but don't do
|
|
|
|
# machine-specific replacements yet
|
2012-09-14 10:36:42 -04:00
|
|
|
$(man_in) :
|
2012-08-02 23:31:43 +10:00
|
|
|
$(AM_V_GEN)$(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ $(top_srcdir)/$@
|
2010-01-18 22:15:38 +01:00
|
|
|
|
2012-09-14 10:36:42 -04:00
|
|
|
doc/tor.1.in: doc/tor.1.txt
|
2014-03-26 12:11:38 -04:00
|
|
|
doc/torify.1.in: doc/torify.1.txt
|
2012-09-14 10:36:42 -04:00
|
|
|
doc/tor-gencert.1.in: doc/tor-gencert.1.txt
|
|
|
|
doc/tor-resolve.1.in: doc/tor-resolve.1.txt
|
|
|
|
doc/tor-fw-helper.1.in: doc/tor-fw-helper.1.txt
|
|
|
|
|
|
|
|
doc/tor.html.in: doc/tor.1.txt
|
2014-03-26 12:11:38 -04:00
|
|
|
doc/torify.html.in: doc/torify.1.txt
|
2012-09-14 10:36:42 -04:00
|
|
|
doc/tor-gencert.html.in: doc/tor-gencert.1.txt
|
|
|
|
doc/tor-resolve.html.in: doc/tor-resolve.1.txt
|
|
|
|
doc/tor-fw-helper.html.in: doc/tor-fw-helper.1.txt
|
|
|
|
|
2010-01-18 22:15:38 +01:00
|
|
|
# use ../config.status to swap all machine-specific magic strings
|
|
|
|
# in the asciidoc with their replacements.
|
2012-09-14 10:36:42 -04:00
|
|
|
$(asciidoc_product) :
|
2012-08-27 10:05:02 -04:00
|
|
|
$(AM_V_GEN)$(MKDIR_P) $(@D)
|
|
|
|
$(AM_V_at)if test -e $(top_srcdir)/$@.in && ! test -e $@.in ; then \
|
2012-08-03 11:20:52 +10:00
|
|
|
cp $(top_srcdir)/$@.in $@; \
|
2012-08-27 10:05:02 -04:00
|
|
|
fi
|
|
|
|
$(AM_V_at)./config.status -q --file=$@;
|
2010-01-27 20:23:13 +01:00
|
|
|
|
2012-09-14 10:36:42 -04:00
|
|
|
doc/tor.html: doc/tor.html.in
|
|
|
|
doc/tor-gencert.html: doc/tor-gencert.html.in
|
|
|
|
doc/tor-resolve.html: doc/tor-resolve.html.in
|
2014-03-26 12:11:38 -04:00
|
|
|
doc/torify.html: doc/torify.html.in
|
2012-09-14 10:36:42 -04:00
|
|
|
doc/tor-fw-helper.html: doc/tor-fw-helper.html.in
|
|
|
|
|
|
|
|
doc/tor.1: doc/tor.1.in
|
|
|
|
doc/tor-gencert.1: doc/tor-gencert.1.in
|
|
|
|
doc/tor-resolve.1: doc/tor-resolve.1.in
|
2014-03-26 12:11:38 -04:00
|
|
|
doc/torify.1: doc/torify.1.in
|
2012-09-14 10:36:42 -04:00
|
|
|
doc/tor-fw-helper.1: doc/tor-fw-helper.1.in
|
2012-08-23 12:52:33 -04:00
|
|
|
|
2012-08-02 23:31:43 +10:00
|
|
|
CLEANFILES+= $(asciidoc_product) config.log
|
|
|
|
DISTCLEANFILES+= $(html_in) $(man_in)
|