diff --git a/docs/usage.md b/docs/usage.md index 3ddaf92..a796c5a 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -87,7 +87,7 @@ may be easier than balancing sub-shells and strung together awk commands. When `make` expands the function it will take the parameters passed to `py` and expand them. `$(1)` is the variable name and `$(2)` in this case is the implicit pattern from the rule. Pay attention to quotes. -If you need to debug your python script, use `DEBUG=1` when you run `make` and it will first print the script that will be piped to `python`. +If you need to debug your python script, use `TASKMK_DEBUG=1` when you run `make` and it will first print the script that will be piped to `python`. ```make define list_files_py diff --git a/src/runners.mk b/src/runners.mk index 200a09f..5cb406b 100644 --- a/src/runners.mk +++ b/src/runners.mk @@ -8,7 +8,7 @@ _escape_shellstring = $(subst `,\`,$(subst ",\",$(subst $$,\$$,$(subst \,\\,$1)) _escape_printf = $(subst \,\\,$(subst %,%%,$1)) _create_string = $(subst $(_newline),\n,$(call _escape_shellstring,$(call _escape_printf,$1))) _printline = printf -- "<----------------------------------->\n" -ifdef DEBUG +ifdef TASKMK_DEBUG define _debug_runner @printf "$(1) Script:\n";$(_printline); @printf "$(call _create_string,$(3))\n" | cat -n diff --git a/task.mk b/task.mk index 80f8c3b..f077f19 100644 --- a/task.mk +++ b/task.mk @@ -1,7 +1,7 @@ # }> [github.com/daylinmorgan/task.mk] <{ # # Copyright (c) 2022 Daylin Morgan # MIT License -# version: v22.9.28-4-gbf0394c-dev +# version: v22.9.28-5-g83fe41d-dev # # task.mk should be included at the bottom of your Makefile with `-include .task.mk` # See below for the standard configuration options that should be set prior to including this file. @@ -64,7 +64,7 @@ _escape_shellstring = $(subst `,\`,$(subst ",\",$(subst $$,\$$,$(subst \,\\,$1)) _escape_printf = $(subst \,\\,$(subst %,%%,$1)) _create_string = $(subst $(_newline),\n,$(call _escape_shellstring,$(call _escape_printf,$1))) _printline = printf -- "<----------------------------------->\n" -ifdef DEBUG +ifdef TASKMK_DEBUG define _debug_runner @printf "$(1) Script:\n";$(_printline); @printf "$(call _create_string,$(3))\n" | cat -n