Allows specifying `LD_FLAGS` during development builds.
```
$ LD_FLAGS="-linkmode=external" make dev
```
Since the version of DTrace on macOS Sierra (On the public beta's at least) has been updated, this allows DTrace to run on Terraform during development/debugging.
```
$ sudo dtrace -n 'pid$target::main.main:entry' -c "terraform apply"
dtrace: description 'pid$target::main.main:entry' matched 1 probe
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Outputs:
foo = bar
dtrace: pid 23096 has exited
CPU ID FUNCTION:NAME
2 265673 main.main:entry
```
Also redirects the `@which stringer` command inside the `generate` Makefile target to `/dev/null` so we stop echoing the path to the `stringer` binary on every call to `generate`.
Doing a straight `./...` build results in errors from unvendored
package references being picked up in some vendored libraries'
`examples/` subdirs.
So we'll switch to the recommended `go list | grep -v /vendor/` strategy
to determine what to build.
* Remove `make updatedeps` from Travis build. We'll follow up with more
specific plans around dependency updating in subsequent PRs.
* Update all `make` targets to set `GO15VENDOREXPERIMENT=1` and to
filter out `/vendor/` from `./...` where appropriate.
* Temporarily remove `vet` from the `make test` target until we can
figure out how to get it to not vet `vendor/`. (Initial
experimentation failed to yield the proper incantation.)
Everything is pinned to current master, with the exception of:
* Azure/azure-sdk-for-go which is pinned before the breaking change today
* aws/aws-sdk-go which is pinned to the most recent tag
The documentation still needs to be updated, which we can do in a follow
up PR. The goal here is to unblock release.
If GOPATH/bin doesn't exists the build scripts just exists, leaving the
`terraform/bin` folder with only one single binary called `terraform`.
Discovered while setting up a new GOPATH just for terraform.
For now, make dev creates in ${MAIN_GOPATH}/bin/ files like 'provider-google' alongside with 'terraform-provider-google'.
If we decided to build plugins with custom names and install them manually with 'cp' command, it could make sense not to do it here.