Skip to content
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

Makefile: Simplify to run faster #13939

Merged
merged 1 commit into from
Nov 9, 2020
Merged

Makefile: Simplify to run faster #13939

merged 1 commit into from
Nov 9, 2020

Conversation

jrajahalme
Copy link
Member

Avoid using grep options that are not supported on macOS. This
eliminates errors like this:

grep: repetition-operator operand invalid
expr: syntax error
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
        [-e pattern] [-f file] [--binary-files=value] [--color=when]
        [--context[=num]] [--directories=action] [--label] [--line-buffered]
        [--null] [pattern] [file ...]

Make 'go list' faster by adding '-find' option that eliminates
resolution of some state we are not using:

 "The -find flag causes list to identify the named packages but not
 resolve their dependencies: the Imports and Deps lists will be empty."

This makes 'make nothing' to run about twice as fast as before,
especially in the dev VM.

Signed-off-by: Jarno Rajahalme jarno@covalent.io

Avoid using grep options that are not supported on macOS. This
eliminates errors like this:

    grep: repetition-operator operand invalid
    expr: syntax error
    usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
            [-e pattern] [-f file] [--binary-files=value] [--color=when]
            [--context[=num]] [--directories=action] [--label] [--line-buffered]
            [--null] [pattern] [file ...]

Make 'go list' faster by adding '-find' option that eliminates
resolution of some state we are not using:

     "The -find flag causes list to identify the named packages but not
     resolve their dependencies: the Imports and Deps lists will be empty."

This makes 'make nothing' to run about twice as fast as before,
especially in the dev VM.

Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
@jrajahalme jrajahalme added release-note/minor This PR changes functionality that users may find relevant to operating Cilium. area/build Anything to do with the build, more general then area/CI labels Nov 6, 2020
@jrajahalme jrajahalme requested a review from a team as a code owner November 6, 2020 18:22
@maintainer-s-little-helper maintainer-s-little-helper bot added this to In progress in 1.10.0 Nov 6, 2020
@jrajahalme
Copy link
Member Author

test-me-please

@aanm aanm added release-note/misc This PR makes changes that have no direct user impact. and removed release-note/minor This PR changes functionality that users may find relevant to operating Cilium. labels Nov 9, 2020
@aanm aanm merged commit 51647bb into master Nov 9, 2020
@aanm aanm deleted the pr/jrajahalme/makefile-fix branch November 9, 2020 09:22
@twpayne
Copy link
Contributor

twpayne commented Nov 9, 2020

Thank you for this!

There are at least a couple of other scripts that use grep's -P (Perl-compatible regular expressions) which is not available on macOS:

https://github.com/cilium/cilium/blob/master/contrib/scripts/check-assert-deep-equals.sh#L10

https://github.com/cilium/cilium/blob/master/contrib/scripts/check-logging-subsys-field.sh#L20-L22

Would you be able to address these too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Anything to do with the build, more general then area/CI release-note/misc This PR makes changes that have no direct user impact.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants