From 173090e6bbd3f78dc815ed6c0c13d34ab3a230ab Mon Sep 17 00:00:00 2001 Message-Id: <173090e6bbd3f78dc815ed6c0c13d34ab3a230ab.1716728501.git.mdw@distorted.org.uk> From: Mark Wooding Date: Tue, 25 Aug 2015 10:44:20 +0100 Subject: [PATCH] vars.am, */Makefile.am: Improve silent-rules building. Organization: Straylight/Edgeware From: Mark Wooding New silent-rules handling for Lisp dumping, testing, and for generating Sod outputs. --- lib/Makefile.am | 4 ++-- src/Makefile.am | 4 ++-- vars.am | 23 +++++++++++++++++++++-- 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index 0e4c4fc..fa28adc 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -50,7 +50,7 @@ nodist_pkginclude_HEADERS+= sod-base.h BUILT_SOURCES += $(nodist_libsod_la_SOURCES) \ $(nodist_pkginclude_HEADERS) -sod-base.c: $(SOD); $(SOD) -tc --builtin -sod-base.h: $(SOD); $(SOD) -th --builtin +sod-base.c: $(SOD); $(V_SOD_c)$(SOD) -tc --builtin +sod-base.h: $(SOD); $(V_SOD_h)$(SOD) -th --builtin ###----- That's all, folks -------------------------------------------------- diff --git a/src/Makefile.am b/src/Makefile.am index 9773237..856d0c1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -96,7 +96,7 @@ CLEANFILES += *.$(fasl) parser/*.$(fasl) bin_PROGRAMS += sod sod_SOURCES = sod: $(dist_pkglispsrc_DATA) - set -ex; true_srcdir=$$(cd $(srcdir); pwd); \ + $(V_DUMP)true_srcdir=$$(cd $(srcdir); pwd); \ ASDF_OUTPUT_TRANSLATIONS=$$true_srcdir:$(abs_builddir): \ $(CL_LAUNCH) -o sod -d ! -l $(LISPSYS) +I -S $$true_srcdir/: \ -s sod-frontend -r sod-frontend:main @@ -121,7 +121,7 @@ EXTRA_DIST += lexer-test.lisp ## Running the Lisp tests. check-local: - set -ex; true_srcdir=$$(cd $(srcdir); pwd); \ + $(V_TEST)true_srcdir=$$(cd $(srcdir); pwd); \ ASDF_OUTPUT_TRANSLATIONS=$$true_srcdir:$(abs_builddir): \ $(CL_LAUNCH) -l $(LISPSYS) +I -S $$true_srcdir/: \ -i '(asdf:test-system "sod")' diff --git a/vars.am b/vars.am index 7e2a89f..2f3336e 100644 --- a/vars.am +++ b/vars.am @@ -60,9 +60,28 @@ LDADD = $(top_builddir)/lib/libsod.la ## The tool location. SOD = $(top_builddir)/src/sod +## Silent rules treatment. +V_SOD_c = $(V_SOD_c_$(V)) +V_SOD_c_ = $(V_SOD_c_$(AM_DEFAULT_VERBOSITY)) +V_SOD_c_0 = @echo " SOD[c] $@"; +V_SOD_h = $(V_SOD_h_$(V)) +V_SOD_h_ = $(V_SOD_h_$(AM_DEFAULT_VERBOSITY)) +V_SOD_h_0 = @echo " SOD[h] $@"; + ## Build rules. SUFFIXES += .c .h .sod -.sod.c: $(SOD); $(SOD) -tc $< -.sod.h: $(SOD); $(SOD) -th $< +.sod.c: $(SOD); $(V_SOD_c)$(SOD) -tc $< +.sod.h: $(SOD); $(V_SOD_h)$(SOD) -th $< + +###-------------------------------------------------------------------------- +### Silent rules for Lisp. + +V_DUMP = $(V_DUMP_$(V)) +V_DUMP_ = $(V_DUMP_$(AM_DEFAULT_VERBOSITY)) +V_DUMP_0 = @echo " DUMP $@"; + +V_TEST = $(V_TEST_$(V)) +V_TEST_ = $(V_TEST_$(AM_DEFAULT_VERBOSITY)) +V_TEST_0 = @echo " TEST $@"; ###----- That's all, folks -------------------------------------------------- -- [mdw]