-
Notifications
You must be signed in to change notification settings - Fork 453
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
Various Makefile improvements #1140
Conversation
Makefile: Allow using `VERSION` to provide a version override when building the project. This allows for building using a tarball, without requiring git.
Makefile: Allow providing `GO_LDFLAGS` externally (e.g. via export of the variable in the build environment), which is what downstream distributions use to build with their linker flags (e.g. for external link mode and/or debug packages). This prepends externally provided `GO_LDFLAGS` to the version declaration.
Makefile: Allow providing `GOFLAGS` in the build environment to set go compiler flags and set the default to `-trimpath`. This is required for downstream distributions to be able to build position independent executables and working debug symbols.
Makefile: Allow setting CGO_ENABLED (defaults to 0).
Welcome @dvzrv! |
Switch to using source tarball by patching Makefile: kubernetes-sigs/cri-tools#1140 Attempt to get debug package to work. git-svn-id: file:///srv/repos/svn-community/svn@1447263 9fca08f4-af9d-4005-b8df-a31f2cc04f65
Switch to using source tarball by patching Makefile: kubernetes-sigs/cri-tools#1140 Attempt to get debug package to work. git-svn-id: file:///srv/repos/svn-community/svn@1447263 9fca08f4-af9d-4005-b8df-a31f2cc04f65
kubernetes-sigs/cri-tools#1140 debug package to work.
@dvzrv may I ask you to sign the CLA? |
It's done. I didn't realize there was a CLA for this project and I am not so super happy about it 😢 |
Thank you @dvzrv ! 🙏 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dvzrv, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
What this PR does / why we need it:
Allows overriding various go compiler flags (
-ldflags
viaGO_LDFLAGS
,CGO_ENABLED
andGOFLAGS
).Allows building from a source tarball by allowing to provide a custom version string using
VERSION
(git
is no longer required during build time, which is great if one is relying on source tarballs to build this project).Which issue(s) this PR fixes:
Fixes #676 (auto-closed by bot...)
Special notes for your reviewer:
I am packaging this project for Arch Linux and started to more and more hack around the Makefile to be able to provide our own distribution flags and to apply our go packaging guidelines.
Does this PR introduce a user-facing change?