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 | ### | |
12 | ### TrIPE is free software; you can redistribute it and/or modify | |
13 | ### it under the terms of the GNU General Public License as published by | |
14 | ### the Free Software Foundation; either version 2 of the License, or | |
15 | ### (at your option) any later version. | |
16 | ### | |
17 | ### TrIPE is distributed in the hope that it will be useful, | |
18 | ### but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | ### GNU General Public License for more details. | |
21 | ### | |
22 | ### You should have received a copy of the GNU General Public License | |
23 | ### along with TrIPE; if not, write to the Free Software Foundation, | |
24 | ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
25 | ||
26 | ###-------------------------------------------------------------------------- | |
27 | ### Initial values of common variables. | |
28 | ||
29 | EXTRA_DIST = | |
30 | ||
31 | CLEANFILES = | |
32 | DISTCLEANFILES = | |
33 | MAINTAINERCLEANFILES = | |
34 | ||
35 | SUFFIXES = | |
36 | ||
37 | ###-------------------------------------------------------------------------- | |
38 | ### Include path. | |
39 | ||
40 | TRIPE_INCLUDES = \ | |
388e0319 MW |
41 | -I$(top_srcdir)/common \ |
42 | -I$(top_srcdir)/priv | |
6b6ad670 | 43 | |
bac6ffe4 | 44 | AM_CPPFLAGS += $(TRIPE_INCLUDES) |
6b6ad670 MW |
45 | |
46 | ###-------------------------------------------------------------------------- | |
47 | ### Miscellanous useful definitions. | |
48 | ||
388e0319 | 49 | ## Libraries of common code. |
6b6ad670 | 50 | libtripe = $(top_builddir)/common/libtripe.a |
388e0319 | 51 | libpriv = $(top_builddir)/priv/libpriv.a |
6b6ad670 | 52 | |
6b6ad670 MW |
53 | ## Substitute tags in files. |
54 | confsubst = $(top_srcdir)/config/confsubst | |
55 | ||
56 | ###-------------------------------------------------------------------------- | |
57 | ### Standard configuration substitutions. | |
58 | ||
59 | SUBSTITUTIONS = \ | |
60 | prefix=$(prefix) exec_prefix=$(exec_prefix) \ | |
61 | libdir=$(libdir) includedir=$(includedir) \ | |
62 | bindir=$(bindir) sbindir=$(sbindir) \ | |
63 | configdir=$(configdir) socketdir=$(socketdir) \ | |
64 | initconfig=$(initconfig) \ | |
65 | pidfile=$(pidfile) logfile=$(logfile) \ | |
ccbfa044 | 66 | PACKAGE=$(PACKAGE) VERSION=$(VERSION) \ |
6b6ad670 MW |
67 | PYTHON=$(PYTHON) |
68 | ||
2171b19e MW |
69 | V_SUBST = $(V_SUBST_$(V)) |
70 | V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY)) | |
71 | V_SUBST_0 = @echo " SUBST $@"; | |
72 | SUBST = $(V_SUBST)$(confsubst) | |
73 | ||
fc916a09 MW |
74 | ###-------------------------------------------------------------------------- |
75 | ### Manpage substitutions. | |
76 | ||
77 | SUFFIXES += .1 .1.in | |
78 | SUFFIXES += .5 .5.in | |
79 | SUFFIXES += .7 .7.in | |
80 | SUFFIXES += .8 .8.in | |
81 | ||
e99aedcf MW |
82 | mandefs = $(top_srcdir)/common/defs.man |
83 | makesummary = $(top_srcdir)/common/make-summary | |
84 | ||
2171b19e MW |
85 | V_MAN = $(V_MAN_$(V)) |
86 | V_MAN_ = $(V_MAN_$(AM_DEFAULT_VERBOSITY)) | |
87 | V_MAN_0 = @echo " MAN $@"; | |
88 | ||
e99aedcf | 89 | .1.in.1 .5.in.5 .7.in.7 .8.in.8: |
2171b19e MW |
90 | $(V_MAN) |
91 | $(AM_V_at)sed '/^\.$$/ d; /^\.\\"/ d' $(mandefs) >$@.defs | |
92 | $(AM_V_at)sed -e '/@@@PRE@@@/ {' -e 'r$@.defs' -e 'd' -e '}' \ | |
93 | $< >$@.merge | |
94 | $(AM_V_at)$(confsubst) $@.merge >$@.subst $(SUBSTITUTIONS) | |
95 | $(AM_V_at)awk -f $(makesummary) $@.subst >$@.new | |
96 | $(AM_V_at)rm -f $@.defs $@.merge $@.subst && mv $@.new $@ | |
fc916a09 | 97 | |
6b6ad670 | 98 | ###----- That's all, folks -------------------------------------------------- |