chiark / gitweb /
src/tripe-ifup.in: Hack IPv6 up on VPN interfaces.
[tripe] / vars.am
diff --git a/vars.am b/vars.am
index 6eb59dbf71c205414fc81971f97c6cf326dc7cfa..f7d3eff8bbbbdd08689c6700a0e4176700759f20 100644 (file)
--- a/vars.am
+++ b/vars.am
@@ -38,11 +38,10 @@ SUFFIXES             =
 ### Include path.
 
 TRIPE_INCLUDES = \
-       -I$(top_builddir)/config.h \
        -I$(top_srcdir)/common \
        -I$(top_srcdir)/priv
 
-CPPFLAGS += $(TRIPE_INCLUDES)
+AM_CPPFLAGS += $(TRIPE_INCLUDES)
 
 ###--------------------------------------------------------------------------
 ### Miscellanous useful definitions.
@@ -51,9 +50,6 @@ CPPFLAGS += $(TRIPE_INCLUDES)
 libtripe = $(top_builddir)/common/libtripe.a
 libpriv = $(top_builddir)/priv/libpriv.a
 
-## Create a directory if it doesn't exist.
-mkdir_p = $(top_srcdir)/config/install-sh -d
-
 ## Substitute tags in files.
 confsubst = $(top_srcdir)/config/confsubst
 
@@ -65,11 +61,16 @@ 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.
 
@@ -78,21 +79,20 @@ 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 $@
+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 .5.in.5 .7.in.7 .8.in.8:
+       $(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 --------------------------------------------------