Skip to content

Conversation

@leslie-tsang
Copy link
Contributor

  1. add makefile default target
  2. more human friendly makefile output prompts

before

Makefile rules:

    help:         Show Makefile rules.
    dev:          Create a development ENV
    test:         Run the test case
    clean:        Clean the test case

after

[ 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 case

Signed-off-by: leslie tsang leslie.tsang@icloud.com

Signed-off-by: leslie tsang <leslie.tsang@icloud.com>
@CLAassistant
Copy link

CLAassistant commented Sep 25, 2021

CLA assistant check
All committers have signed the CLA.

@spacewander
Copy link
Contributor

Let's merge master to make CI pass.

@leslie-tsang
Copy link
Contributor Author

Let's merge master to make CI pass.

Done

@membphis membphis self-requested a review January 14, 2022 01:54
@leslie-tsang leslie-tsang requested a review from membphis January 14, 2022 03:55
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) } }'
Copy link
Contributor

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.

Copy link
Contributor Author

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

@spacewander spacewander merged commit d6a0155 into api7:master Jan 14, 2022
@leslie-tsang leslie-tsang deleted the feature/makefile-optimize branch January 14, 2022 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants