Skip to content
This repository has been archived by the owner on Feb 12, 2021. It is now read-only.

tools/Makefile standard #49

Open
jaekwon opened this issue Jan 16, 2018 · 2 comments
Open

tools/Makefile standard #49

jaekwon opened this issue Jan 16, 2018 · 2 comments
Assignees
Labels

Comments

@jaekwon
Copy link
Contributor

jaekwon commented Jan 16, 2018

Isolated the tools such that we only need to install glide, then everything else happens from within the tools dir. The binaries are installed in tools/bin after glide install from within the tools dir.

The point is to only require github.com/tendermint/glide, which we control, which becomes the entrypoint to download all other dependencies (including tools).

We can't do it in the project root dir because glide can't deal with multiple glide.yaml files, and there's no way to tell glide to only install the testImports (and there are no "toolImports"). So the only alternative is to put it all in the project root's glide.yaml, but then we end up calling glide install once to download all the vendor deps, and then later we'd end up doing it again, as we like to rm ./vendor upon gen_vendor_deps. So, this is not only more modular (e.g. could be handled as a github submodule perhaps for all projects, and we can put common Makefiles in there), but also more efficient to have two dirs and two glide.yaml files.

cosmos/cosmos-sdk#331

Proposal 1

The proposal is to make this the standard for all of our projects that require tools besides glide. In addition,

  • We shouldn't use Mastermind glide, but Tendermint's fork of glide.
  • If we need to install gox (@melekes says it doesn't really help), we should install it the same way.

Proposal 2

The next person to touch any Makefile should convert over to using this template by copying over the test dir from github.com/cosmos/cosmos-sdk, and also make the Makefile structure more or less conform to the Makefile standard.

@jaekwon jaekwon changed the title Tool Makefile standard tools/Makefile standard Jan 16, 2018
@melekes
Copy link
Contributor

melekes commented Jan 17, 2018

👍

Did not know that glide can install binaries to path other than GOPATH/bin.
Oh, I see. You're installing them manually by calling go build -o .... I guess it's fine. Could be simplified though using for loop.

@zramsay
Copy link
Contributor

zramsay commented Jan 21, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants