diff --git a/Makefile b/Makefile index 1ee4ca873d4ed8a3db49d132f1887e1c8563c85c..1b946107df04469fe748a3246e1e85c0c3303d46 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -M_DESCRIPTION="This provides some additional tools for makefiles." -M_LICENSE="Released under the BSD two-clause license, see the LICENSE file for more information." +MK_DESCRIPTION="This provides some additional tools for makefiles." +MK_LICENSE="Released under the BSD two-clause license, see the LICENSE file for more information." include makext.mk diff --git a/makext.mk b/makext.mk index 613514eaea0a1fdb5fcd40246b8a45d42b7ebdac..cf25906037595e43dbf6302c7e1f6523acad8d9f 100644 --- a/makext.mk +++ b/makext.mk @@ -13,11 +13,11 @@ # Visit the GitHub repository at https://github.com/mitjafelicijan/makext # to learn more and contribute to the project. .help: -ifdef M_DESCRIPTION - @echo "$(M_DESCRIPTION)\n" | fmt +ifdef MK_DESCRIPTION + @echo "$(MK_DESCRIPTION)\n" | fmt endif @echo "Targets:" - @grep '^.*:.* #' Makefile | sed -E 's/(.*):.*#(.*)/ \1###\2/' | column -t -s '###' -ifdef M_LICENSE - @echo "\n$(M_LICENSE)" | fmt + @grep -vE '^[[:space:]]' $(MAKEFILE_LIST) | grep -E '^.*:.* #' | sed -E 's/(.*):.*#(.*)/ \1###\2/' | column -t -s '###' +ifdef MK_LICENSE + @echo "\n$(MK_LICENSE)" | fmt endif