chiark / gitweb /
timeout: New program to limit how long a child process runs.
[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
e825e5a9
MW
71## timeout
72if HAVE_MLIB
73bin_PROGRAMS += timeout
74timeout_SOURCES = timeout.c
75timeout_LDADD = $(mLib_LIBS) $(MATH_LIBS)
76dist_man_MANS += timeout.1
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
95## gorp
96if HAVE_CATACOMB
97bin_PROGRAMS += gorp
98gorp_SOURCES = gorp.c
99gorp_LDADD = $(catacomb_LIBS)
100dist_man_MANS += gorp.1
101endif
102
103## qmail-checkspam
104if HAVE_LIBSPAMC
105sbin_PROGRAMS += qmail-checkspam
106qmail_checkspam_SOURCES = qmail-checkspam.c
107qmail_checkspam_LDADD = -lspamc
108dist_man_MANS += qmail-checkspam.8
109endif
110
111## cdb tools
112if HAVE_LIBCDB
113bin_PROGRAMS += cdb-probe cdb-check-domain
114cdb_probe_SOURCES = cdb-probe.c
115cdb_probe_LDADD = -lcdb
116cdb_check_domain_SOURCES = cdb-check-domain.c
117cdb_check_domain_LDADD = -lcdb
118dist_man_MANS += cdb-probe.1 cdb-check-domain.1
119endif
120
92f7c002
MW
121## x86 model identification
122if X86
123bin_PROGRAMS += x86-model
124x86_model_SOURCES = x86-model.c
125x86_model_LDADD = $(mLib_LIBS)
126dist_man_MANS += x86-model.1
127endif
128
b2ffb9b7
MW
129###--------------------------------------------------------------------------
130### Tools in scripts.
131
132bin_SCRIPTS =
133dist_bin_SCRIPTS =
134sbin_SCRIPTS =
135dist_sbin_SCRIPTS =
136
137## Making substitutions.
138confsubst = $(top_srcdir)/config/confsubst
1c54bc06
MW
139V_SUBST = $(V_SUBST_$(V))
140V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
141V_SUBST_0 = @echo " SUBST $@";
142SUBST = $(V_SUBST)$(confsubst)
b2ffb9b7
MW
143SUBSTITUTIONS = \
144 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
145 PYTHON=$(PYTHON) \
146 PERL=$(PERL) \
b1492ec0
MW
147 TCLSH=$(TCLSH) \
148 BASH=$(BASH)
b2ffb9b7
MW
149
150EXTRA_DIST += config/confsubst
151
152## Shell scripts.
153dist_bin_SCRIPTS += check-sender
154dist_man_MANS += check-sender.1
155
156dist_bin_SCRIPTS += buf
157dist_man_MANS += buf.1
158
159dist_bin_SCRIPTS += create
160dist_man_MANS += create.1
161
162dist_bin_SCRIPTS += z
163dist_man_MANS += z.1
164
165## bash scripts.
166if HAVE_BASH
167
168bin_SCRIPTS += inplace
169CLEANFILES += inplace
170EXTRA_DIST += inplace.in
171dist_man_MANS += inplace.1
172
173inplace: inplace.in Makefile
8653d1c3 174 $(SUBST) $(srcdir)/inplace.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
175 chmod +x $@.new && mv $@.new $@
176
177endif
178
179## Python scripts.
180if HAVE_PYTHON
181
182if HAVE_PYMOD_CDB
183bin_SCRIPTS += cdb-assign
184dist_man_MANS += cdb-assign.1
185endif
186
187CLEANFILES += cdb-assign
188EXTRA_DIST += cdb-assign.in
189
190cdb-assign: cdb-assign.in Makefile
8653d1c3 191 $(SUBST) $(srcdir)/cdb-assign.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
192 chmod +x $@.new && mv $@.new $@
193
194if HAVE_PYMOD_CDB
195bin_SCRIPTS += cdb-list
196dist_man_MANS += cdb-list.1
197endif
198
199CLEANFILES += cdb-list
200EXTRA_DIST += cdb-list.in
201
202cdb-list: cdb-list.in Makefile
8653d1c3 203 $(SUBST) $(srcdir)/cdb-list.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
204 chmod +x $@.new && mv $@.new $@
205
206if HAVE_PYMOD_CDB
207bin_SCRIPTS += cdb-map
208dist_man_MANS += cdb-map.1
209endif
210
211CLEANFILES += cdb-map
212EXTRA_DIST += cdb-map.in
213
214cdb-map: cdb-map.in Makefile
8653d1c3 215 $(SUBST) $(srcdir)/cdb-map.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
216 chmod +x $@.new && mv $@.new $@
217
218endif
219
220## Perl scripts.
221if HAVE_PERL
222
223sbin_SCRIPTS += shadowfix
224CLEANFILES += shadowfix
225EXTRA_DIST += shadowfix.in
226
227shadowfix: shadowfix.in Makefile
8653d1c3 228 $(SUBST) $(srcdir)/shadowfix.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
229 chmod +x $@.new && mv $@.new $@
230
231man_MANS += shadowfix.8
232CLEANFILES += shadowfix.8
233
234shadowfix.8: shadowfix.in
d7c9f389
MW
235 $(AM_V_GEN)pod2man --section 8 $(srcdir)/shadowfix.in >$@.new && \
236 mv $@.new $@
b2ffb9b7
MW
237
238bin_SCRIPTS += unfwd
239CLEANFILES += unfwd
240EXTRA_DIST += unfwd.in
241dist_man_MANS += unfwd.1
242
243unfwd: unfwd.in Makefile
8653d1c3 244 $(SUBST) $(srcdir)/unfwd.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
245 chmod +x $@.new && mv $@.new $@
246
247endif
248
249## Perl modules.
250if HAVE_PERL
251dist_perlmod_DATA = MdwOpt.pm
252endif
253
254## Tcl scripts.
255if HAVE_TCLSH
256
257bin_SCRIPTS += splitconf
258CLEANFILES += splitconf
259EXTRA_DIST += splitconf.in
260dist_man_MANS += splitconf.1
261
262splitconf: splitconf.in Makefile
8653d1c3 263 $(SUBST) $(srcdir)/splitconf.in >$@.new $(SUBSTITUTIONS) && \
b2ffb9b7
MW
264 chmod +x $@.new && mv $@.new $@
265
266endif
267
d87cfc24
MW
268###--------------------------------------------------------------------------
269### Other administrivia.
270
271dist-hook:
272 echo $(VERSION) >$(distdir)/RELEASE
273
a027e0e5
MW
274EXTRA_DIST += config/auto-version
275
d87cfc24
MW
276###--------------------------------------------------------------------------
277### Debian.
278
279## Standard files.
280EXTRA_DIST += debian/rules
281EXTRA_DIST += debian/copyright
282EXTRA_DIST += debian/changelog
283EXTRA_DIST += debian/control
284
285## What to install where.
286EXTRA_DIST += debian/inst
287
b2ffb9b7 288###----- That's all, folks --------------------------------------------------