Release 1.4.0.1: Fix transition magic for {nsict->distorted}-cdb.
[misc] / Makefile.am
CommitLineData
b2ffb9b7
MW
1### -*-makefile-*-
2###
3### Build script for nsict-utils
4###
5### (c) 2008 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
24EXTRA_DIST =
25CLEANFILES =
26
27man_MANS =
28dist_man_MANS =
29
30###--------------------------------------------------------------------------
31### Tools in C.
32
33bin_PROGRAMS =
34sbin_PROGRAMS =
35
36AM_CFLAGS = $(mLib_CFLAGS) $(catacomb_CFLAGS)
37
38## space
39bin_PROGRAMS += space
40space_SOURCES = space.c
41dist_man_MANS += space.1
42
43## not
44bin_PROGRAMS += not
45not_SOURCES = not.c
46dist_man_MANS += not.1
47
48## if-mtu
49bin_PROGRAMS += if-mtu
50if_mtu_SOURCES = if-mtu.c
51dist_man_MANS += if-mtu.1
52
e3e2681b
MW
53## getpass
54bin_PROGRAMS += getpass
55getpass_SOURCES = getpass.c
56dist_man_MANS += getpass.1
57
b2ffb9b7
MW
58## xtitle
59bin_PROGRAMS += xtitle
60xtitle_SOURCES = xtitle.c
61## !UNDOCUMENTED
62
63## pause
64if HAVE_MLIB
65bin_PROGRAMS += pause
66pause_SOURCES = pause.c
67pause_LDADD = $(mLib_LIBS) $(MATH_LIBS)
68dist_man_MANS += pause.1
69endif
70
58b43082 71## mtimeout
e825e5a9 72if HAVE_MLIB
58b43082
MW
73bin_PROGRAMS += mtimeout
74mtimeout_SOURCES = mtimeout.c
75mtimeout_LDADD = $(mLib_LIBS) $(MATH_LIBS)
76dist_man_MANS += mtimeout.1
e825e5a9
MW
77endif
78
b2ffb9b7
MW
79## stamp
80if HAVE_MLIB
81bin_PROGRAMS += stamp
82stamp_SOURCES = stamp.c
83stamp_LDADD = $(mLib_LIBS)
84dist_man_MANS += stamp.1
85endif
86
87## locking
88if HAVE_MLIB
89bin_PROGRAMS += locking
90locking_SOURCES = locking.c
91locking_LDADD = $(mLib_LIBS)
92dist_man_MANS += locking.1
93endif
94
2e169b7e
MW
95## prlimit
96if HAVE_PRLIMIT
97if HAVE_MLIB
98bin_PROGRAMS += prlimit
99prlimit_SOURCES = prlimit.c
100prlimit_LDADD = $(mLib_LIBS)
101dist_man_MANS += prlimit.1
102endif
103endif
104
b2ffb9b7
MW
105## gorp
106if HAVE_CATACOMB
107bin_PROGRAMS += gorp
108gorp_SOURCES = gorp.c
109gorp_LDADD = $(catacomb_LIBS)
110dist_man_MANS += gorp.1
111endif
112
b2ffb9b7
MW
113## cdb tools
114if HAVE_LIBCDB
115bin_PROGRAMS += cdb-probe cdb-check-domain
116cdb_probe_SOURCES = cdb-probe.c
117cdb_probe_LDADD = -lcdb
118cdb_check_domain_SOURCES = cdb-check-domain.c
119cdb_check_domain_LDADD = -lcdb
120dist_man_MANS += cdb-probe.1 cdb-check-domain.1
121endif
122
92f7c002
MW
123## x86 model identification
124if X86
125bin_PROGRAMS += x86-model
126x86_model_SOURCES = x86-model.c
127x86_model_LDADD = $(mLib_LIBS)
128dist_man_MANS += x86-model.1
129endif
130
b2ffb9b7
MW
131###--------------------------------------------------------------------------
132### Tools in scripts.
133
134bin_SCRIPTS =
135dist_bin_SCRIPTS =
136sbin_SCRIPTS =
137dist_sbin_SCRIPTS =
138
139## Making substitutions.
140confsubst = $(top_srcdir)/config/confsubst
1c54bc06
MW
141V_SUBST = $(V_SUBST_$(V))
142V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
143V_SUBST_0 = @echo " SUBST $@";
144SUBST = $(V_SUBST)$(confsubst)
b2ffb9b7
MW
145SUBSTITUTIONS = \
146 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
147 PYTHON=$(PYTHON) \
148 PERL=$(PERL) \
b1492ec0 149 TCLSH=$(TCLSH) \
c818aced
MW
150 BASH=$(BASH) \
151 logdir=$(logdir)
b2ffb9b7
MW
152
153EXTRA_DIST += config/confsubst
154
155## Shell scripts.
156dist_bin_SCRIPTS += check-sender
157dist_man_MANS += check-sender.1
158
159dist_bin_SCRIPTS += buf
160dist_man_MANS += buf.1
161
162dist_bin_SCRIPTS += create
163dist_man_MANS += create.1
164
165dist_bin_SCRIPTS += z
166dist_man_MANS += z.1
167
c818aced
MW
168bin_SCRIPTS += hush
169man_MANS += hush.1
170CLEANFILES += hush hush.1
171EXTRA_DIST += hush.in hush.1.in
172
173hush: hush.in Makefile
174 $(SUBST) $(srcdir)/hush.in >$@.new $(SUBSTITUTIONS) && \
175 chmod +x $@.new && mv $@.new $@
176
177hush.1: hush.1.in Makefile
178 $(SUBST) $(srcdir)/hush.1.in >$@.new $(SUBSTITUTIONS) && \
179 mv $@.new $@
180
3dd40cc8
MW
181dist_bin_SCRIPTS += with-umask
182dist_man_MANS += with-umask.1
183
b9ee4e83
MW
184dist_bin_SCRIPTS += sshsvc-mkauthkeys
185dist_man_MANS += sshsvc-mkauthkeys.1
186
b2ffb9b7
MW
187## bash scripts.
188if HAVE_BASH
189
190bin_SCRIPTS += inplace
191CLEANFILES += inplace
192EXTRA_DIST += inplace.in
193dist_man_MANS += inplace.1
194
195inplace: inplace.in Makefile
8653d1c3 196 $(SUBST) $(srcdir)/inplace.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
197 chmod +x $@.new && mv $@.new $@
198
199endif
200
201## Python scripts.
202if HAVE_PYTHON
203
204if HAVE_PYMOD_CDB
205bin_SCRIPTS += cdb-assign
206dist_man_MANS += cdb-assign.1
207endif
208
209CLEANFILES += cdb-assign
210EXTRA_DIST += cdb-assign.in
211
212cdb-assign: cdb-assign.in Makefile
8653d1c3 213 $(SUBST) $(srcdir)/cdb-assign.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
214 chmod +x $@.new && mv $@.new $@
215
216if HAVE_PYMOD_CDB
217bin_SCRIPTS += cdb-list
218dist_man_MANS += cdb-list.1
219endif
220
221CLEANFILES += cdb-list
222EXTRA_DIST += cdb-list.in
223
224cdb-list: cdb-list.in Makefile
8653d1c3 225 $(SUBST) $(srcdir)/cdb-list.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
226 chmod +x $@.new && mv $@.new $@
227
228if HAVE_PYMOD_CDB
229bin_SCRIPTS += cdb-map
230dist_man_MANS += cdb-map.1
231endif
232
233CLEANFILES += cdb-map
234EXTRA_DIST += cdb-map.in
235
236cdb-map: cdb-map.in Makefile
8653d1c3 237 $(SUBST) $(srcdir)/cdb-map.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
238 chmod +x $@.new && mv $@.new $@
239
240endif
241
242## Perl scripts.
243if HAVE_PERL
244
245sbin_SCRIPTS += shadowfix
246CLEANFILES += shadowfix
247EXTRA_DIST += shadowfix.in
248
249shadowfix: shadowfix.in Makefile
8653d1c3 250 $(SUBST) $(srcdir)/shadowfix.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
251 chmod +x $@.new && mv $@.new $@
252
253man_MANS += shadowfix.8
254CLEANFILES += shadowfix.8
255
256shadowfix.8: shadowfix.in
d7c9f389
MW
257 $(AM_V_GEN)pod2man --section 8 $(srcdir)/shadowfix.in >$@.new && \
258 mv $@.new $@
b2ffb9b7
MW
259
260bin_SCRIPTS += unfwd
261CLEANFILES += unfwd
262EXTRA_DIST += unfwd.in
263dist_man_MANS += unfwd.1
264
265unfwd: unfwd.in Makefile
8653d1c3 266 $(SUBST) $(srcdir)/unfwd.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
267 chmod +x $@.new && mv $@.new $@
268
269endif
270
271## Perl modules.
272if HAVE_PERL
273dist_perlmod_DATA = MdwOpt.pm
274endif
275
276## Tcl scripts.
277if HAVE_TCLSH
278
279bin_SCRIPTS += splitconf
280CLEANFILES += splitconf
281EXTRA_DIST += splitconf.in
282dist_man_MANS += splitconf.1
283
284splitconf: splitconf.in Makefile
8653d1c3 285 $(SUBST) $(srcdir)/splitconf.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
286 chmod +x $@.new && mv $@.new $@
287
288endif
289
d87cfc24
MW
290###--------------------------------------------------------------------------
291### Other administrivia.
292
293dist-hook:
294 echo $(VERSION) >$(distdir)/RELEASE
295
a027e0e5
MW
296EXTRA_DIST += config/auto-version
297
d87cfc24
MW
298###--------------------------------------------------------------------------
299### Debian.
300
301## Standard files.
302EXTRA_DIST += debian/rules
303EXTRA_DIST += debian/copyright
304EXTRA_DIST += debian/changelog
305EXTRA_DIST += debian/control
b88c529e 306EXTRA_DIST += debian/compat
d87cfc24
MW
307
308## What to install where.
309EXTRA_DIST += debian/inst
310
b2ffb9b7 311###----- That's all, folks --------------------------------------------------