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