From 18ff88b714ebeb581abb239e52f40c74ad7c26a0 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Sat, 17 Sep 2022 15:09:52 -0500 Subject: [PATCH] feat: add line numbers to debug output with cat --- src/runners.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runners.mk b/src/runners.mk index 1303137..e1710a6 100644 --- a/src/runners.mk +++ b/src/runners.mk @@ -10,7 +10,9 @@ create_string = $(subst $(\n),\n,$(call escape_shellstring,$(call escape_printf, printline = printf -- "<----------------------------------->\n" ifdef DEBUG define _debug_runner -@printf "$(1) Script:\n";$(printline);printf "$(call create_string,$(3))\n";$(printline) +@printf "$(1) Script:\n";$(printline); +@printf "$(call create_string,$(3))\n" | cat -n +@$(printline) @printf "$(call create_string,$(3))" | $(2) endef py = $(call _debug_runner,Python,python3,$($(1)))