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

fix: Fix makefile help rule #3021

Merged
merged 1 commit into from Feb 23, 2024
Merged

fix: Fix makefile help rule #3021

merged 1 commit into from Feb 23, 2024

Conversation

bryanhuhta
Copy link
Contributor

Previously, running make help would display:

Makefile                       Build, test, and lint (default)
Makefile                       Do a dev build (without requiring the frontend)
Makefile                       Do a production build (requiring the frontend build to be present)
Makefile                       Delete intermediate build artifacts
Makefile                       Automatically fix some lint errors
Makefile                       Regenerate protobuf
Makefile                       Describe useful make targets
Makefile                       Lint Go, Helm and protobuf
Makefile                       Generates the reference help documentation.
Makefile                       Create a release
Makefile                       Run the pyroscope binary (pass parameters with 'make run PARAMS=-myparam')
Makefile                       Run unit tests

This is caused by a second makefile Makefile.examples adding another file to grep in MAKEFILE_LIST. Now running make help will display:

Makefile:all                                       Build, test, and lint (default)
Makefile:build-dev                                 Do a dev build (without requiring the frontend)
Makefile:build                                     Do a production build (requiring the frontend build to be present)
Makefile:clean                                     Delete intermediate build artifacts
Makefile:fmt                                       Automatically fix some lint errors
Makefile:frontend/build                            Do a production build for the frontend
Makefile:generate                                  Regenerate protobuf
Makefile:help                                      Describe useful make targets
Makefile:lint                                      Lint Go, Helm and protobuf
Makefile:reference-help                            Generates the reference help documentation.
Makefile:release/build/all                         Build all release binaries
Makefile:release/build                             Build current platform release binaries
Makefile:release/prepare                           Prepare a release
Makefile:release/prereq                            Ensure release pre requesites are met
Makefile:release                                   Create a release
Makefile:run                                       Run the pyroscope binary (pass parameters with 'make run PARAMS=-myparam')
Makefile:test                                      Run unit tests

And if help text is added to rules in Makefile.examples, it would look like this:

Makefile.examples:tools/update_examples            Updates example projects
Makefile:all                                       Build, test, and lint (default)
Makefile:build-dev                                 Do a dev build (without requiring the frontend)
Makefile:build                                     Do a production build (requiring the frontend build to be present)
Makefile:clean                                     Delete intermediate build artifacts
Makefile:fmt                                       Automatically fix some lint errors
Makefile:frontend/build                            Do a production build for the frontend
Makefile:generate                                  Regenerate protobuf
Makefile:help                                      Describe useful make targets
Makefile:lint                                      Lint Go, Helm and protobuf
Makefile:reference-help                            Generates the reference help documentation.
Makefile:release/build/all                         Build all release binaries
Makefile:release/build                             Build current platform release binaries
Makefile:release/prepare                           Prepare a release
Makefile:release/prereq                            Ensure release pre requesites are met
Makefile:release                                   Create a release
Makefile:run                                       Run the pyroscope binary (pass parameters with 'make run PARAMS=-myparam')
Makefile:test                                      Run unit tests

@bryanhuhta bryanhuhta self-assigned this Feb 22, 2024
@bryanhuhta bryanhuhta requested a review from a team as a code owner February 22, 2024 20:56
@bryanhuhta bryanhuhta enabled auto-merge (squash) February 23, 2024 00:13
Copy link
Contributor

@aleks-p aleks-p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks much better!

@bryanhuhta bryanhuhta merged commit 30d1c74 into main Feb 23, 2024
19 checks passed
@bryanhuhta bryanhuhta deleted the fix-makefile branch February 23, 2024 16:33
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.

None yet

2 participants