chiark / gitweb /
Build: Fix construction of manual pages.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 30 Dec 2008 15:01:50 +0000 (15:01 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 1 Jan 2009 23:57:00 +0000 (23:57 +0000)
Firstly, there was a bug in vars.am: the suffix rule used to construct
manpages was broken because suffix rules aren't allowed to have
dependencies of their own.  So purge defs.man.in (we now just have
defs.man) and confsubst the entire manpage each time.

Secondly, in preparation for new manpages for services, consolidate the
summary-building machinery into vars.am.  The server makefile no longer
needs a special case for tripe-admin.8.

To keep things tidy, defs.man and make-summary have been stashed in
common.  This seems as good a place as any.

18 files changed:
Makefile.am
client/tripectl.1.in
common/Makefile.am
common/defs.man [moved from defs.man.in with 100% similarity]
common/make-summary [moved from server/make-summary with 100% similarity]
keys/tripe-keys.8.in
keys/tripe-keys.conf.5.in
maint-utils/manfix
mon/tripemon.1.in
pathmtu/pathmtu.1.in
pkstream/pkstream.1.in
priv/tripe-privhelper.8.in
proxy/tripe-mitm.8.in
server/Makefile.am
server/tripe-admin.5.in
server/tripe.8.in
uslip/tripe-uslip.1.in
vars.am

index ce25e3704a9b3158aec6c51c6c44ba647b710549..a36afeb8f7370451aaa343e9888fc8a31b804caf 100644 (file)
@@ -89,10 +89,6 @@ DISTCHECK_CONFIGURE_FLAGS = \
 dist-hook::
        echo $(VERSION) >$(distdir)/RELEASE
 
 dist-hook::
        echo $(VERSION) >$(distdir)/RELEASE
 
-## Manual page preamble.
-EXTRA_DIST             += defs.man.in
-CLEANFILES             += defs.man
-
 ## Additional build tools.
 EXTRA_DIST             += config/confsubst
 EXTRA_DIST             += config/auto-version
 ## Additional build tools.
 EXTRA_DIST             += config/confsubst
 EXTRA_DIST             += config/auto-version
index 0724b8a6dc492882984bc54317dede6c349f34f7..d517f9bc776d10e8655da74b9f9834d49dd4b6b4 100644 (file)
@@ -24,7 +24,7 @@
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
-.so ../defs.man.in \" @@@PRE@@@
+.so ../common/defs.man \" @@@PRE@@@
 .
 .\"--------------------------------------------------------------------------
 .TH tripectl 1 "19 February 2001" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
 .
 .\"--------------------------------------------------------------------------
 .TH tripectl 1 "19 February 2001" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
index 27ba69417d324278a4db30c924237c9ac5231e6d..1aa4ae1e5ebab0660883abd587fb585d264211db 100644 (file)
@@ -39,4 +39,14 @@ libtripe_a_SOURCES   += slip.h
 ## Miscellaneous utilties.
 libtripe_a_SOURCES     += util.c util.h
 
 ## Miscellaneous utilties.
 libtripe_a_SOURCES     += util.c util.h
 
+###--------------------------------------------------------------------------
+### Documentation.
+
+## Standard manpage preamble.
+EXTRA_DIST             += defs.man
+
+## Utility for building summary tables.
+EXTRA_DIST             += make-summary
+
 ###----- That's all, folks --------------------------------------------------
 ###----- That's all, folks --------------------------------------------------
+
similarity index 100%
rename from defs.man.in
rename to common/defs.man
similarity index 100%
rename from server/make-summary
rename to common/make-summary
index ce3c1ec1eeebd25ee1727cb29e81357464a13366..146eb7a692fa1298c3e725231db63e550627457d 100644 (file)
@@ -24,7 +24,7 @@
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
-.so ../defs.man.in \" @@@PRE@@@
+.so ../common/defs.man \" @@@PRE@@@
 .
 .\"--------------------------------------------------------------------------
 .TH tripe-keys 8 "14 September 2005" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
 .
 .\"--------------------------------------------------------------------------
 .TH tripe-keys 8 "14 September 2005" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
index ad3173d3df4ac6dfc4019ffe30bdf512ffeeba02..887faf67090936393b67012805e9141ff157890d 100644 (file)
@@ -24,7 +24,7 @@
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
-.so ../defs.man.in \" @@@PRE@@@
+.so ../common/defs.man \" @@@PRE@@@
 .
 .\"--------------------------------------------------------------------------
 .TH tripe-keys.conf 5 "14 September 2005" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
 .
 .\"--------------------------------------------------------------------------
 .TH tripe-keys.conf 5 "14 September 2005" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
index fb36848a876688ab4ca7fcf06bddd6adb244f51d..42930a6c25c11bd57125deda65bd7bb1086898b4 100755 (executable)
@@ -28,7 +28,7 @@
 .\\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\
 .\
 .\\"--------------------------------------------------------------------------\
 .\\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\
 .\
 .\\"--------------------------------------------------------------------------\
-.so ../defs.man.in \\"@@@PRE@@@\
+.so ../common/defs.man \\"@@@PRE@@@\
 .\
 .\\"--------------------------------------------------------------------------
   p
 .\
 .\\"--------------------------------------------------------------------------
   p
index 4a795e048bb35cc30b6b7c919cfee7d10a281dd7..125a622120956fba78a2943a25dacf4e4841a732 100644 (file)
@@ -24,7 +24,7 @@
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
-.so ../defs.man.in \" @@@PRE@@@
+.so ../common/defs.man \" @@@PRE@@@
 .
 .\"--------------------------------------------------------------------------
 .TH tripemon 1 "4 October 2005" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
 .
 .\"--------------------------------------------------------------------------
 .TH tripemon 1 "4 October 2005" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
index 364526bc69716eb99bbd6258c64a8d13b26a6535..aca6bd20fb8e2b9a0f976728afbb2fef86d86601 100644 (file)
@@ -24,7 +24,7 @@
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
-.so ../defs.man.in \" @@@PRE@@@
+.so ../common/defs.man \" @@@PRE@@@
 .
 .\"--------------------------------------------------------------------------
 .TH pathmtu 1 "29 December 2008" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
 .
 .\"--------------------------------------------------------------------------
 .TH pathmtu 1 "29 December 2008" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
index b8a6c9d5f3644165f83d79c887da0cda8c0c2c15..e732cbf21c8e601c601f86c9cd904ffaacb12f90 100644 (file)
@@ -24,7 +24,7 @@
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
-.so ../defs.man.in \" @@@PRE@@@
+.so ../common/defs.man \" @@@PRE@@@
 .
 .\"--------------------------------------------------------------------------
 .TH pkstream 1 "23 April 2003" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
 .
 .\"--------------------------------------------------------------------------
 .TH pkstream 1 "23 April 2003" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
index ea4a43fd782918563c2c98452fe87f00b780905f..0d7d50d6d142b75ccd0d82dbd88438623ef07d2d 100644 (file)
@@ -24,7 +24,7 @@
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
-.so ../defs.man.in \" @@@PRE@@@
+.so ../common/defs.man \" @@@PRE@@@
 .
 .\"--------------------------------------------------------------------------
 .TH tripe-privhelper 8 "28 April 2008" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
 .
 .\"--------------------------------------------------------------------------
 .TH tripe-privhelper 8 "28 April 2008" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
index 5f970f24b00dbe2ec10abed6fef7ae1965ce7f2d..38062a0d9c018c3b0fa8a94be5fd78008c6a9b30 100644 (file)
@@ -24,7 +24,7 @@
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
-.so ../defs.man.in \" @@@PRE@@@
+.so ../common/defs.man \" @@@PRE@@@
 .
 .\"--------------------------------------------------------------------------
 .TH tripe-mitm 8 "14 October 2003" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
 .
 .\"--------------------------------------------------------------------------
 .TH tripe-mitm 8 "14 October 2003" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
index e54b79789bdb3eb7c614c6fdf3759817c7db926e..b6df428049a3dc880d930ad575a929c0f82da36b 100644 (file)
@@ -68,10 +68,4 @@ man_MANS             += tripe-admin.5
 CLEANFILES             += tripe-admin.5
 EXTRA_DIST             += tripe-admin.5.in make-summary
 
 CLEANFILES             += tripe-admin.5
 EXTRA_DIST             += tripe-admin.5.in make-summary
 
-tripe-admin.5: tripe-admin.5.in make-summary $(mandefs)
-       awk -f $(srcdir)/make-summary <$(srcdir)/tripe-admin.5.in >$@.tmp
-       $(mansubst) $@.tmp >$@.new
-       rm -f $@.tmp
-       mv $@.new $@
-
 ###----- That's all, folks --------------------------------------------------
 ###----- That's all, folks --------------------------------------------------
index 0502372967e092f3cf8b0dbc3068cec85eb6c9c4..6901dc4130de409a71956b75332ca76dcc560573 100644 (file)
@@ -24,7 +24,7 @@
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
-.so ../defs.man.in \" @@@PRE@@@
+.so ../common/defs.man \" @@@PRE@@@
 .
 .\"--------------------------------------------------------------------------
 .TH tripe-admin 5 "18 February 2001" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
 .
 .\"--------------------------------------------------------------------------
 .TH tripe-admin 5 "18 February 2001" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
index dab23e3bbcdb9f99494174b2fada66aa592dc2d3..ad71bc918b7e1adbfa571738f09621411d42e03b 100644 (file)
@@ -24,7 +24,7 @@
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
-.so ../defs.man.in \" @@@PRE@@@
+.so ../common/defs.man \" @@@PRE@@@
 .
 .\"--------------------------------------------------------------------------
 .TH tripe 8 "10 February 2001" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
 .
 .\"--------------------------------------------------------------------------
 .TH tripe 8 "10 February 2001" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
index 47268f4e13fc746851f9683fcf55088ae493e41d..b607c39466134379003e35314725b35524e1c0d3 100644 (file)
@@ -24,7 +24,7 @@
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
 .\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 .
 .\"--------------------------------------------------------------------------
-.so ../defs.man.in \" @@@PRE@@@
+.so ../common/defs.man \" @@@PRE@@@
 .
 .\"--------------------------------------------------------------------------
 .TH tripe-uslip 1 "7 April 2008" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
 .
 .\"--------------------------------------------------------------------------
 .TH tripe-uslip 1 "7 April 2008" "Straylight/Edgeware" "TrIPE: Trivial IP Encryption"
diff --git a/vars.am b/vars.am
index 6eb59dbf71c205414fc81971f97c6cf326dc7cfa..245b98e72bdba033936c1605e13e84b2a3f5d66c 100644 (file)
--- a/vars.am
+++ b/vars.am
@@ -78,21 +78,14 @@ SUFFIXES            += .5 .5.in
 SUFFIXES               += .7 .7.in
 SUFFIXES               += .8 .8.in
 
 SUFFIXES               += .7 .7.in
 SUFFIXES               += .8 .8.in
 
-mandefs = $(top_builddir)/defs.man
-
-mansubst = sed \
-       -e '/@@@PRE@@@/ {' \
-       -e   'r$(mandefs)' \
-       -e   'd' \
-       -e '}'
-
-.1.in.1 .5.in.5 .7.in.7 .8.in.8: $(mandefs)
-       $(mansubst) $< >$@.new && mv $@.new $@
-
-$(mandefs): $(top_srcdir)/defs.man.in Makefile
-       $(confsubst) $(top_srcdir)/defs.man.in >$@.new $(SUBSTITUTIONS)
-       sed '/^\.$$/ d; /^\.\\"/ d' $@.new >$@.new2
-       rm -f $@.new
-       mv $@.new2 $@
+mandefs = $(top_srcdir)/common/defs.man
+makesummary = $(top_srcdir)/common/make-summary
+
+.1.in.1 .5.in.5 .7.in.7 .8.in.8:
+       sed '/^\.$$/ d; /^\.\\"/ d' $(mandefs) >$@.defs
+       sed -e '/@@@PRE@@@/ {' -e 'r$@.defs' -e 'd' -e '}' $< >$@.merge
+       $(confsubst) $@.merge >$@.subst $(SUBSTITUTIONS)
+       awk -f $(makesummary) $@.subst >$@.new
+       rm -f $@.defs $@.merge $@.subst && mv $@.new $@
 
 ###----- That's all, folks --------------------------------------------------
 
 ###----- That's all, folks --------------------------------------------------