aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/core.mk11
-rw-r--r--core/deps.mk14
-rw-r--r--core/docs.mk2
-rw-r--r--core/erlc.mk18
-rw-r--r--core/index.mk2
-rw-r--r--core/test.mk6
6 files changed, 28 insertions, 25 deletions
diff --git a/core/core.mk b/core/core.mk
index 2bf717a..d0e8ed1 100644
--- a/core/core.mk
+++ b/core/core.mk
@@ -29,6 +29,9 @@ PROJECT_VERSION ?= rolling
V ?= 0
+verbose_0 = @
+verbose = $(verbose_$(V))
+
gen_verbose_0 = @echo " GEN " $@;
gen_verbose = $(gen_verbose_$(V))
@@ -75,12 +78,12 @@ ifneq ($(words $(MAKECMDGOALS)),1)
endif
all:: deps
- @$(MAKE) --no-print-directory app
- @$(MAKE) --no-print-directory rel
+ $(verbose) $(MAKE) --no-print-directory app
+ $(verbose) $(MAKE) --no-print-directory rel
# Noop to avoid a Make warning when there's nothing to do.
rel::
- @echo -n
+ $(verbose) echo -n
check:: clean app tests
@@ -94,7 +97,7 @@ endif
distclean:: clean
help::
- @printf "%s\n" \
+ $(verbose) printf "%s\n" \
"erlang.mk (version $(ERLANG_MK_VERSION)) is distributed under the terms of the ISC License." \
"Copyright (c) 2013-2015 Loïc Hoguin <[email protected]>" \
"" \
diff --git a/core/deps.mk b/core/deps.mk
index 789d750..0435689 100644
--- a/core/deps.mk
+++ b/core/deps.mk
@@ -36,10 +36,10 @@ deps::
else
deps:: $(ALL_DEPS_DIRS)
ifneq ($(IS_DEP),1)
- @rm -f $(ERLANG_MK_TMP)/deps.log
+ $(verbose) rm -f $(ERLANG_MK_TMP)/deps.log
endif
- @mkdir -p $(ERLANG_MK_TMP)
- @for dep in $(ALL_DEPS_DIRS) ; do \
+ $(verbose) mkdir -p $(ERLANG_MK_TMP)
+ $(verbose) for dep in $(ALL_DEPS_DIRS) ; do \
if grep -qs ^$$dep$$ $(ERLANG_MK_TMP)/deps.log; then \
echo -n; \
else \
@@ -505,7 +505,7 @@ endef
define dep_target
$(DEPS_DIR)/$(1):
- @mkdir -p $(DEPS_DIR)
+ $(verbose) mkdir -p $(DEPS_DIR)
ifeq (,$(dep_$(1)))
$(dep_verbose) $(call dep_fetch,$(pkg_$(1)_name),$(pkg_$(1)_fetch), \
$(patsubst git://github.com/%,https://github.com/%,$(pkg_$(1)_repo)), \
@@ -527,16 +527,16 @@ else
endif
endif
endif
- @if [ -f $(DEPS_DIR)/$(1)/configure.ac -o -f $(DEPS_DIR)/$(1)/configure.in ]; then \
+ $(verbose) if [ -f $(DEPS_DIR)/$(1)/configure.ac -o -f $(DEPS_DIR)/$(1)/configure.in ]; then \
echo " AUTO " $(1); \
cd $(DEPS_DIR)/$(1) && autoreconf -Wall -vif -I m4; \
fi
- -@if [ -f $(DEPS_DIR)/$(1)/configure ]; then \
+ - $(verbose) if [ -f $(DEPS_DIR)/$(1)/configure ]; then \
echo " CONF " $(1); \
cd $(DEPS_DIR)/$(1) && ./configure; \
fi
ifeq ($(filter $(1),$(NO_AUTOPATCH)),)
- @if [ "$(1)" = "amqp_client" -a "$(RABBITMQ_CLIENT_PATCH)" ]; then \
+ $(verbose) if [ "$(1)" = "amqp_client" -a "$(RABBITMQ_CLIENT_PATCH)" ]; then \
if [ ! -d $(DEPS_DIR)/rabbitmq-codegen ]; then \
echo " PATCH Downloading rabbitmq-codegen"; \
git clone https://github.com/rabbitmq/rabbitmq-codegen.git $(DEPS_DIR)/rabbitmq-codegen; \
diff --git a/core/docs.mk b/core/docs.mk
index e1e2d0e..cde0a42 100644
--- a/core/docs.mk
+++ b/core/docs.mk
@@ -15,5 +15,5 @@ ifneq ($(SKIP_DEPS),)
doc-deps:
else
doc-deps: $(ALL_DOC_DEPS_DIRS)
- @for dep in $(ALL_DOC_DEPS_DIRS) ; do $(MAKE) -C $$dep; done
+ $(verbose) for dep in $(ALL_DOC_DEPS_DIRS) ; do $(MAKE) -C $$dep; done
endif
diff --git a/core/erlc.mk b/core/erlc.mk
index 20b8fbb..f6bd6fd 100644
--- a/core/erlc.mk
+++ b/core/erlc.mk
@@ -77,7 +77,7 @@ ifeq ($(wildcard src/$(PROJECT).app.src),)
$(app_verbose) echo $(subst $(newline),,$(subst ",\",$(call app_file,$(GITDESCRIBE),$(MODULES)))) \
> ebin/$(PROJECT).app
else
- @if [ -z "$$(grep -E '^[^%]*{\s*modules\s*,' src/$(PROJECT).app.src)" ]; then \
+ $(verbose) if [ -z "$$(grep -E '^[^%]*{\s*modules\s*,' src/$(PROJECT).app.src)" ]; then \
echo "Empty modules entry not found in $(PROJECT).app.src. Please consult the erlang.mk README for instructions." >&2; \
exit 1; \
fi
@@ -88,7 +88,7 @@ else
endif
erlc-include:
- -@if [ -d ebin/ ]; then \
+ - $(verbose) if [ -d ebin/ ]; then \
find include/ src/ -type f -name \*.hrl -newer ebin -exec touch $(shell find src/ -type f -name "*.erl") \; 2>/dev/null || printf ''; \
fi
@@ -101,14 +101,14 @@ endef
define compile_xyrl
$(xyrl_verbose) erlc -v -o ebin/ $(1)
$(xyrl_verbose) erlc $(ERLC_OPTS) -o ebin/ ebin/*.erl
- @rm ebin/*.erl
+ $(verbose) rm ebin/*.erl
endef
define compile_asn1
$(asn1_verbose) erlc -v -I include/ -o ebin/ $(1)
- @mv ebin/*.hrl include/
- @mv ebin/*.asn1db include/
- @rm ebin/*.erl
+ $(verbose) mv ebin/*.hrl include/
+ $(verbose) mv ebin/*.asn1db include/
+ $(verbose) rm ebin/*.erl
endef
define compile_mib
@@ -119,17 +119,17 @@ endef
ifneq ($(wildcard src/),)
ebin/$(PROJECT).app::
- @mkdir -p ebin/
+ $(verbose) mkdir -p ebin/
ifneq ($(wildcard asn1/),)
ebin/$(PROJECT).app:: $(sort $(call core_find,asn1/,*.asn1))
- @mkdir -p include
+ $(verbose) mkdir -p include
$(if $(strip $?),$(call compile_asn1,$?))
endif
ifneq ($(wildcard mibs/),)
ebin/$(PROJECT).app:: $(sort $(call core_find,mibs/,*.mib))
- @mkdir -p priv/mibs/ include
+ $(verbose) mkdir -p priv/mibs/ include
$(if $(strip $?),$(call compile_mib,$?))
endif
diff --git a/core/index.mk b/core/index.mk
index a16eceb..6e6d1f9 100644
--- a/core/index.mk
+++ b/core/index.mk
@@ -4,7 +4,7 @@
.PHONY: search
define pkg_print
- @printf "%s\n" \
+ $(verbose) printf "%s\n" \
$(if $(call core_eq,$(1),$(pkg_$(1)_name)),,"Pkg name: $(1)") \
"App name: $(pkg_$(1)_name)" \
"Description: $(pkg_$(1)_description)" \
diff --git a/core/test.mk b/core/test.mk
index 3832996..acc792a 100644
--- a/core/test.mk
+++ b/core/test.mk
@@ -20,7 +20,7 @@ ifneq ($(SKIP_DEPS),)
test-deps:
else
test-deps: $(ALL_TEST_DEPS_DIRS)
- @for dep in $(ALL_TEST_DEPS_DIRS) ; do $(MAKE) -C $$dep; done
+ $(verbose) for dep in $(ALL_TEST_DEPS_DIRS) ; do $(MAKE) -C $$dep; done
endif
ifneq ($(wildcard $(TEST_DIR)),)
@@ -32,12 +32,12 @@ endif
ifeq ($(wildcard ebin/test),)
test-build:: ERLC_OPTS=$(TEST_ERLC_OPTS)
test-build:: clean deps test-deps
- @$(MAKE) --no-print-directory app-build test-dir ERLC_OPTS="$(TEST_ERLC_OPTS)"
+ $(verbose) $(MAKE) --no-print-directory app-build test-dir ERLC_OPTS="$(TEST_ERLC_OPTS)"
$(gen_verbose) touch ebin/test
else
test-build:: ERLC_OPTS=$(TEST_ERLC_OPTS)
test-build:: deps test-deps
- @$(MAKE) --no-print-directory app-build test-dir ERLC_OPTS="$(TEST_ERLC_OPTS)"
+ $(verbose) $(MAKE) --no-print-directory app-build test-dir ERLC_OPTS="$(TEST_ERLC_OPTS)"
endif
clean:: clean-test-dir