summaryrefslogtreecommitdiff
path: root/doc/include.am
diff options
context:
space:
mode:
authorStewart Smith <stewart@flamingspork.com>2012-08-02 23:31:43 +1000
committerNick Mathewson <nickm@torproject.org>2012-08-09 11:03:47 -0400
commit2a4a1496241d6c4183763f90600be4775ccb5470 (patch)
tree99ec92b85e229d4e8aee6b90a0f1aede1dad180a /doc/include.am
parentca90aea5ebde66565fbb6fb5d0e88a970d3563a5 (diff)
downloadtor-2a4a1496241d6c4183763f90600be4775ccb5470.tar.gz
tor-2a4a1496241d6c4183763f90600be4775ccb5470.zip
Move to non-recursive make
This gives us a few benefits: 1) make -j clean all this will start working, as it should. It currently doesn't. 2) increased parallel build recursive make will max out at number of files in a directory, non-recursive make doesn't have such a limitation 3) Removal of duplicate information in make files, less error prone I've also slightly updated how we call AM_INIT_AUTOMAKE, as the way that was used was not only deprecated but will be *removed* in the next major automake release (1.13).... so probably best that we can continue to bulid tor without requiring old automake. (see http://www.gnu.org/software/automake/manual/html_node/Public-Macros.html ) For more reasons why, see resources such as: http://miller.emu.id.au/pmiller/books/rmch/
Diffstat (limited to 'doc/include.am')
-rw-r--r--doc/include.am89
1 files changed, 89 insertions, 0 deletions
diff --git a/doc/include.am b/doc/include.am
new file mode 100644
index 0000000000..fca46f22ad
--- /dev/null
+++ b/doc/include.am
@@ -0,0 +1,89 @@
+# 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_man_MANS = $(all_mans:=.1)
+doc_DATA = $(all_mans:=.html)
+else
+nodist_man_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_man_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_man_MANS) $(doc_DATA)
+
+# Generate the html documentation from asciidoc, but don't do
+# machine-specific replacements yet
+$(html_in) :
+ $(AM_V_GEN)$(top_srcdir)/doc/asciidoc-helper.sh html @ASCIIDOC@ $(top_srcdir)/$@
+
+doc/tor.html.in : doc/tor.1.txt
+doc/torify.html.in : doc/torify.1.txt
+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
+
+# Generate the manpage from asciidoc, but don't do
+# machine-specific replacements yet
+$(man_in) :
+ $(AM_V_GEN)$(top_srcdir)/doc/asciidoc-helper.sh man @A2X@ $(top_srcdir)/$@
+
+doc/tor.1.in : doc/tor.1.txt
+doc/torify.1.in : doc/torify.1.txt
+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
+
+# use ../config.status to swap all machine-specific magic strings
+# in the asciidoc with their replacements.
+$(asciidoc_product) :
+ $(AM_V_GEN)if test -e $(top_srcdir)/$@.in && ! test -e $@.in ; then \
+ cp $(top_srcdir)/$@.in doc/.; \
+ fi
+ $(AM_V_GEN)$(top_srcdir)/config.status --file=$@;
+
+doc/tor.1 : doc/tor.1.in
+doc/torify.1 : doc/torify.1.in
+doc/tor-gencert.1 : doc/tor-gencert.1.in
+doc/tor-resolve.1 : doc/tor-resolve.1.in
+doc/tor-fw-helper.1 : doc/tor-fw-helper.1.in
+doc/tor.html : doc/tor.html.in
+doc/torify.html : doc/torify.html.in
+doc/tor-gencert.html : doc/tor-gencert.html.in
+doc/tor-resolve.html : doc/tor-resolve.html.in
+doc/tor-fw-helper.html : doc/tor-fw-helper.html.in
+
+CLEANFILES+= $(asciidoc_product) config.log
+DISTCLEANFILES+= $(html_in) $(man_in)