Created
April 28, 2024 07:04
-
-
Save ceving/edeb6f58429d552e8828a70640db3d6e to your computer and use it in GitHub Desktop.
Makefile example for Go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module:=$(shell go list -f '{{.Module}}' .) | |
source:=$(shell go list -f '{{join .GoFiles "\n"}}' $(module)) | |
embedded:=$(shell go list -f '{{join .EmbedFiles "\n"}}' $(module)) | |
build: $(module) | |
$(module): $(source) $(embedded) | |
go build -v $(module) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment