From 23a4d5f7ad87f5bc60ce07f37e9af94ac7fc080d Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 10 Jan 2016 13:50:54 +0000 Subject: [PATCH] Makefile.am, configure.ac: Spring-clean the build system. --- Makefile.am | 62 ++++++++++++++++++++++++++++-------------------------------- configure.ac | 1 + 2 files changed, 30 insertions(+), 33 deletions(-) diff --git a/Makefile.am b/Makefile.am index ff82510..5a6117e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,16 +29,16 @@ dist_man_MANS = EXTRA_DIST = CLEANFILES = -confsubst = $(srcdir)/config/confsubst +confsubst = $(srcdir)/config/confsubst EXTRA_DIST += config/confsubst -###-------------------------------------------------------------------------- -### Distribution arrangements. - -dist-hook:: - echo $(VERSION) >$(distdir)/RELEASE +V_SUBST = $(V_SUBST_$(V)) +V_SUBST_ = $(V_SUBST_$(AM_DEFAULT_VERBOSITY)) +V_SUBST_0 = @echo " SUBST $@"; +SUBST = $(V_SUBST)$(confsubst) -EXTRA_DIST += config/auto-version +SUBSTITUTIONS = \ + PYTHON=$(PYTHON) VERSION=$(VERSION) ###-------------------------------------------------------------------------- ### Simple tools in C. @@ -46,19 +46,15 @@ EXTRA_DIST += config/auto-version AM_CFLAGS = $(X_CFLAGS) LDADD = -lX11 $(X_LIBS) -## xscsize +## xscsize. bin_PROGRAMS += xscsize dist_man_MANS += xscsize.1 -xscsize_SOURCES = - -xscsize_SOURCES += xscsize.c +xscsize_SOURCES = xscsize.c -## xatom +## xatom. bin_PROGRAMS += xatom dist_man_MANS += xatom.1 -xatom_SOURCES = - -xatom_SOURCES += xatom.c +xatom_SOURCES = xatom.c xatom_SOURCES += libxatom.h libxatom.c ###-------------------------------------------------------------------------- @@ -71,48 +67,48 @@ python_PYTHON = ## Common code. python_PYTHON += xtoys.py -## xmsg +## xmsg. bin_SCRIPTS += xmsg CLEANFILES += xmsg EXTRA_DIST += xmsg.in - dist_man_MANS += xmsg.1 xmsg: xmsg.in Makefile - $(confsubst) $(srcdir)/xmsg.in >$@.new \ - PYTHON=$(PYTHON) VERSION=$(VERSION) - chmod +x $@.new - mv $@.new $@ + $(SUBST) $(srcdir)/xmsg.in >$@.new $(SUBSTITUTIONS) && \ + chmod +x $@.new && mv $@.new $@ -## xcatch +## xcatch. bin_SCRIPTS += xcatch CLEANFILES += xcatch EXTRA_DIST += xcatch.in - dist_man_MANS += xcatch.1 xcatch: xcatch.in Makefile - $(confsubst) $(srcdir)/xcatch.in >$@.new \ - PYTHON=$(PYTHON) VERSION=$(VERSION) - chmod +x $@.new - mv $@.new $@ + $(SUBST) $(srcdir)/xcatch.in >$@.new $(SUBSTITUTIONS) && \ + chmod +x $@.new && mv $@.new $@ -## xgetline +## xgetline. bin_SCRIPTS += xgetline CLEANFILES += xgetline EXTRA_DIST += xgetline.in - dist_man_MANS += xgetline.1 xgetline: xgetline.in Makefile - $(confsubst) $(srcdir)/xgetline.in >$@.new \ - PYTHON=$(PYTHON) VERSION=$(VERSION) - chmod +x $@.new - mv $@.new $@ + $(SUBST) $(srcdir)/xgetline.in >$@.new $(SUBSTITUTIONS) && \ + chmod +x $@.new && mv $@.new $@ endif ###-------------------------------------------------------------------------- +### Distribution arrangements. + +dist-hook:: + echo $(VERSION) >$(distdir)/RELEASE + +EXTRA_DIST += config/auto-version + + +###-------------------------------------------------------------------------- ### Debian. EXTRA_DIST += debian/rules diff --git a/configure.ac b/configure.ac index 8fee120..7a635b3 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,7 @@ AC_INIT([xtoys], AUTO_VERSION, [mdw@distorted.org.uk]) AC_CONFIG_SRCDIR([xscsize.c]) AC_CONFIG_AUX_DIR([config]) AM_INIT_AUTOMAKE([foreign]) +mdw_SILENT_RULES dnl-------------------------------------------------------------------------- dnl C programming environment. -- 2.11.0