2010-01-21 05:28:32 +01: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.
|
|
|
|
|
2010-03-01 03:17:48 +01:00
|
|
|
if USE_ASCIIDOC
|
2010-01-19 14:53:38 +01:00
|
|
|
asciidoc_files = tor tor-gencert tor-resolve torify
|
2010-03-01 03:17:48 +01:00
|
|
|
else
|
|
|
|
asciidoc_files =
|
|
|
|
endif
|
2010-01-18 22:15:38 +01:00
|
|
|
|
2010-07-30 13:54:38 +02:00
|
|
|
html_in = ${asciidoc_files:=.html.in}
|
2010-01-18 22:15:38 +01:00
|
|
|
|
2010-07-30 13:54:38 +02:00
|
|
|
man_in = ${asciidoc_files:=.1.in}
|
2006-03-31 06:23:41 +02:00
|
|
|
|
2010-02-27 16:27:44 +01:00
|
|
|
EXTRA_DIST = HACKING asciidoc-helper.sh \
|
2010-07-30 13:54:38 +02:00
|
|
|
$(html_in) $(man_in) ${asciidoc_files:=.1.txt} \
|
2006-10-07 03:37:23 +02:00
|
|
|
tor-osx-dmg-creation.txt tor-rpm-creation.txt \
|
2010-01-19 04:35:04 +01:00
|
|
|
tor-win32-mingw-creation.txt
|
2003-10-07 18:30:05 +02:00
|
|
|
|
2010-07-30 13:54:38 +02:00
|
|
|
nodist_man_MANS = ${asciidoc_files:=.1}
|
2010-01-18 22:15:38 +01:00
|
|
|
|
2010-01-28 08:59:20 +01:00
|
|
|
docdir = @docdir@
|
|
|
|
|
2010-07-30 13:54:38 +02:00
|
|
|
doc_DATA = ${asciidoc_files:=.html}
|
2010-01-18 22:15:38 +01:00
|
|
|
|
|
|
|
asciidoc_product = $(nodist_man_MANS) $(doc_DATA)
|
2004-08-06 21:54:29 +02:00
|
|
|
|
2010-01-27 21:05:01 +01:00
|
|
|
SUBDIRS = spec
|
2004-08-06 21:54:29 +02:00
|
|
|
|
2010-01-27 20:09:19 +01:00
|
|
|
DIST_SUBDIRS = spec
|
2006-03-31 06:23:41 +02:00
|
|
|
|
2010-01-18 22:15:38 +01:00
|
|
|
# Generate the html documentation from asciidoc, but don't do
|
|
|
|
# machine-specific replacements yet
|
|
|
|
$(html_in) :
|
2010-02-27 17:06:06 +01:00
|
|
|
$(top_srcdir)/doc/asciidoc-helper.sh html @ASCIIDOC@ $(top_srcdir)/doc/$@
|
2010-01-18 22:15:38 +01:00
|
|
|
|
2010-01-19 14:53:38 +01:00
|
|
|
tor.html.in : tor.1.txt
|
2010-01-19 04:35:04 +01:00
|
|
|
torify.html.in : torify.1.txt
|
2010-01-18 08:42:48 +01:00
|
|
|
tor-gencert.html.in : tor-gencert.1.txt
|
2010-01-19 14:51:10 +01:00
|
|
|
tor-resolve.html.in : tor-resolve.1.txt
|
2010-01-18 08:42:48 +01:00
|
|
|
|
2010-01-18 22:15:38 +01:00
|
|
|
# Generate the manpage from asciidoc, but don't do
|
|
|
|
# machine-specific replacements yet
|
|
|
|
$(man_in) :
|
2010-02-27 17:06:06 +01:00
|
|
|
$(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ $(top_srcdir)/doc/$@
|
2010-01-18 22:15:38 +01:00
|
|
|
|
2010-01-19 14:53:38 +01:00
|
|
|
tor.1.in : tor.1.txt
|
2010-01-19 04:35:04 +01:00
|
|
|
torify.1.in : torify.1.txt
|
2010-01-18 08:42:48 +01:00
|
|
|
tor-gencert.1.in : tor-gencert.1.txt
|
2010-01-19 14:51:10 +01:00
|
|
|
tor-resolve.1.in : tor-resolve.1.txt
|
2010-01-18 08:42:48 +01:00
|
|
|
|
2010-01-18 22:15:38 +01:00
|
|
|
# use ../config.status to swap all machine-specific magic strings
|
|
|
|
# in the asciidoc with their replacements.
|
|
|
|
$(asciidoc_product) :
|
2010-01-21 05:32:27 +01:00
|
|
|
if test -e $(top_srcdir)/doc/$@.in && ! test -e ./$@.in ; then \
|
|
|
|
cp $(top_srcdir)/doc/$@.in .; \
|
|
|
|
fi
|
2010-01-18 22:15:38 +01:00
|
|
|
../config.status --file=$@;
|
2010-01-18 08:42:48 +01:00
|
|
|
|
2010-01-19 14:53:38 +01:00
|
|
|
tor.1 : tor.1.in
|
2010-01-19 04:35:04 +01:00
|
|
|
torify.1 : torify.1.in
|
2010-01-18 08:42:48 +01:00
|
|
|
tor-gencert.1 : tor-gencert.1.in
|
2010-01-19 14:51:10 +01:00
|
|
|
tor-resolve.1 : tor-resolve.1.in
|
2010-01-19 14:53:38 +01:00
|
|
|
tor.html : tor.html.in
|
2010-01-19 04:35:04 +01:00
|
|
|
torify.html : torify.html.in
|
2010-01-18 08:42:48 +01:00
|
|
|
tor-gencert.html : tor-gencert.html.in
|
2010-01-19 14:51:10 +01:00
|
|
|
tor-resolve.html : tor-resolve.html.in
|
2010-01-27 20:23:13 +01:00
|
|
|
|
|
|
|
CLEANFILES = $(asciidoc_product)
|
|
|
|
DISTCLEANFILES = $(html_in) $(man_in)
|