| 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 | |
| 28 | EXTRA_DIST = |
| 29 | |
| 30 | CLEANFILES = |
| 31 | DISTCLEANFILES = |
| 32 | MAINTAINERCLEANFILES = |
| 33 | |
| 34 | SUFFIXES = |
| 35 | |
| 36 | ###-------------------------------------------------------------------------- |
| 37 | ### Include path. |
| 38 | |
| 39 | TRIPE_INCLUDES = \ |
| 40 | -I$(top_srcdir)/common \ |
| 41 | -I$(top_srcdir)/priv |
| 42 | |
| 43 | AM_CPPFLAGS += $(TRIPE_INCLUDES) |
| 44 | |
| 45 | ###-------------------------------------------------------------------------- |
| 46 | ### Miscellanous useful definitions. |
| 47 | |
| 48 | ## Libraries of common code. |
| 49 | libtripe = $(top_builddir)/common/libtripe.a |
| 50 | libpriv = $(top_builddir)/priv/libpriv.a |
| 51 | |
| 52 | ###-------------------------------------------------------------------------- |
| 53 | ### Standard configuration substitutions. |
| 54 | |
| 55 | ## Substitute tags in files. |
| 56 | confsubst = $(top_srcdir)/config/confsubst |
| 57 | |
| 58 | SUBSTITUTIONS = \ |
| 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 | |
| 68 | V_SUBST = $(V_SUBST_@AM_V@) |
| 69 | V_SUBST_ = $(V_SUBST_@AM_DEFAULT_V@) |
| 70 | V_SUBST_0 = @echo " SUBST $@"; |
| 71 | SUBST = $(V_SUBST)$(confsubst) |
| 72 | |
| 73 | ###-------------------------------------------------------------------------- |
| 74 | ### Manpage substitutions. |
| 75 | |
| 76 | SUFFIXES += .1tripe .1.in .1 |
| 77 | SUFFIXES += .5tripe .5.in |
| 78 | SUFFIXES += .7tripe .7.in |
| 79 | SUFFIXES += .8tripe .8.in |
| 80 | |
| 81 | mandefs = $(top_srcdir)/common/defs.man |
| 82 | makesummary = $(top_srcdir)/common/make-summary |
| 83 | |
| 84 | V_MAN = $(V_MAN_@AM_V@) |
| 85 | V_MAN_ = $(V_MAN_@AM_DEFAULT_V@) |
| 86 | V_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 -------------------------------------------------- |