chiark / gitweb /
server: Option `-F' to run the server in the `foreground'.
[tripe] / vars.am
diff --git a/vars.am b/vars.am
index 4c2b81580fc7f7e4dc2e013e0890ec36e1dcbbe4..2e680025c07886a8a2528c62d019be86d7371268 100644 (file)
--- a/vars.am
+++ b/vars.am
@@ -67,4 +67,29 @@ SUBSTITUTIONS = \
                pidfile=$(pidfile) logfile=$(logfile) \
                PYTHON=$(PYTHON)
 
+###--------------------------------------------------------------------------
+### Manpage substitutions.
+
+SUFFIXES               += .1 .1.in
+SUFFIXES               += .5 .5.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 $@
+
 ###----- That's all, folks --------------------------------------------------