From fbaec0bb9e83038e730cf7fa7fa29d7ce498536b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 10 Jan 2019 12:56:26 +0100 Subject: [PATCH] Makefile: make help: fix newline wrapping, and missing targets This patch; - adds support for multiple newlines - removes the 1-space indentation of wrapped lines - allows numerical characters in targets (0-9) Given these targets: ```Makefile .PHONY: foobar foobar: ## runs the foobar lorum ipsum.\nand so pn\nand so on echo foobar .PHONY: e2e-tests e2e-tests: ## runs the end-to-end tests echo e2e-tests ``` Before this change, the output of `make help` was ``` foobar runs the foobar lorum ipsum. and so pn\nand so on ``` After this change, the output is: ``` foobar runs the foobar lorum ipsum. and so pn and so on e2e-tests runs the end-to-end tests ``` Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 202c9d8c98614e7cce2017f5c99d3d783fe8b509) Signed-off-by: Sebastiaan van Stijn Upstream-commit: 733b86683f347f922affc714d305d9f03fe9b47e Component: engine --- components/engine/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/Makefile b/components/engine/Makefile index 8c2c66030e..686b62ffcf 100644 --- a/components/engine/Makefile +++ b/components/engine/Makefile @@ -152,7 +152,7 @@ cross: build ## cross build the binaries for darwin, freebsd and\nwindows $(DOCKER_RUN_DOCKER) hack/make.sh dynbinary binary cross help: ## this help - @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {gsub("\\\\n",sprintf("\n%22c",""), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) install: ## install the linux binaries KEEPBUNDLE=1 hack/make.sh install-binary