From 3307e5cf2bfc619baae3d9aca6912d72e4611b59 Mon Sep 17 00:00:00 2001 From: Quentin Monnet Date: Wed, 22 Nov 2023 15:37:56 +0000 Subject: [PATCH] Makefile: Fix awk command in "make help" Typing "make help" currently prints a waring from awk (GNU Awk 5.1.0): $ make help Usage: make Targets: awk: cmd. line:1: warning: regexp escape sequence `\_' is not a known regexp operator pwru Build the GO binary release Build the GO binary within a Docker container local-release Build a new release install Install the GO Binary to the location specified by 'BINDIR' clean Clean up build artifacts test Run GO tests help Show this hel This is because the Makefile escapes the underscore ("\_"). As far as I know, there is no reason to escape it, so we can just remove the backslash. In the same list of characters, there's no reason to escape the dash either, the man page for GNU Awk says: "To include a literal dash in the list, put it first or last", so we can just do that. Signed-off-by: Quentin Monnet --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d3a83707..9d13cf5b 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ help: @echo '' @echo 'Targets:' - @awk '/^[a-zA-Z\-\_0-9]+:/ { \ + @awk '/^[a-zA-Z0-9_-]+:/ { \ helpMessage = match(lastLine, /^## (.*)/); \ if (helpMessage) { \ helpCommand = substr($$1, 0, index($$1, ":")-1); \