diff options
Diffstat (limited to 'mk/output.mk')
| -rw-r--r-- | mk/output.mk | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mk/output.mk b/mk/output.mk new file mode 100644 index 0000000..d2a3f2f --- /dev/null +++ b/mk/output.mk @@ -0,0 +1,12 @@ +$(V).SILENT: + +run = \ + $(call run_common,$(1),$(2),$(3)) \ + $(if $(V),$(newline)$(3),; trap 'echo "Exited with code $$?: $$BASH_COMMAND" >&2' ERR;) + +run_no_err = $(call run_common,$(1),$(2),$(3))$(newline)$(3) + +run_common = \ + $(3)@printf '%s %-7s %-9s %s\n' '$(build_id)' '($(rule_target))' '$(1)' '$(if $(2),$(2),$(rule_top_path))' + +run_submake = $(call run_no_err,$(1),$(2),+)$(MAKE) |
