Commit | Line | Data |
---|---|---|
53263601 MW |
1 | ### -*-makefile-*- |
2 | ### | |
3 | ### Build script for distorted.org.uk key management | |
4 | ### | |
5 | ### (c) 2011 Mark Wooding | |
6 | ### | |
7 | ||
8 | ###----- Licensing notice --------------------------------------------------- | |
9 | ### | |
10 | ### This program is free software; you can redistribute it and/or modify | |
11 | ### it under the terms of the GNU General Public License as published by | |
12 | ### the Free Software Foundation; either version 2 of the License, or | |
13 | ### (at your option) any later version. | |
14 | ### | |
15 | ### This program is distributed in the hope that it will be useful, | |
16 | ### but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ### GNU General Public License for more details. | |
19 | ### | |
20 | ### You should have received a copy of the GNU General Public License | |
21 | ### along with this program; if not, write to the Free Software Foundation, | |
22 | ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
23 | ||
24 | bin_SCRIPTS = | |
25 | dist_pkglib_SCRIPTS = | |
26 | pkglib_DATA = | |
27 | noinst_SCRIPTS = | |
28 | ||
29 | EXTRA_DIST = | |
30 | CLEANFILES = | |
31 | DISTCLEANFILES = | |
32 | ||
33 | ###-------------------------------------------------------------------------- | |
34 | ### Substitution of configuration data. | |
35 | ||
36 | confsubst = $(top_srcdir)/config/confsubst | |
37 | EXTRA_DIST += config/confsubst | |
38 | ||
39 | SUBSTVARS = \ | |
40 | PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" \ | |
41 | PYTHON="$(PYTHON)" \ | |
42 | bindir="$(bindir)" \ | |
43 | pkgconfdir="$(sysconfdir)/$(PACKAGE)" \ | |
44 | pkglibdir="$(pkglibdir)" | |
45 | ||
46 | SUBST = $(AM_V_GEN)$(confsubst) | |
47 | ||
48 | ###-------------------------------------------------------------------------- | |
49 | ### Utility programs. | |
50 | ||
51 | ## Shamir secret-sharing. | |
52 | bin_SCRIPTS += shamir | |
53 | EXTRA_DIST += shamir.in | |
54 | CLEANFILES += shamir | |
55 | shamir: shamir.in Makefile | |
56 | $(SUBST) $(srcdir)/shamir.in $(SUBSTVARS) >shamir.new && \ | |
57 | chmod +x shamir.new && mv shamir.new shamir | |
58 | ||
59 | ###-------------------------------------------------------------------------- | |
60 | ### Main driver program and commands. | |
61 | ||
62 | ## Main driver. | |
63 | bin_SCRIPTS += keys | |
64 | EXTRA_DIST += keys.in | |
65 | CLEANFILES += keys | |
66 | keys: keys.in Makefile | |
67 | $(SUBST) $(srcdir)/keys.in $(SUBSTVARS) >keys.new && \ | |
68 | chmod +x keys.new && mv keys.new keys | |
69 | ||
70 | ## Utilities library. | |
71 | pkglib_DATA += keyfunc.sh | |
72 | EXTRA_DIST += keyfunc.sh.in | |
73 | CLEANFILES += keyfunc.sh | |
74 | keyfunc.sh: keyfunc.sh.in Makefile | |
75 | $(SUBST) $(srcdir)/keyfunc.sh.in $(SUBSTVARS) >keyfunc.sh.new && \ | |
76 | mv keyfunc.sh.new keyfunc.sh | |
77 | ||
78 | ## Commands. | |
79 | dist_pkglib_SCRIPTS += keeper-cards | |
80 | dist_pkglib_SCRIPTS += new-keeper | |
81 | dist_pkglib_SCRIPTS += new-recov | |
82 | dist_pkglib_SCRIPTS += reveal | |
83 | ||
84 | ###----- That's all, folks -------------------------------------------------- |