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