-
Notifications
You must be signed in to change notification settings - Fork 28
feat: more human friendly makefile output prompts #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: leslie tsang <leslie.tsang@icloud.com>
|
Let's merge master to make CI pass. |
Done |
| ifneq ($(shell command -v gawk),) | ||
| ENV_HELP_AWK_RULE ?= '{ if(match($$0, /^\s*\#{3}\s*([^:]+)\s*:\s*(.*)$$/, res)){ printf(" make %-15s : %-10s\n", res[1], res[2]) } }' | ||
| else | ||
| ENV_HELP_AWK_RULE := '{ if(match($$0, /^\#\#\#([^:]+):(.*)$$/)){ split($$0, res, ":"); gsub(/^\#\#\#[ ]*/, "", res[1]); _desc=$$0; gsub(/^\#\#\#([^:]+):[ \t]*/, "", _desc); printf(" make %-15s : %-10s\n", res[1], _desc) } }' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I am you, I will prompt that people should use gawk instead. mawk is faster. But it doesn't support UTF8 well and one day you will find the support of mawk should be dropped.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense, thanks for suggestion.
I add it for run test in container, I had change my mind. no necessary to increase maintenance costs
Makefile rules: help: Show Makefile rules. dev: Create a development ENV test: Run the test case clean: Clean the test case[ info ] Makefile rules: make help : Show Makefile rules make dev : Create a development ENV make test : Run the test case make clean : Clean the test caseSigned-off-by: leslie tsang leslie.tsang@icloud.com