X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/6b6ad6702f305891ced3b9a7cf3061c75eabda86..6f88042a4307bec23ed4d451f320b46c9ec7602f:/vars.am diff --git a/vars.am b/vars.am index 4c2b8158..5780686e 100644 --- a/vars.am +++ b/vars.am @@ -65,6 +65,32 @@ SUBSTITUTIONS = \ configdir=$(configdir) socketdir=$(socketdir) \ initconfig=$(initconfig) \ pidfile=$(pidfile) logfile=$(logfile) \ + PACKAGE=$(PACKAGE) VERSION=$(VERSION) \ 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 --------------------------------------------------