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
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
54 bin_PROGRAMS += getpass
55 getpass_SOURCES = getpass.c
56 dist_man_MANS += getpass.1
61 dist_man_MANS += gai.1
67 gorp_LDADD = $(catacomb_LIBS)
68 dist_man_MANS += gorp.1
72 bin_PROGRAMS += if-mtu
73 if_mtu_SOURCES = if-mtu.c
74 dist_man_MANS += if-mtu.1
78 bin_PROGRAMS += locking
79 locking_SOURCES = locking.c
80 locking_LDADD = $(mLib_LIBS)
81 dist_man_MANS += locking.1
86 bin_PROGRAMS += mtimeout
87 mtimeout_SOURCES = mtimeout.c
88 mtimeout_LDADD = $(mLib_LIBS) $(MATH_LIBS)
89 dist_man_MANS += mtimeout.1
95 dist_man_MANS += not.1
100 pause_SOURCES = pause.c
101 pause_LDADD = $(mLib_LIBS) $(MATH_LIBS)
102 dist_man_MANS += pause.1
108 bin_PROGRAMS += mprlimit
109 mprlimit_SOURCES = mprlimit.c
110 mprlimit_LDADD = $(mLib_LIBS)
111 dist_man_MANS += mprlimit.1
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
128 bin_PROGRAMS += stamp
129 stamp_SOURCES = stamp.c
130 stamp_LDADD = $(mLib_LIBS)
131 dist_man_MANS += stamp.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
145 bin_PROGRAMS += xtitle
146 xtitle_SOURCES = xtitle.c
147 dist_man_MANS += xtitle.1
149 ###--------------------------------------------------------------------------
150 ### Tools in scripts.
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)
164 PACKAGE=$(PACKAGE) VERSION=$(VERSION) \
171 EXTRA_DIST += config/confsubst
174 dist_bin_SCRIPTS += buf
175 dist_man_MANS += buf.1
177 dist_bin_SCRIPTS += check-sender
178 dist_man_MANS += check-sender.1
180 dist_bin_SCRIPTS += create
181 dist_man_MANS += create.1
185 CLEANFILES += hush hush.1
186 EXTRA_DIST += hush.in hush.1.in
188 hush: hush.in Makefile
189 $(SUBST) $(srcdir)/hush.in >$@.new $(SUBSTITUTIONS) && \
190 chmod +x $@.new && mv $@.new $@
192 hush.1: hush.1.in Makefile
193 $(SUBST) $(srcdir)/hush.1.in >$@.new $(SUBSTITUTIONS) && \
196 dist_bin_SCRIPTS += sshsvc-mkauthkeys
197 dist_man_MANS += sshsvc-mkauthkeys.1
199 dist_bin_SCRIPTS += with-umask
200 dist_man_MANS += with-umask.1
202 dist_bin_SCRIPTS += z
208 bin_SCRIPTS += inplace
209 CLEANFILES += inplace
210 EXTRA_DIST += inplace.in
211 dist_man_MANS += inplace.1
213 inplace: inplace.in Makefile
214 $(SUBST) $(srcdir)/inplace.in >$@.new $(SUBSTITUTIONS) && \
215 chmod +x $@.new && mv $@.new $@
223 bin_SCRIPTS += cdb-assign
224 dist_man_MANS += cdb-assign.1
227 CLEANFILES += cdb-assign
228 EXTRA_DIST += cdb-assign.in
230 cdb-assign: cdb-assign.in Makefile
231 $(SUBST) $(srcdir)/cdb-assign.in >$@.new $(SUBSTITUTIONS) && \
232 chmod +x $@.new && mv $@.new $@
235 bin_SCRIPTS += cdb-list
236 dist_man_MANS += cdb-list.1
239 CLEANFILES += cdb-list
240 EXTRA_DIST += cdb-list.in
242 cdb-list: cdb-list.in Makefile
243 $(SUBST) $(srcdir)/cdb-list.in >$@.new $(SUBSTITUTIONS) && \
244 chmod +x $@.new && mv $@.new $@
247 bin_SCRIPTS += cdb-map
248 dist_man_MANS += cdb-map.1
251 CLEANFILES += cdb-map
252 EXTRA_DIST += cdb-map.in
254 cdb-map: cdb-map.in Makefile
255 $(SUBST) $(srcdir)/cdb-map.in >$@.new $(SUBSTITUTIONS) && \
256 chmod +x $@.new && mv $@.new $@
263 sbin_SCRIPTS += shadowfix
264 CLEANFILES += shadowfix
265 EXTRA_DIST += shadowfix.in
267 shadowfix: shadowfix.in Makefile
268 $(SUBST) $(srcdir)/shadowfix.in >$@.new $(SUBSTITUTIONS) && \
269 chmod +x $@.new && mv $@.new $@
271 man_MANS += shadowfix.8
272 CLEANFILES += shadowfix.8
274 shadowfix.8: shadowfix.in
275 $(AM_V_GEN)pod2man --section 8 $(srcdir)/shadowfix.in >$@.new && \
278 dist_bin_SCRIPTS += unfwd
279 dist_man_MANS += unfwd.1
285 dist_perlmod_DATA = MdwOpt.pm
291 bin_SCRIPTS += splitconf
292 CLEANFILES += splitconf
293 EXTRA_DIST += splitconf.in
294 dist_man_MANS += splitconf.1
296 splitconf: splitconf.in Makefile
297 $(SUBST) $(srcdir)/splitconf.in >$@.new $(SUBSTITUTIONS) && \
298 chmod +x $@.new && mv $@.new $@
302 ###--------------------------------------------------------------------------
303 ### Other administrivia.
306 echo $(VERSION) >$(distdir)/RELEASE
308 EXTRA_DIST += config/auto-version
310 ###--------------------------------------------------------------------------
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
321 ## What to install where.
322 EXTRA_DIST += debian/inst
324 ###----- That's all, folks --------------------------------------------------