### -*-makefile-*-
###
-### Build script for nsict-utils
+### Build script for distorted-utils
###
### (c) 2008 Mark Wooding
###
space_SOURCES = space.c
dist_man_MANS += space.1
-## not
-bin_PROGRAMS += not
-not_SOURCES = not.c
-dist_man_MANS += not.1
-
-## if-mtu
-bin_PROGRAMS += if-mtu
-if_mtu_SOURCES = if-mtu.c
-dist_man_MANS += if-mtu.1
+## cdb tools
+if HAVE_LIBCDB
+bin_PROGRAMS += cdb-probe cdb-check-domain
+cdb_probe_SOURCES = cdb-probe.c
+cdb_probe_LDADD = -lcdb
+cdb_check_domain_SOURCES = cdb-check-domain.c
+cdb_check_domain_LDADD = -lcdb
+dist_man_MANS += cdb-probe.1 cdb-check-domain.1
+endif
## getpass
bin_PROGRAMS += getpass
getpass_SOURCES = getpass.c
dist_man_MANS += getpass.1
-## xtitle
-bin_PROGRAMS += xtitle
-xtitle_SOURCES = xtitle.c
-## !UNDOCUMENTED
+## gorp
+if HAVE_CATACOMB
+bin_PROGRAMS += gorp
+gorp_SOURCES = gorp.c
+gorp_LDADD = $(catacomb_LIBS)
+dist_man_MANS += gorp.1
+endif
-## pause
+## if-mtu
+bin_PROGRAMS += if-mtu
+if_mtu_SOURCES = if-mtu.c
+dist_man_MANS += if-mtu.1
+
+## locking
if HAVE_MLIB
-bin_PROGRAMS += pause
-pause_SOURCES = pause.c
-pause_LDADD = $(mLib_LIBS) $(MATH_LIBS)
-dist_man_MANS += pause.1
+bin_PROGRAMS += locking
+locking_SOURCES = locking.c
+locking_LDADD = $(mLib_LIBS)
+dist_man_MANS += locking.1
endif
## mtimeout
dist_man_MANS += mtimeout.1
endif
-## stamp
-if HAVE_MLIB
-bin_PROGRAMS += stamp
-stamp_SOURCES = stamp.c
-stamp_LDADD = $(mLib_LIBS)
-dist_man_MANS += stamp.1
-endif
+## not
+bin_PROGRAMS += not
+not_SOURCES = not.c
+dist_man_MANS += not.1
-## locking
+## pause
if HAVE_MLIB
-bin_PROGRAMS += locking
-locking_SOURCES = locking.c
-locking_LDADD = $(mLib_LIBS)
-dist_man_MANS += locking.1
+bin_PROGRAMS += pause
+pause_SOURCES = pause.c
+pause_LDADD = $(mLib_LIBS) $(MATH_LIBS)
+dist_man_MANS += pause.1
endif
## prlimit
endif
endif
-## gorp
-if HAVE_CATACOMB
-bin_PROGRAMS += gorp
-gorp_SOURCES = gorp.c
-gorp_LDADD = $(catacomb_LIBS)
-dist_man_MANS += gorp.1
-endif
-
-## qmail-checkspam
-if HAVE_LIBSPAMC
-sbin_PROGRAMS += qmail-checkspam
-qmail_checkspam_SOURCES = qmail-checkspam.c
-qmail_checkspam_LDADD = -lspamc
-dist_man_MANS += qmail-checkspam.8
+## sema
+if HAVE_MLIB
+bin_PROGRAMS += sema
+sema_SOURCES = sema.c
+sema_SOURCES += fence.c fence.h
+sema_SOURCES += timemax.cc timemax.h
+sema_LDADD = $(mLib_LIBS)
+sema_LINK = $(LINK) # don't need C++ libraries here
+dist_man_MANS += sema.1
endif
-## cdb tools
-if HAVE_LIBCDB
-bin_PROGRAMS += cdb-probe cdb-check-domain
-cdb_probe_SOURCES = cdb-probe.c
-cdb_probe_LDADD = -lcdb
-cdb_check_domain_SOURCES = cdb-check-domain.c
-cdb_check_domain_LDADD = -lcdb
-dist_man_MANS += cdb-probe.1 cdb-check-domain.1
+## stamp
+if HAVE_MLIB
+bin_PROGRAMS += stamp
+stamp_SOURCES = stamp.c
+stamp_LDADD = $(mLib_LIBS)
+dist_man_MANS += stamp.1
endif
## x86 model identification
if X86
+if HAVE_MLIB
bin_PROGRAMS += x86-model
x86_model_SOURCES = x86-model.c
x86_model_LDADD = $(mLib_LIBS)
dist_man_MANS += x86-model.1
endif
+endif
+
+## xtitle
+bin_PROGRAMS += xtitle
+xtitle_SOURCES = xtitle.c
+dist_man_MANS += xtitle.1
###--------------------------------------------------------------------------
### Tools in scripts.
EXTRA_DIST += config/confsubst
## Shell scripts.
-dist_bin_SCRIPTS += check-sender
-dist_man_MANS += check-sender.1
-
dist_bin_SCRIPTS += buf
dist_man_MANS += buf.1
+dist_bin_SCRIPTS += check-sender
+dist_man_MANS += check-sender.1
+
dist_bin_SCRIPTS += create
dist_man_MANS += create.1
-dist_bin_SCRIPTS += z
-dist_man_MANS += z.1
-
bin_SCRIPTS += hush
man_MANS += hush.1
CLEANFILES += hush hush.1
$(SUBST) $(srcdir)/hush.1.in >$@.new $(SUBSTITUTIONS) && \
mv $@.new $@
+dist_bin_SCRIPTS += sshsvc-mkauthkeys
+dist_man_MANS += sshsvc-mkauthkeys.1
+
+dist_bin_SCRIPTS += with-umask
+dist_man_MANS += with-umask.1
+
+dist_bin_SCRIPTS += z
+dist_man_MANS += z.1
+
## bash scripts.
if HAVE_BASH
$(AM_V_GEN)pod2man --section 8 $(srcdir)/shadowfix.in >$@.new && \
mv $@.new $@
-bin_SCRIPTS += unfwd
-CLEANFILES += unfwd
-EXTRA_DIST += unfwd.in
+dist_bin_SCRIPTS += unfwd
dist_man_MANS += unfwd.1
-unfwd: unfwd.in Makefile
- $(SUBST) $(srcdir)/unfwd.in >$@.new $(SUBSTITUTIONS) && \
- chmod +x $@.new && mv $@.new $@
-
endif
## Perl modules.
EXTRA_DIST += debian/copyright
EXTRA_DIST += debian/changelog
EXTRA_DIST += debian/control
+EXTRA_DIST += debian/compat
+EXTRA_DIST += debian/source/format
## What to install where.
EXTRA_DIST += debian/inst