3 ### Build script for distorted-utils
5 ### (c) 2008 Mark Wooding
8 ###----- Licensing notice ---------------------------------------------------
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.
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.
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.
30 ###--------------------------------------------------------------------------
36 AM_CFLAGS = $(mLib_CFLAGS) $(catacomb_CFLAGS)
40 space_SOURCES = space.c
41 dist_man_MANS += space.1
46 dist_man_MANS += not.1
49 bin_PROGRAMS += if-mtu
50 if_mtu_SOURCES = if-mtu.c
51 dist_man_MANS += if-mtu.1
54 bin_PROGRAMS += getpass
55 getpass_SOURCES = getpass.c
56 dist_man_MANS += getpass.1
59 bin_PROGRAMS += xtitle
60 xtitle_SOURCES = xtitle.c
61 dist_man_MANS += xtitle.1
66 pause_SOURCES = pause.c
67 pause_LDADD = $(mLib_LIBS) $(MATH_LIBS)
68 dist_man_MANS += pause.1
73 bin_PROGRAMS += mtimeout
74 mtimeout_SOURCES = mtimeout.c
75 mtimeout_LDADD = $(mLib_LIBS) $(MATH_LIBS)
76 dist_man_MANS += mtimeout.1
82 stamp_SOURCES = stamp.c
83 stamp_LDADD = $(mLib_LIBS)
84 dist_man_MANS += stamp.1
89 bin_PROGRAMS += locking
90 locking_SOURCES = locking.c
91 locking_LDADD = $(mLib_LIBS)
92 dist_man_MANS += locking.1
98 bin_PROGRAMS += prlimit
99 prlimit_SOURCES = prlimit.c
100 prlimit_LDADD = $(mLib_LIBS)
101 dist_man_MANS += prlimit.1
108 gorp_SOURCES = gorp.c
109 gorp_LDADD = $(catacomb_LIBS)
110 dist_man_MANS += gorp.1
116 sema_SOURCES = sema.c
117 sema_SOURCES += fence.c fence.h
118 sema_SOURCES += timemax.cc timemax.h
119 sema_LDADD = $(mLib_LIBS)
120 sema_LINK = $(LINK) # don't need C++ libraries here
121 dist_man_MANS += sema.1
126 bin_PROGRAMS += cdb-probe cdb-check-domain
127 cdb_probe_SOURCES = cdb-probe.c
128 cdb_probe_LDADD = -lcdb
129 cdb_check_domain_SOURCES = cdb-check-domain.c
130 cdb_check_domain_LDADD = -lcdb
131 dist_man_MANS += cdb-probe.1 cdb-check-domain.1
134 ## x86 model identification
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
144 ###--------------------------------------------------------------------------
145 ### Tools in scripts.
152 ## Making substitutions.
153 confsubst = $(top_srcdir)/config/confsubst
154 V_SUBST = $(V_SUBST_$(V))
155 V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
156 V_SUBST_0 = @echo " SUBST $@";
157 SUBST = $(V_SUBST)$(confsubst)
159 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
166 EXTRA_DIST += config/confsubst
169 dist_bin_SCRIPTS += check-sender
170 dist_man_MANS += check-sender.1
172 dist_bin_SCRIPTS += buf
173 dist_man_MANS += buf.1
175 dist_bin_SCRIPTS += create
176 dist_man_MANS += create.1
178 dist_bin_SCRIPTS += z
183 CLEANFILES += hush hush.1
184 EXTRA_DIST += hush.in hush.1.in
186 hush: hush.in Makefile
187 $(SUBST) $(srcdir)/hush.in >$@.new $(SUBSTITUTIONS) && \
188 chmod +x $@.new && mv $@.new $@
190 hush.1: hush.1.in Makefile
191 $(SUBST) $(srcdir)/hush.1.in >$@.new $(SUBSTITUTIONS) && \
194 dist_bin_SCRIPTS += with-umask
195 dist_man_MANS += with-umask.1
197 dist_bin_SCRIPTS += sshsvc-mkauthkeys
198 dist_man_MANS += sshsvc-mkauthkeys.1
203 bin_SCRIPTS += inplace
204 CLEANFILES += inplace
205 EXTRA_DIST += inplace.in
206 dist_man_MANS += inplace.1
208 inplace: inplace.in Makefile
209 $(SUBST) $(srcdir)/inplace.in >$@.new $(SUBSTITUTIONS) && \
210 chmod +x $@.new && mv $@.new $@
218 bin_SCRIPTS += cdb-assign
219 dist_man_MANS += cdb-assign.1
222 CLEANFILES += cdb-assign
223 EXTRA_DIST += cdb-assign.in
225 cdb-assign: cdb-assign.in Makefile
226 $(SUBST) $(srcdir)/cdb-assign.in >$@.new $(SUBSTITUTIONS) && \
227 chmod +x $@.new && mv $@.new $@
230 bin_SCRIPTS += cdb-list
231 dist_man_MANS += cdb-list.1
234 CLEANFILES += cdb-list
235 EXTRA_DIST += cdb-list.in
237 cdb-list: cdb-list.in Makefile
238 $(SUBST) $(srcdir)/cdb-list.in >$@.new $(SUBSTITUTIONS) && \
239 chmod +x $@.new && mv $@.new $@
242 bin_SCRIPTS += cdb-map
243 dist_man_MANS += cdb-map.1
246 CLEANFILES += cdb-map
247 EXTRA_DIST += cdb-map.in
249 cdb-map: cdb-map.in Makefile
250 $(SUBST) $(srcdir)/cdb-map.in >$@.new $(SUBSTITUTIONS) && \
251 chmod +x $@.new && mv $@.new $@
258 sbin_SCRIPTS += shadowfix
259 CLEANFILES += shadowfix
260 EXTRA_DIST += shadowfix.in
262 shadowfix: shadowfix.in Makefile
263 $(SUBST) $(srcdir)/shadowfix.in >$@.new $(SUBSTITUTIONS) && \
264 chmod +x $@.new && mv $@.new $@
266 man_MANS += shadowfix.8
267 CLEANFILES += shadowfix.8
269 shadowfix.8: shadowfix.in
270 $(AM_V_GEN)pod2man --section 8 $(srcdir)/shadowfix.in >$@.new && \
275 EXTRA_DIST += unfwd.in
276 dist_man_MANS += unfwd.1
278 unfwd: unfwd.in Makefile
279 $(SUBST) $(srcdir)/unfwd.in >$@.new $(SUBSTITUTIONS) && \
280 chmod +x $@.new && mv $@.new $@
286 dist_perlmod_DATA = MdwOpt.pm
292 bin_SCRIPTS += splitconf
293 CLEANFILES += splitconf
294 EXTRA_DIST += splitconf.in
295 dist_man_MANS += splitconf.1
297 splitconf: splitconf.in Makefile
298 $(SUBST) $(srcdir)/splitconf.in >$@.new $(SUBSTITUTIONS) && \
299 chmod +x $@.new && mv $@.new $@
303 ###--------------------------------------------------------------------------
304 ### Other administrivia.
307 echo $(VERSION) >$(distdir)/RELEASE
309 EXTRA_DIST += config/auto-version
311 ###--------------------------------------------------------------------------
315 EXTRA_DIST += debian/rules
316 EXTRA_DIST += debian/copyright
317 EXTRA_DIST += debian/changelog
318 EXTRA_DIST += debian/control
319 EXTRA_DIST += debian/compat
320 EXTRA_DIST += debian/source/format
322 ## What to install where.
323 EXTRA_DIST += debian/inst
325 ###----- That's all, folks --------------------------------------------------