### -*-makefile-*- ### ### Build script for distorted-utils ### ### (c) 2008 Mark Wooding ### ###----- Licensing notice --------------------------------------------------- ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of the GNU General Public License as published by ### the Free Software Foundation; either version 2 of the License, or ### (at your option) any later version. ### ### This program is distributed in the hope that it will be useful, ### but WITHOUT ANY WARRANTY; without even the implied warranty of ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ### GNU General Public License for more details. ### ### You should have received a copy of the GNU General Public License ### along with this program; if not, write to the Free Software Foundation, ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. EXTRA_DIST = CLEANFILES = man_MANS = dist_man_MANS = ###-------------------------------------------------------------------------- ### Tools in C. bin_PROGRAMS = sbin_PROGRAMS = AM_CFLAGS = $(mLib_CFLAGS) $(catacomb_CFLAGS) ## space bin_PROGRAMS += space space_SOURCES = space.c dist_man_MANS += space.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 ## gai bin_PROGRAMS += gai gai_SOURCES = gai.c dist_man_MANS += gai.1 ## gorp if HAVE_CATACOMB bin_PROGRAMS += gorp gorp_SOURCES = gorp.c gorp_LDADD = $(catacomb_LIBS) dist_man_MANS += gorp.1 endif ## if-mtu bin_PROGRAMS += if-mtu if_mtu_SOURCES = if-mtu.c dist_man_MANS += if-mtu.1 ## locking if HAVE_MLIB bin_PROGRAMS += locking locking_SOURCES = locking.c locking_LDADD = $(mLib_LIBS) dist_man_MANS += locking.1 endif ## mtimeout if HAVE_MLIB bin_PROGRAMS += mtimeout mtimeout_SOURCES = mtimeout.c mtimeout_LDADD = $(mLib_LIBS) $(MATH_LIBS) dist_man_MANS += mtimeout.1 endif ## not bin_PROGRAMS += not not_SOURCES = not.c dist_man_MANS += not.1 ## pause if HAVE_MLIB bin_PROGRAMS += pause pause_SOURCES = pause.c pause_LDADD = $(mLib_LIBS) $(MATH_LIBS) dist_man_MANS += pause.1 endif ## mprlimit if HAVE_PRLIMIT if HAVE_MLIB bin_PROGRAMS += mprlimit mprlimit_SOURCES = mprlimit.c mprlimit_LDADD = $(mLib_LIBS) dist_man_MANS += mprlimit.1 endif endif ## 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 ## 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. bin_SCRIPTS = dist_bin_SCRIPTS = sbin_SCRIPTS = dist_sbin_SCRIPTS = ## Making substitutions. confsubst = $(top_srcdir)/config/confsubst V_SUBST = $(V_SUBST_@AM_V@) V_SUBST_ = $(V_SUBST_@AM_DEFAULT_V@) V_SUBST_0 = @echo " SUBST $@"; SUBST = $(V_SUBST)$(confsubst) SUBSTITUTIONS = \ PACKAGE=$(PACKAGE) VERSION=$(VERSION) \ PYTHON=$(PYTHON) \ PERL=$(PERL) \ TCLSH=$(TCLSH) \ BASH=$(BASH) \ logdir=$(logdir) EXTRA_DIST += config/confsubst ## Shell scripts. 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 bin_SCRIPTS += hush man_MANS += hush.1 CLEANFILES += hush hush.1 EXTRA_DIST += hush.in hush.1.in hush: hush.in Makefile $(SUBST) $(srcdir)/hush.in >$@.new $(SUBSTITUTIONS) && \ chmod +x $@.new && mv $@.new $@ hush.1: hush.1.in Makefile $(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 bin_SCRIPTS += inplace CLEANFILES += inplace EXTRA_DIST += inplace.in dist_man_MANS += inplace.1 inplace: inplace.in Makefile $(SUBST) $(srcdir)/inplace.in >$@.new $(SUBSTITUTIONS) && \ chmod +x $@.new && mv $@.new $@ endif ## Python scripts. if HAVE_PYTHON if HAVE_PYMOD_CDB bin_SCRIPTS += cdb-assign dist_man_MANS += cdb-assign.1 endif CLEANFILES += cdb-assign EXTRA_DIST += cdb-assign.in cdb-assign: cdb-assign.in Makefile $(SUBST) $(srcdir)/cdb-assign.in >$@.new $(SUBSTITUTIONS) && \ chmod +x $@.new && mv $@.new $@ if HAVE_PYMOD_CDB bin_SCRIPTS += cdb-list dist_man_MANS += cdb-list.1 endif CLEANFILES += cdb-list EXTRA_DIST += cdb-list.in cdb-list: cdb-list.in Makefile $(SUBST) $(srcdir)/cdb-list.in >$@.new $(SUBSTITUTIONS) && \ chmod +x $@.new && mv $@.new $@ if HAVE_PYMOD_CDB bin_SCRIPTS += cdb-map dist_man_MANS += cdb-map.1 endif CLEANFILES += cdb-map EXTRA_DIST += cdb-map.in cdb-map: cdb-map.in Makefile $(SUBST) $(srcdir)/cdb-map.in >$@.new $(SUBSTITUTIONS) && \ chmod +x $@.new && mv $@.new $@ endif ## Perl scripts. if HAVE_PERL sbin_SCRIPTS += shadowfix CLEANFILES += shadowfix EXTRA_DIST += shadowfix.in shadowfix: shadowfix.in Makefile $(SUBST) $(srcdir)/shadowfix.in >$@.new $(SUBSTITUTIONS) && \ chmod +x $@.new && mv $@.new $@ man_MANS += shadowfix.8 CLEANFILES += shadowfix.8 shadowfix.8: shadowfix.in $(AM_V_GEN)pod2man --section 8 $(srcdir)/shadowfix.in >$@.new && \ mv $@.new $@ dist_bin_SCRIPTS += unfwd dist_man_MANS += unfwd.1 endif ## Perl modules. if HAVE_PERL dist_perlmod_DATA = MdwOpt.pm endif ## Tcl scripts. if HAVE_TCLSH bin_SCRIPTS += splitconf CLEANFILES += splitconf EXTRA_DIST += splitconf.in dist_man_MANS += splitconf.1 splitconf: splitconf.in Makefile $(SUBST) $(srcdir)/splitconf.in >$@.new $(SUBSTITUTIONS) && \ chmod +x $@.new && mv $@.new $@ endif ###-------------------------------------------------------------------------- ### Other administrivia. dist-hook: echo $(VERSION) >$(distdir)/RELEASE EXTRA_DIST += config/auto-version ###-------------------------------------------------------------------------- ### Debian. ## Standard files. EXTRA_DIST += debian/rules 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 ###----- That's all, folks --------------------------------------------------