From bf5cece51a20eb4773d196ec650fb3af574afa17 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Mon, 12 Feb 2024 16:18:03 -0600 Subject: mk: initial commit This is a complete overhaul of the build system. This new implementations upports many new features and is very extensible. --- mk/output.mk | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 mk/output.mk (limited to 'mk/output.mk') 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) -- cgit v1.2.3