aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-07-04 18:10:03 +0200
committerLoïc Hoguin <[email protected]>2015-07-04 18:10:03 +0200
commit0eb54a71605a955df14c5df793ebe676c86259f9 (patch)
treea9259406c19b034c32d426d570b941e89e237058 /plugins
parentc2debce2bfcf2400905ff56c4a80e4c3251c6e56 (diff)
downloaderlang.mk-0eb54a71605a955df14c5df793ebe676c86259f9.tar.gz
erlang.mk-0eb54a71605a955df14c5df793ebe676c86259f9.tar.bz2
erlang.mk-0eb54a71605a955df14c5df793ebe676c86259f9.zip
Add $(verbose) to avoid completely silencing commands
Diffstat (limited to 'plugins')
-rw-r--r--plugins/bootstrap.mk12
-rw-r--r--plugins/c_src.mk4
-rw-r--r--plugins/ci.mk10
-rw-r--r--plugins/cover.mk6
-rw-r--r--plugins/ct.mk6
-rw-r--r--plugins/dialyzer.mk6
-rw-r--r--plugins/elvis.mk10
-rw-r--r--plugins/escript.mk2
-rw-r--r--plugins/eunit.mk2
-rw-r--r--plugins/protobuffs.mk4
-rw-r--r--plugins/relx.mk14
-rw-r--r--plugins/shell.mk4
-rw-r--r--plugins/triq.mk6
-rw-r--r--plugins/xref.mk6
14 files changed, 42 insertions, 50 deletions
diff --git a/plugins/bootstrap.mk b/plugins/bootstrap.mk
index 3cb9830..7f8331e 100644
--- a/plugins/bootstrap.mk
+++ b/plugins/bootstrap.mk
@@ -6,7 +6,7 @@
# Core targets.
help::
- @printf "%s\n" "" \
+ $(verbose) printf "%s\n" "" \
"Bootstrap targets:" \
" bootstrap Generate a skeleton of an OTP application" \
" bootstrap-lib Generate a skeleton of an OTP library" \
@@ -334,7 +334,7 @@ endef
# Plugin-specific targets.
define render_template
- @echo "$${_$(1)}" > $(2)
+ $(verbose) echo "$${_$(1)}" > $(2)
endef
ifndef WS
@@ -354,7 +354,7 @@ ifneq ($(wildcard src/),)
$(error Error: src/ directory already exists)
endif
$(call render_template,bs_Makefile,Makefile)
- @mkdir src/
+ $(verbose) mkdir src/
$(call render_template,bs_appsrc,src/$(PROJECT).app.src)
$(call render_template,bs_app,src/$(PROJECT)_app.erl)
$(eval n := $(PROJECT)_sup)
@@ -365,7 +365,7 @@ ifneq ($(wildcard src/),)
$(error Error: src/ directory already exists)
endif
$(call render_template,bs_Makefile,Makefile)
- @mkdir src/
+ $(verbose) mkdir src/
$(call render_template,bs_appsrc_lib,src/$(PROJECT).app.src)
bootstrap-rel:
@@ -376,7 +376,7 @@ ifneq ($(wildcard rel/),)
$(error Error: rel/ directory already exists)
endif
$(call render_template,bs_relx_config,relx.config)
- @mkdir rel/
+ $(verbose) mkdir rel/
$(call render_template,bs_sys_config,rel/sys.config)
$(call render_template,bs_vm_args,rel/vm.args)
@@ -396,4 +396,4 @@ endif
$(call render_template,tpl_$(t),src/$(n).erl)
list-templates:
- @echo Available templates: $(sort $(patsubst tpl_%,%,$(filter tpl_%,$(.VARIABLES))))
+ $(verbose) echo Available templates: $(sort $(patsubst tpl_%,%,$(filter tpl_%,$(.VARIABLES))))
diff --git a/plugins/c_src.mk b/plugins/c_src.mk
index 98417ed..9fa8111 100644
--- a/plugins/c_src.mk
+++ b/plugins/c_src.mk
@@ -76,7 +76,7 @@ app:: $(C_SRC_ENV) $(C_SRC_OUTPUT)
test-build:: $(C_SRC_ENV) $(C_SRC_OUTPUT)
$(C_SRC_OUTPUT): $(OBJECTS)
- @mkdir -p priv/
+ $(verbose) mkdir -p priv/
$(link_verbose) $(CC) $(OBJECTS) $(LDFLAGS) $(LDLIBS) -o $(C_SRC_OUTPUT)
%.o: %.c
@@ -100,7 +100,7 @@ endif
ifneq ($(wildcard $(C_SRC_DIR)),)
$(C_SRC_ENV):
- @$(ERL) -eval "file:write_file(\"$(C_SRC_ENV)\", \
+ $(verbose) $(ERL) -eval "file:write_file(\"$(C_SRC_ENV)\", \
io_lib:format( \
\"ERTS_INCLUDE_DIR ?= ~s/erts-~s/include/~n\" \
\"ERL_INTERFACE_INCLUDE_DIR ?= ~s~n\" \
diff --git a/plugins/ci.mk b/plugins/ci.mk
index 4f338b3..11be218 100644
--- a/plugins/ci.mk
+++ b/plugins/ci.mk
@@ -42,16 +42,12 @@ endef
$(foreach otp,$(CI_OTP),$(eval $(call ci_otp_target,$(otp))))
-define kerl_fetch
- $(call core_http_get,$(KERL),$(KERL_URL))
- chmod +x $(KERL)
-endef
-
$(KERL):
- @$(call kerl_fetch)
+ $(gen_verbose) $(call core_http_get,$(KERL),$(KERL_URL))
+ $(verbose) chmod +x $(KERL)
help::
- @printf "%s\n" "" \
+ $(verbose) printf "%s\n" "" \
"Continuous Integration targets:" \
" ci Run '$(MAKE) tests' on all configured Erlang versions." \
"" \
diff --git a/plugins/cover.mk b/plugins/cover.mk
index f8734ee..41a0c45 100644
--- a/plugins/cover.mk
+++ b/plugins/cover.mk
@@ -13,7 +13,7 @@ COVER_MODS = $(notdir $(basename $(call core_ls,ebin/*.beam)))
test-build:: $(TEST_DIR)/ct.cover.spec
$(TEST_DIR)/ct.cover.spec:
- @echo Cover mods: $(COVER_MODS)
+ $(verbose) echo Cover mods: $(COVER_MODS)
$(gen_verbose) printf "%s\n" \
'{incl_mods,[$(subst $(space),$(comma),$(COVER_MODS))]}.' \
'{export,"$(CURDIR)/ct.coverdata"}.' > $@
@@ -27,7 +27,7 @@ endif
ifdef COVER
ifneq ($(COVER_REPORT_DIR),)
tests::
- @$(MAKE) --no-print-directory cover-report
+ $(verbose) $(MAKE) --no-print-directory cover-report
endif
endif
@@ -38,7 +38,7 @@ distclean:: cover-report-clean
endif
help::
- @printf "%s\n" "" \
+ $(verbose) printf "%s\n" "" \
"Cover targets:" \
" cover-report Generate a HTML coverage report from previously collected" \
" cover data." \
diff --git a/plugins/ct.mk b/plugins/ct.mk
index 7e0f683..fb4b1ca 100644
--- a/plugins/ct.mk
+++ b/plugins/ct.mk
@@ -19,7 +19,7 @@ tests:: ct
distclean:: distclean-ct
help::
- @printf "%s\n" "" \
+ $(verbose) printf "%s\n" "" \
"Common_test targets:" \
" ct Run all the common_test suites for this project" \
"" \
@@ -39,13 +39,13 @@ ifeq ($(CT_SUITES),)
ct:
else
ct: test-build
- @mkdir -p $(CURDIR)/logs/
+ $(verbose) mkdir -p $(CURDIR)/logs/
$(gen_verbose) $(CT_RUN) -suite $(addsuffix _SUITE,$(CT_SUITES)) $(CT_OPTS)
endif
define ct_suite_target
ct-$(1): test-build
- @mkdir -p $(CURDIR)/logs/
+ $(verbose) mkdir -p $(CURDIR)/logs/
$(gen_verbose) $(CT_RUN) -suite $(addsuffix _SUITE,$(1)) $(CT_OPTS)
endef
diff --git a/plugins/dialyzer.mk b/plugins/dialyzer.mk
index c432d5b..ddced75 100644
--- a/plugins/dialyzer.mk
+++ b/plugins/dialyzer.mk
@@ -20,7 +20,7 @@ check:: dialyze
distclean:: distclean-plt
help::
- @printf "%s\n" "" \
+ $(verbose) printf "%s\n" "" \
"Dialyzer targets:" \
" plt Build a PLT file for this project" \
" dialyze Analyze the project using Dialyzer"
@@ -28,7 +28,7 @@ help::
# Plugin-specific targets.
$(DIALYZER_PLT): deps app
- @dialyzer --build_plt --apps erts kernel stdlib $(PLT_APPS) $(OTP_DEPS) $(ALL_DEPS_DIRS)
+ $(verbose) dialyzer --build_plt --apps erts kernel stdlib $(PLT_APPS) $(OTP_DEPS) $(ALL_DEPS_DIRS)
plt: $(DIALYZER_PLT)
@@ -40,4 +40,4 @@ dialyze:
else
dialyze: $(DIALYZER_PLT)
endif
- @dialyzer --no_native $(DIALYZER_DIRS) $(DIALYZER_OPTS)
+ $(verbose) dialyzer --no_native $(DIALYZER_DIRS) $(DIALYZER_OPTS)
diff --git a/plugins/elvis.mk b/plugins/elvis.mk
index c0cca9e..3f4419a 100644
--- a/plugins/elvis.mk
+++ b/plugins/elvis.mk
@@ -17,7 +17,7 @@ ELVIS_OPTS ?=
# Core targets.
help::
- @printf "%s\n" "" \
+ $(verbose) printf "%s\n" "" \
"Elvis targets:" \
" elvis Run Elvis using the local elvis.config or download the default otherwise"
@@ -26,14 +26,14 @@ distclean:: distclean-elvis
# Plugin-specific targets.
$(ELVIS):
- @$(call core_http_get,$(ELVIS),$(ELVIS_URL))
- @chmod +x $(ELVIS)
+ $(gen_verbose) $(call core_http_get,$(ELVIS),$(ELVIS_URL))
+ $(verbose) chmod +x $(ELVIS)
$(ELVIS_CONFIG):
- @$(call core_http_get,$(ELVIS_CONFIG),$(ELVIS_CONFIG_URL))
+ $(verbose) $(call core_http_get,$(ELVIS_CONFIG),$(ELVIS_CONFIG_URL))
elvis: $(ELVIS) $(ELVIS_CONFIG)
- @$(ELVIS) rock -c $(ELVIS_CONFIG) $(ELVIS_OPTS)
+ $(verbose) $(ELVIS) rock -c $(ELVIS_CONFIG) $(ELVIS_OPTS)
distclean-elvis:
$(gen_verbose) rm -rf $(ELVIS)
diff --git a/plugins/escript.mk b/plugins/escript.mk
index 534db61..42133eb 100644
--- a/plugins/escript.mk
+++ b/plugins/escript.mk
@@ -21,7 +21,7 @@ ESCRIPT_STATIC ?= "deps/*/priv/**", "priv/**"
distclean:: distclean-escript
help::
- @printf "%s\n" "" \
+ $(verbose) printf "%s\n" "" \
"Escript targets:" \
" escript Build an executable escript archive" \
diff --git a/plugins/eunit.mk b/plugins/eunit.mk
index 79add79..2adf4a6 100644
--- a/plugins/eunit.mk
+++ b/plugins/eunit.mk
@@ -13,7 +13,7 @@ EUNIT_OPTS ?=
tests:: eunit
help::
- @printf "%s\n" "" \
+ $(verbose) printf "%s\n" "" \
"EUnit targets:" \
" eunit Run all the EUnit tests for this project"
diff --git a/plugins/protobuffs.mk b/plugins/protobuffs.mk
index b0400bf..550be43 100644
--- a/plugins/protobuffs.mk
+++ b/plugins/protobuffs.mk
@@ -9,10 +9,10 @@ proto_verbose = $(proto_verbose_$(V))
# Core targets.
define compile_proto
- @mkdir -p ebin/ include/
+ $(verbose) mkdir -p ebin/ include/
$(proto_verbose) $(call erlang,$(call compile_proto.erl,$(1)))
$(proto_verbose) erlc +debug_info -o ebin/ ebin/*.erl
- @rm ebin/*.erl
+ $(verbose) rm ebin/*.erl
endef
define compile_proto.erl
diff --git a/plugins/relx.mk b/plugins/relx.mk
index e38c9d0..063a475 100644
--- a/plugins/relx.mk
+++ b/plugins/relx.mk
@@ -32,16 +32,12 @@ distclean:: distclean-relx-rel distclean-relx
# Plugin-specific targets.
-define relx_fetch
- $(call core_http_get,$(RELX),$(RELX_URL))
- chmod +x $(RELX)
-endef
-
$(RELX):
- @$(call relx_fetch)
+ $(gen_verbose) $(call core_http_get,$(RELX),$(RELX_URL))
+ $(verbose) chmod +x $(RELX)
relx-rel: $(RELX)
- @$(RELX) -c $(RELX_CONFIG) $(RELX_OPTS)
+ $(verbose) $(RELX) -c $(RELX_CONFIG) $(RELX_OPTS)
distclean-relx-rel:
$(gen_verbose) rm -rf $(RELX_OUTPUT_DIR)
@@ -65,10 +61,10 @@ endef
RELX_RELEASE = `$(call erlang,$(get_relx_release.erl))`
run: all
- @$(RELX_OUTPUT_DIR)/$(RELX_RELEASE)/bin/$(RELX_RELEASE) console
+ $(verbose) $(RELX_OUTPUT_DIR)/$(RELX_RELEASE)/bin/$(RELX_RELEASE) console
help::
- @printf "%s\n" "" \
+ $(verbose) printf "%s\n" "" \
"Relx targets:" \
" run Compile the project, build the release and run it"
diff --git a/plugins/shell.mk b/plugins/shell.mk
index 6636b92..7f32936 100644
--- a/plugins/shell.mk
+++ b/plugins/shell.mk
@@ -13,7 +13,7 @@ ALL_SHELL_DEPS_DIRS = $(addprefix $(DEPS_DIR)/,$(SHELL_DEPS))
# Core targets
help::
- @printf "%s\n" "" \
+ $(verbose) printf "%s\n" "" \
"Shell targets:" \
" shell Run an erlang shell with SHELL_OPTS or reasonable default"
@@ -22,7 +22,7 @@ help::
$(foreach dep,$(SHELL_DEPS),$(eval $(call dep_target,$(dep))))
build-shell-deps: $(ALL_SHELL_DEPS_DIRS)
- @for dep in $(ALL_SHELL_DEPS_DIRS) ; do $(MAKE) -C $$dep ; done
+ $(verbose) for dep in $(ALL_SHELL_DEPS_DIRS) ; do $(MAKE) -C $$dep ; done
shell: build-shell-deps
$(gen_verbose) erl $(SHELL_PATH) $(SHELL_OPTS)
diff --git a/plugins/triq.mk b/plugins/triq.mk
index 702491d..77775f6 100644
--- a/plugins/triq.mk
+++ b/plugins/triq.mk
@@ -28,11 +28,11 @@ endef
ifdef t
ifeq (,$(findstring :,$(t)))
triq: test-build
- @$(call erlang,$(call triq_check.erl,module,$(t)))
+ $(verbose) $(call erlang,$(call triq_check.erl,module,$(t)))
else
triq: test-build
- @echo Testing $(t)/0
- @$(call erlang,$(call triq_check.erl,function,$(t)()))
+ $(verbose) echo Testing $(t)/0
+ $(verbose) $(call erlang,$(call triq_check.erl,function,$(t)()))
endif
else
triq: test-build
diff --git a/plugins/xref.mk b/plugins/xref.mk
index 10a005e..ab3619b 100644
--- a/plugins/xref.mk
+++ b/plugins/xref.mk
@@ -19,7 +19,7 @@ XREFR_URL ?= https://github.com/inaka/xref_runner/releases/download/0.2.2/xrefr
# Core targets.
help::
- @printf "%s\n" "" \
+ $(verbose) printf "%s\n" "" \
"Xref targets:" \
" xref Run Xrefr using $XREF_CONFIG as config file if defined"
@@ -28,8 +28,8 @@ distclean:: distclean-xref
# Plugin-specific targets.
$(XREFR):
- @$(call core_http_get,$(XREFR),$(XREFR_URL))
- @chmod +x $(XREFR)
+ $(gen_verbose) $(call core_http_get,$(XREFR),$(XREFR_URL))
+ $(verbose) chmod +x $(XREFR)
xref: deps app $(XREFR)
$(gen_verbose) $(XREFR) $(XREFR_ARGS)