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