Commit | Line | Data |
---|---|---|
6b6ad670 MW |
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 | ### | |
11ad66c2 MW |
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. | |
6b6ad670 | 16 | ### |
11ad66c2 MW |
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. | |
6b6ad670 MW |
21 | ### |
22 | ### You should have received a copy of the GNU General Public License | |
11ad66c2 | 23 | ### along with TrIPE. If not, see <https://www.gnu.org/licenses/>. |
6b6ad670 MW |
24 | |
25 | ###-------------------------------------------------------------------------- | |
26 | ### Initial values of common variables. | |
27 | ||
28 | EXTRA_DIST = | |
29 | ||
30 | CLEANFILES = | |
31 | DISTCLEANFILES = | |
32 | MAINTAINERCLEANFILES = | |
33 | ||
34 | SUFFIXES = | |
35 | ||
36 | ###-------------------------------------------------------------------------- | |
37 | ### Include path. | |
38 | ||
39 | TRIPE_INCLUDES = \ | |
388e0319 MW |
40 | -I$(top_srcdir)/common \ |
41 | -I$(top_srcdir)/priv | |
6b6ad670 | 42 | |
9ff18efe | 43 | AM_CPPFLAGS += $(TRIPE_INCLUDES) |
6b6ad670 MW |
44 | |
45 | ###-------------------------------------------------------------------------- | |
46 | ### Miscellanous useful definitions. | |
47 | ||
388e0319 | 48 | ## Libraries of common code. |
9ff18efe MW |
49 | libtripe = $(top_builddir)/common/libtripe.a |
50 | libpriv = $(top_builddir)/priv/libpriv.a | |
6b6ad670 MW |
51 | |
52 | ###-------------------------------------------------------------------------- | |
53 | ### Standard configuration substitutions. | |
54 | ||
9ff18efe MW |
55 | ## Substitute tags in files. |
56 | confsubst = $(top_srcdir)/config/confsubst | |
57 | ||
6b6ad670 | 58 | SUBSTITUTIONS = \ |
9ff18efe MW |
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 | ||
7c2c4517 MW |
68 | V_SUBST = $(V_SUBST_@AM_V@) |
69 | V_SUBST_ = $(V_SUBST_@AM_DEFAULT_V@) | |
70 | V_SUBST_0 = @echo " SUBST $@"; | |
9ff18efe | 71 | SUBST = $(V_SUBST)$(confsubst) |
2171b19e | 72 | |
fc916a09 MW |
73 | ###-------------------------------------------------------------------------- |
74 | ### Manpage substitutions. | |
75 | ||
0647ba7c MW |
76 | SUFFIXES += .1tripe .1.in .1 |
77 | SUFFIXES += .5tripe .5.in | |
78 | SUFFIXES += .7tripe .7.in | |
79 | SUFFIXES += .8tripe .8.in | |
fc916a09 | 80 | |
9ff18efe MW |
81 | mandefs = $(top_srcdir)/common/defs.man |
82 | makesummary = $(top_srcdir)/common/make-summary | |
e99aedcf | 83 | |
7c2c4517 MW |
84 | V_MAN = $(V_MAN_@AM_V@) |
85 | V_MAN_ = $(V_MAN_@AM_DEFAULT_V@) | |
86 | V_MAN_0 = @echo " MAN $@"; | |
2171b19e | 87 | |
0647ba7c | 88 | .1.in.1 .1.in.1tripe .5.in.5tripe .7.in.7tripe .8.in.8tripe: |
2171b19e MW |
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 $@ | |
fc916a09 | 96 | |
6b6ad670 | 97 | ###----- That's all, folks -------------------------------------------------- |