X-Git-Url: https://git.distorted.org.uk/~mdw/tripe/blobdiff_plain/6b6ad6702f305891ced3b9a7cf3061c75eabda86..4606744fa29e164ad0030f445ff8228edae9bb9a:/vars.am diff --git a/vars.am b/vars.am index 4c2b8158..093e1728 100644 --- a/vars.am +++ b/vars.am @@ -38,19 +38,17 @@ SUFFIXES = ### Include path. TRIPE_INCLUDES = \ - -I$(top_builddir)/config.h \ - -I$(top_srcdir)/common + -I$(top_srcdir)/common \ + -I$(top_srcdir)/priv -CPPFLAGS += $(TRIPE_INCLUDES) +AM_CPPFLAGS += $(TRIPE_INCLUDES) ###-------------------------------------------------------------------------- ### Miscellanous useful definitions. -## Library of common code. +## Libraries of common code. libtripe = $(top_builddir)/common/libtripe.a - -## Create a directory if it doesn't exist. -mkdir_p = $(top_srcdir)/config/install-sh -d +libpriv = $(top_builddir)/priv/libpriv.a ## Substitute tags in files. confsubst = $(top_srcdir)/config/confsubst @@ -63,8 +61,38 @@ SUBSTITUTIONS = \ libdir=$(libdir) includedir=$(includedir) \ bindir=$(bindir) sbindir=$(sbindir) \ configdir=$(configdir) socketdir=$(socketdir) \ - initconfig=$(initconfig) \ + initconfig=$(initconfig) pkglibdir=$(pkglibdir) \ pidfile=$(pidfile) logfile=$(logfile) \ + PACKAGE=$(PACKAGE) VERSION=$(VERSION) \ PYTHON=$(PYTHON) +V_SUBST = $(V_SUBST_$(V)) +V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY)) +V_SUBST_0 = @echo " SUBST $@"; +SUBST = $(V_SUBST)$(confsubst) + +###-------------------------------------------------------------------------- +### Manpage substitutions. + +SUFFIXES += .1tripe .1.in .1 +SUFFIXES += .5tripe .5.in +SUFFIXES += .7tripe .7.in +SUFFIXES += .8tripe .8.in + +mandefs = $(top_srcdir)/common/defs.man +makesummary = $(top_srcdir)/common/make-summary + +V_MAN = $(V_MAN_$(V)) +V_MAN_ = $(V_MAN_$(AM_DEFAULT_VERBOSITY)) +V_MAN_0 = @echo " MAN $@"; + +.1.in.1 .1.in.1tripe .5.in.5tripe .7.in.7tripe .8.in.8tripe: + $(V_MAN) + $(AM_V_at)sed '/^\.$$/ d; /^\.\\"/ d' $(mandefs) >$@.defs + $(AM_V_at)sed -e '/@@@PRE@@@/ {' -e 'r$@.defs' -e 'd' -e '}' \ + $< >$@.merge + $(AM_V_at)$(confsubst) $@.merge >$@.subst $(SUBSTITUTIONS) + $(AM_V_at)awk -f $(makesummary) $@.subst >$@.new + $(AM_V_at)rm -f $@.defs $@.merge $@.subst && mv $@.new $@ + ###----- That's all, folks --------------------------------------------------