[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 05/05: build: Support silent rules; enable them by default.
From: |
Ludovic Courtès |
Subject: |
[shepherd] 05/05: build: Support silent rules; enable them by default. |
Date: |
Tue, 12 Jan 2016 22:28:28 +0000 |
civodul pushed a commit to branch master
in repository shepherd.
commit 0cf5794fa28f8a13748db78090b84dff659bc450
Author: Ludovic Courtès <address@hidden>
Date: Tue Jan 12 23:19:22 2016 +0100
build: Support silent rules; enable them by default.
* Makefile.am (AM_V_INSTANTIATE, AM_V_INSTANTIATE_)
(AM_V_INSTANTIATE_0): New variables.
(%: %.in): Use it.
(AM_V_GUILEC, AM_V_GUILEC_, AM_V_GUILEC_0): New variables.
(%.go: %.scm): Use it.
* configure.ac: Use 'AM_SILENT_RULES'.
---
Makefile.am | 14 +++++++++++---
configure.ac | 3 +++
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 7cf9196..9bbc3e3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -104,25 +104,33 @@ instantiate =
\
# Instantiate templates.
+AM_V_INSTANTIATE = $(AM_V_INSTANTIATE_$(V))
+AM_V_INSTANTIATE_ = $(AM_V_INSTANTIATE_$(AM_DEFAULT_VERBOSITY))
+AM_V_INSTANTIATE_0 = @echo " INSTANTIATE" $@;
+
# Emit a 'chmod +x' command only if $@ matches one of the scripts.
maybe_executable = \
$(subst $@,chmod +x $@, \
$(findstring $@,$(bin_SCRIPTS) $(sbin_SCRIPTS)))
%: %.in Makefile
- $(MKDIR_P) "`dirname address@hidden"
- $(SED) $(instantiate) < $< >$@
+ $(AM_V_INSTANTIATE)$(MKDIR_P) "`dirname address@hidden" ; \
+ $(SED) $(instantiate) < $< >$@ ; \
$(maybe_executable)
modules/shepherd/config.scm: modules/shepherd/config.scm.in Makefile
$(MKDIR_P) "`dirname address@hidden"
$(SED) $(instantiate) < $< >$@
+AM_V_GUILEC = $(AM_V_GUILEC_$(V))
+AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY))
+AM_V_GUILEC_0 = @echo " GUILEC" $@;
+
# Make sure 'modules/shepherd/{config,system.scm}' are built first.
# XXX: Use the C locale for when Guile lacks
#
<http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>.
%.go: %.scm $(templates:%.in=%)
- $(MKDIR_P) "`dirname "$@"`"
+ $(AM_V_GUILEC)$(MKDIR_P) "`dirname "$@"`" ; \
LC_ALL=C \
$(GUILD) compile --target="$(host)" \
-L "$(top_builddir)/modules" \
diff --git a/configure.ac b/configure.ac
index 7fe9cc7..6d4c64f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,9 @@ dnl We're fine with GNU make constructs, hence
'-Wno-portability'.
AM_INIT_AUTOMAKE([1.11 gnu silent-rules -Wall -Wno-portability
std-options color-tests])
+dnl Enable silent rules by default.
+AM_SILENT_RULES([yes])
+
AC_CANONICAL_HOST
AC_PROG_MKDIR_P
AC_PROG_SED