chiark / gitweb /
zoneconf-install-*: Find `zoneconf' in the correct place.
[zoneconf] / Makefile.am
CommitLineData
a37c695a
MW
1### -*-makefile-*-
2###
3### Build script for zoneconf
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
24sbin_SCRIPTS =
25man_MANS =
26noinst_DATA =
27
28EXTRA_DIST =
29CLEANFILES =
30DISTCLEANFILES =
31
32pkgconfdir = $(sysconfdir)/$(PACKAGE)
33
34###--------------------------------------------------------------------------
35### Standard configuration substitutions.
36
37confsubst = $(top_srcdir)/config/confsubst
38EXTRA_DIST += config/confsubst
39
40SUBSTITUTIONS = \
41 prefix=$(prefix) exec_prefix=$(exec_prefix) \
42 bindir=$(bindir) sbindir=$(sbindir) \
43 bindprogsdir=$(bindprogsdir) \
44 pkgconfdir=$(pkgconfdir) \
45 pkgstatedir=$(localstatedir)/lib/$(PACKAGE) \
46 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
47 TCLSH=$(TCLSH)
48
49V_SUBST = $(V_SUBST_$(V))
50V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
51V_SUBST_0 = @echo " SUBST $@";
52SUBST = $(V_SUBST)$(confsubst)
53
54###--------------------------------------------------------------------------
55### Executable scripts.
56
57## Main scripts.
58sbin_SCRIPTS += zoneconf
59EXTRA_DIST += zoneconf.in
60CLEANFILES += zoneconf
61
62zoneconf: zoneconf.in Makefile
63 $(SUBST) $(srcdir)/zoneconf.in $(SUBSTITUTIONS) >zoneconf.new && \
64 chmod +x zoneconf.new && mv zoneconf.new zoneconf
65
66## Userv interface.
67sbin_SCRIPTS += zoneconf-install-userv
7d50ec12
MW
68EXTRA_DIST += zoneconf-install-userv.in
69CLEANFILES += zoneconf-install-userv
70
71zoneconf-install-userv: zoneconf-install-userv.in Makefile
72 $(SUBST) $(srcdir)/zoneconf-install-userv.in $(SUBSTITUTIONS) \
73 >zoneconf-install-userv.new && \
74 chmod +x zoneconf-install-userv.new && \
75 mv zoneconf-install-userv.new zoneconf-install-userv
a37c695a
MW
76
77noinst_DATA += userv.rc
78EXTRA_DIST += userv.rc.in
79
80userv.rc: userv.rc.in Makefile
81 $(SUBST) $(srcdir)/userv.rc.in $(SUBSTITUTIONS) >userv.rc.new && \
82 mv userv.rc.new userv.rc
83
84## SSH interface.
85sbin_SCRIPTS += zoneconf-install-ssh
7d50ec12
MW
86EXTRA_DIST += zoneconf-install-ssh.in
87CLEANFILES += zoneconf-install-ssh
88
89zoneconf-install-ssh: zoneconf-install-ssh.in Makefile
90 $(SUBST) $(srcdir)/zoneconf-install-ssh.in $(SUBSTITUTIONS) \
91 >zoneconf-install-ssh.new && \
92 chmod +x zoneconf-install-ssh.new && \
93 mv zoneconf-install-ssh.new zoneconf-install-ssh
a37c695a
MW
94
95###--------------------------------------------------------------------------
96### Distribution.
97
98EXTRA_DIST += config/auto-version
99
100dist-hook:
101 echo $(VERSION) >$(distdir)/RELEASE
102
103###----- That's all, folks --------------------------------------------------