chiark / gitweb /
svc/conntrack.in: Maintain config groups in a dictionary.
[tripe] / vars.am
... / ...
CommitLineData
1### -*-makefile-*-
2###
3### Definitions used throughout the build system
4###
5### (c) 2008 Straylight/Edgeware
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This file is part of Trivial IP Encryption (TrIPE).
11###
12### TrIPE is free software: you can redistribute it and/or modify it under
13### the terms of the GNU General Public License as published by the Free
14### Software Foundation; either version 3 of the License, or (at your
15### option) any later version.
16###
17### TrIPE is distributed in the hope that it will be useful, but WITHOUT
18### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19### FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20### for more details.
21###
22### You should have received a copy of the GNU General Public License
23### along with TrIPE. If not, see <https://www.gnu.org/licenses/>.
24
25###--------------------------------------------------------------------------
26### Initial values of common variables.
27
28EXTRA_DIST =
29
30CLEANFILES =
31DISTCLEANFILES =
32MAINTAINERCLEANFILES =
33
34SUFFIXES =
35
36###--------------------------------------------------------------------------
37### Include path.
38
39TRIPE_INCLUDES = \
40 -I$(top_srcdir)/common \
41 -I$(top_srcdir)/priv
42
43AM_CPPFLAGS += $(TRIPE_INCLUDES)
44
45###--------------------------------------------------------------------------
46### Miscellanous useful definitions.
47
48## Libraries of common code.
49libtripe = $(top_builddir)/common/libtripe.a
50libpriv = $(top_builddir)/priv/libpriv.a
51
52###--------------------------------------------------------------------------
53### Standard configuration substitutions.
54
55## Substitute tags in files.
56confsubst = $(top_srcdir)/config/confsubst
57
58SUBSTITUTIONS = \
59 prefix=$(prefix) exec_prefix=$(exec_prefix) \
60 libdir=$(libdir) includedir=$(includedir) \
61 bindir=$(bindir) sbindir=$(sbindir) \
62 configdir=$(configdir) socketdir=$(socketdir) \
63 initconfig=$(initconfig) pkglibdir=$(pkglibdir) \
64 pidfile=$(pidfile) logfile=$(logfile) \
65 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
66 PYTHON=$(PYTHON)
67
68V_SUBST = $(V_SUBST_@AM_V@)
69V_SUBST_ = $(V_SUBST_@AM_DEFAULT_V@)
70V_SUBST_0 = @echo " SUBST $@";
71SUBST = $(V_SUBST)$(confsubst)
72
73###--------------------------------------------------------------------------
74### Manpage substitutions.
75
76SUFFIXES += .1tripe .1.in .1
77SUFFIXES += .5tripe .5.in
78SUFFIXES += .7tripe .7.in
79SUFFIXES += .8tripe .8.in
80
81mandefs = $(top_srcdir)/common/defs.man
82makesummary = $(top_srcdir)/common/make-summary
83
84V_MAN = $(V_MAN_@AM_V@)
85V_MAN_ = $(V_MAN_@AM_DEFAULT_V@)
86V_MAN_0 = @echo " MAN $@";
87
88.1.in.1 .1.in.1tripe .5.in.5tripe .7.in.7tripe .8.in.8tripe:
89 $(V_MAN)
90 $(AM_V_at)sed '/^\.$$/ d; /^\.\\"/ d' $(mandefs) >$@.defs
91 $(AM_V_at)sed -e '/@@@PRE@@@/ {' -e 'r$@.defs' -e 'd' -e '}' \
92 $< >$@.merge
93 $(AM_V_at)$(confsubst) $@.merge >$@.subst $(SUBSTITUTIONS)
94 $(AM_V_at)awk -f $(makesummary) $@.subst >$@.new
95 $(AM_V_at)rm -f $@.defs $@.merge $@.subst && mv $@.new $@
96
97###----- That's all, folks --------------------------------------------------