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: when building binary, depend on .go files #579

Merged
merged 1 commit into from
Jun 23, 2022

Conversation

joeshaw
Copy link
Member

@joeshaw joeshaw commented Jun 23, 2022

If you made a change to a source file and ran make fastly, it'd say
that fastly was up-to-date because the makefile target did not depend on
its input files. Fix that by creating a list of all the Go source files
and having the makefile target depend on it.

If you made a change to a source file and ran `make fastly`, it'd say
that fastly was up-to-date because the makefile target did not depend on
its input files.  Fix that by creating a list of all the Go source files
and having the makefile target depend on it.
@@ -21,7 +21,9 @@ LDFLAGS = -ldflags "\
-X 'github.com/fastly/cli/pkg/revision.Environment=${CLI_ENV}' \
"

fastly:
GO_FILES = $(shell find cmd pkg -type f -name '*.go')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Interestingly there are 482 go files in this project 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I was a little worried about that but I didn't see a noticeable slowdown in builds

@Integralist Integralist added the enhancement New feature or request label Jun 23, 2022
@Integralist Integralist merged commit c38a967 into fastly:main Jun 23, 2022
@joeshaw joeshaw deleted the joeshaw/make-depend-on-go-files branch June 23, 2022 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants