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.
|
|
|
|
|
2020-07-14 15:02:03 +02:00
|
|
|
all_mans = doc/man/tor doc/man/tor-gencert doc/man/tor-resolve doc/man/torify doc/man/tor-print-ed-signing-cert
|
2014-03-26 17:11:38 +01:00
|
|
|
|
|
|
|
if USE_ASCIIDOC
|
2019-06-16 19:18:30 +02:00
|
|
|
txt_in = $(all_mans:=.1.txt)
|
|
|
|
|
|
|
|
if BUILD_HTML_DOCS
|
2011-06-12 13:55:32 +02:00
|
|
|
html_in = $(all_mans:=.html.in)
|
2019-06-16 19:18:30 +02:00
|
|
|
doc_DATA = $(all_mans:=.html)
|
|
|
|
else
|
|
|
|
html_in =
|
|
|
|
doc_DATA =
|
|
|
|
endif
|
|
|
|
|
|
|
|
if BUILD_MANPAGE
|
|
|
|
nodist_man1_MANS = $(all_mans:=.1)
|
2011-06-12 13:55:32 +02:00
|
|
|
man_in = $(all_mans:=.1.in)
|
2010-03-01 03:17:48 +01:00
|
|
|
else
|
2019-06-16 19:18:30 +02:00
|
|
|
nodist_man1_MANS =
|
|
|
|
man_in =
|
|
|
|
endif
|
|
|
|
|
|
|
|
else
|
|
|
|
|
2010-08-09 21:44:21 +02:00
|
|
|
html_in =
|
2019-06-16 19:18:30 +02:00
|
|
|
doc_DATA =
|
2010-08-09 21:44:21 +02:00
|
|
|
man_in =
|
|
|
|
txt_in =
|
2012-08-23 18:36:31 +02:00
|
|
|
nodist_man1_MANS =
|
2019-06-16 19:18:30 +02:00
|
|
|
|
2010-03-01 03:17:48 +01:00
|
|
|
endif
|
2010-01-18 22:15:38 +01:00
|
|
|
|
2015-10-09 15:28:24 +02:00
|
|
|
EXTRA_DIST+= doc/asciidoc-helper.sh \
|
2018-07-01 15:37:28 +02:00
|
|
|
$(html_in) $(man_in) $(txt_in) \
|
|
|
|
doc/state-contents.txt \
|
|
|
|
doc/torrc_format.txt \
|
2019-11-05 19:04:51 +01:00
|
|
|
doc/tor-doxygen.css \
|
2015-09-03 16:30:54 +02:00
|
|
|
doc/TUNING \
|
2015-10-29 15:30:27 +01:00
|
|
|
doc/HACKING/README.1st.md \
|
|
|
|
doc/HACKING/CodingStandards.md \
|
2018-05-02 20:28:40 +02:00
|
|
|
doc/HACKING/Fuzzing.md \
|
2015-10-29 15:30:27 +01:00
|
|
|
doc/HACKING/GettingStarted.md \
|
|
|
|
doc/HACKING/HelpfulTools.md \
|
|
|
|
doc/HACKING/HowToReview.md \
|
2018-05-02 20:28:40 +02:00
|
|
|
doc/HACKING/Module.md \
|
2022-06-06 17:30:12 +02:00
|
|
|
doc/HACKING/ReleasingTor.md \
|
|
|
|
doc/HACKING/WritingTests.md \
|
|
|
|
doc/HACKING/tracing/EventsCircuit.md \
|
|
|
|
doc/HACKING/tracing/README.md
|
2003-10-07 18:30:05 +02:00
|
|
|
|
2010-01-28 08:59:20 +01:00
|
|
|
docdir = @docdir@
|
|
|
|
|
2012-08-23 18:36:31 +02:00
|
|
|
asciidoc_product = $(nodist_man1_MANS) $(doc_DATA)
|
2004-08-06 21:54:29 +02: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 16:36:42 +02:00
|
|
|
$(html_in) :
|
2012-08-02 15:31:43 +02: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 16:36:42 +02:00
|
|
|
$(man_in) :
|
2012-08-02 15:31:43 +02:00
|
|
|
$(AM_V_GEN)$(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ $(top_srcdir)/$@
|
2010-01-18 22:15:38 +01:00
|
|
|
|
2020-07-14 15:02:03 +02:00
|
|
|
doc/man/tor.1.in: doc/man/tor.1.txt
|
|
|
|
doc/man/torify.1.in: doc/man/torify.1.txt
|
|
|
|
doc/man/tor-gencert.1.in: doc/man/tor-gencert.1.txt
|
|
|
|
doc/man/tor-resolve.1.in: doc/man/tor-resolve.1.txt
|
|
|
|
doc/man/tor-print-ed-signing-cert.1.in: doc/man/tor-print-ed-signing-cert.1.txt
|
2012-09-14 16:36:42 +02:00
|
|
|
|
2020-07-14 15:02:03 +02:00
|
|
|
doc/man/tor.html.in: doc/man/tor.1.txt
|
|
|
|
doc/man/torify.html.in: doc/man/torify.1.txt
|
|
|
|
doc/man/tor-gencert.html.in: doc/man/tor-gencert.1.txt
|
|
|
|
doc/man/tor-resolve.html.in: doc/man/tor-resolve.1.txt
|
|
|
|
doc/man/tor-print-ed-signing-cert.html.in: doc/man/tor-print-ed-signing-cert.1.txt
|
2012-09-14 16:36:42 +02:00
|
|
|
|
2015-02-17 15:36:10 +01:00
|
|
|
# use config.status to swap all machine-specific magic strings
|
2010-01-18 22:15:38 +01:00
|
|
|
# in the asciidoc with their replacements.
|
2012-09-14 16:36:42 +02:00
|
|
|
$(asciidoc_product) :
|
2012-08-27 16:05:02 +02:00
|
|
|
$(AM_V_GEN)$(MKDIR_P) $(@D)
|
|
|
|
$(AM_V_at)if test -e $(top_srcdir)/$@.in && ! test -e $@.in ; then \
|
2012-08-03 03:20:52 +02:00
|
|
|
cp $(top_srcdir)/$@.in $@; \
|
2012-08-27 16:05:02 +02:00
|
|
|
fi
|
2015-02-17 15:36:10 +01:00
|
|
|
$(AM_V_at)$(top_builddir)/config.status -q --file=$@;
|
2010-01-27 20:23:13 +01:00
|
|
|
|
2020-07-14 15:02:03 +02:00
|
|
|
doc/man/tor.html: doc/man/tor.html.in
|
|
|
|
doc/man/tor-gencert.html: doc/man/tor-gencert.html.in
|
|
|
|
doc/man/tor-resolve.html: doc/man/tor-resolve.html.in
|
|
|
|
doc/man/tor-print-ed-signing-cert.html: doc/man/tor-print-ed-signing-cert.html.in
|
|
|
|
doc/man/torify.html: doc/man/torify.html.in
|
|
|
|
|
|
|
|
doc/man/tor.1: doc/man/tor.1.in
|
|
|
|
doc/man/tor-gencert.1: doc/man/tor-gencert.1.in
|
|
|
|
doc/man/tor-resolve.1: doc/man/tor-resolve.1.in
|
|
|
|
doc/man/tor-print-ed-signing-cert.1: doc/man/tor-print-ed-signing-cert.1.in
|
|
|
|
doc/man/torify.1: doc/man/torify.1.in
|
2012-08-23 18:52:33 +02:00
|
|
|
|
2015-12-23 02:46:15 +01:00
|
|
|
CLEANFILES+= $(asciidoc_product)
|
2012-08-02 15:31:43 +02:00
|
|
|
DISTCLEANFILES+= $(html_in) $(man_in)
|