-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
make: 'go build' does not run when TAGS change #10196
Comments
silverwind
changed the title
make: 'go build' does run when TAGS change
make: 'go build' does not run when TAGS change
Feb 8, 2020
Yes, it's a good point. I'd write the tags to an evidence file, but only if different. Something like:
|
I wonder if it is safe to skip the |
No. Do not skip generate. Even if it does nothing at present - we should start using generate more. |
silverwind
added a commit
to silverwind/gitea
that referenced
this issue
Feb 10, 2020
Write out TAGS to .make_evidence/tags and compare it to the previous invocation. If they differ, insert the evidence file into the prereqs of targets that use TAGS. I made it .PHONY so it always builds. I did not include the prereq on release tasks, asssuming the will always do a clean build. Fixes: go-gitea#10196
sapk
added a commit
that referenced
this issue
Feb 11, 2020
Write out TAGS to .make_evidence/tags and compare it to the previous invocation. If they differ, insert the evidence file into the prereqs of targets that use TAGS. I made it .PHONY so it always builds. I did not include the prereq on release tasks, asssuming the will always do a clean build. Fixes: #10196 Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The intentions is to first build with bindata, then without.
I still observe a bindata executable after the second build because
go build
never ran (make
thinks the executable is already up to date). We somehow need to triggergo build
when the value ofTAGS
differs from the previous build.I'm not exactly sure how to best achieve that except writing out the last TAGS to a evidence file after build and only write the file again when TAGS differs from the file's content. If there are other environment variables that can affect the build, they would need the same treatment.
cc: @guillep2k
The text was updated successfully, but these errors were encountered: