summaryrefslogtreecommitdiff
path: root/mk/output.mk
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2024-02-12 16:18:03 -0600
committerAlejandro Soto <alejandro@34project.org>2024-02-20 11:11:18 -0600
commitbf5cece51a20eb4773d196ec650fb3af574afa17 (patch)
tree8abd33c815b38a3dee673ea345f106d4ddcae9ab /mk/output.mk
parent691a441bfeb90642840d2869cb04ec146e274a1e (diff)
mk: initial commit
This is a complete overhaul of the build system. This new implementations upports many new features and is very extensible.
Diffstat (limited to '')
-rw-r--r--mk/output.mk12
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)