3 ms·
You really don't want to do that. I know what you mean but the go command handles the dependency stuff. Trying to shoe horn that into a Makefile is a disaster.
by jgrahamc 9y ago
You really don't want to do that. I know what you mean but the go command handles the dependency stuff. Trying to shoe horn that into a Makefile is a disaster.
- zeveb 9y agoIt's doable though: 'go list -f "{{.Stale}}" $PACKAGE' can be used to determine if a package needs to be rebuilt; this can be used in a make rule which touches a stamp file, and then the stamp file may be relied upon for other make rules. My quibble with the example Makefile as written is that it doesn't utilise 'go install,' which I much prefer to 'go build.'