Skip to content

Commit

Permalink
Allow builds outside of GOPATH to work
Browse files Browse the repository at this point in the history
`go list` produces different results for vendored code when not under GOPATH.
  • Loading branch information
thockin committed Dec 31, 2016
1 parent ef44fa1 commit cb8cf1a
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions Makefile.generated_files
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,14 @@ $(DEEPCOPY_FILES): $(DEEPCOPY_GEN)
$(META_DIR)/$(DEEPCOPY_GEN).mk:
mkdir -p $(@D); \
(echo -n "$(DEEPCOPY_GEN): "; \
DIRECT=$$(go list -f '{{.Dir}} {{.Dir}}/*.go' \
DIRECT=$$(./hack/run-in-gopath.sh go list -f '{{.Dir}} {{.Dir}}/*.go' \
./cmd/libs/go2idl/deepcopy-gen); \
INDIRECT=$$(go list \
INDIRECT=$$(./hack/run-in-gopath.sh go list \
-f '{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
./cmd/libs/go2idl/deepcopy-gen \
| grep --color=never "^$(PRJ_SRC_PATH)" \
| sed 's|^$(PRJ_SRC_PATH)|./|' \
| xargs go list -f '{{.Dir}} {{.Dir}}/*.go'); \
| xargs ./hack/run-in-gopath.sh go list -f '{{.Dir}} {{.Dir}}/*.go'); \
echo $$DIRECT $$INDIRECT \
| sed 's/ / \\=,/g' \
| tr '=,' '\n\t'; \
Expand Down Expand Up @@ -424,14 +424,14 @@ $(DEFAULTER_FILES): $(DEFAULTER_GEN)
$(META_DIR)/$(DEFAULTER_GEN).mk:
mkdir -p $(@D); \
(echo -n "$(DEFAULTER_GEN): "; \
DIRECT=$$(go list -f '{{.Dir}} {{.Dir}}/*.go' \
DIRECT=$$(./hack/run-in-gopath.sh go list -f '{{.Dir}} {{.Dir}}/*.go' \
./cmd/libs/go2idl/defaulter-gen); \
INDIRECT=$$(go list \
INDIRECT=$$(./hack/run-in-gopath.sh go list \
-f '{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
./cmd/libs/go2idl/defaulter-gen \
| grep --color=never "^$(PRJ_SRC_PATH)" \
| sed 's|^$(PRJ_SRC_PATH)|./|' \
| xargs go list -f '{{.Dir}} {{.Dir}}/*.go'); \
| xargs ./hack/run-in-gopath.sh go list -f '{{.Dir}} {{.Dir}}/*.go'); \
echo $$DIRECT $$INDIRECT \
| sed 's/ / \\=,/g' \
| tr '=,' '\n\t'; \
Expand Down Expand Up @@ -531,14 +531,14 @@ $(OPENAPI_OUTFILE): $(OPENAPI_GEN) $(OPENAPI_GEN)
$(META_DIR)/$(OPENAPI_GEN).mk:
mkdir -p $(@D); \
(echo -n "$(OPENAPI_GEN): "; \
DIRECT=$$(go list -f '{{.Dir}} {{.Dir}}/*.go' \
DIRECT=$$(./hack/run-in-gopath.sh go list -f '{{.Dir}} {{.Dir}}/*.go' \
./cmd/libs/go2idl/openapi-gen); \
INDIRECT=$$(go list \
INDIRECT=$$(./hack/run-in-gopath.sh go list \
-f '{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
./cmd/libs/go2idl/openapi-gen \
| grep --color=never "^$(PRJ_SRC_PATH)" \
| sed 's|^$(PRJ_SRC_PATH)|./|' \
| xargs go list -f '{{.Dir}} {{.Dir}}/*.go'); \
| xargs ./hack/run-in-gopath.sh go list -f '{{.Dir}} {{.Dir}}/*.go'); \
echo $$DIRECT $$INDIRECT \
| sed 's/ / \\=,/g' \
| tr '=,' '\n\t'; \
Expand Down Expand Up @@ -726,14 +726,14 @@ $(CONVERSION_FILES): $(CONVERSION_GEN)
$(META_DIR)/$(CONVERSION_GEN).mk:
mkdir -p $(@D); \
(echo -n "$(CONVERSION_GEN): "; \
DIRECT=$$(go list -f '{{.Dir}} {{.Dir}}/*.go' \
DIRECT=$$(./hack/run-in-gopath.sh go list -f '{{.Dir}} {{.Dir}}/*.go' \
./cmd/libs/go2idl/conversion-gen); \
INDIRECT=$$(go list \
INDIRECT=$$(./hack/run-in-gopath.sh go list \
-f '{{range .Deps}}{{.}}{{"\n"}}{{end}}' \
./cmd/libs/go2idl/conversion-gen \
| grep --color=never "^$(PRJ_SRC_PATH)" \
| sed 's|^$(PRJ_SRC_PATH)|./|' \
| xargs go list -f '{{.Dir}} {{.Dir}}/*.go'); \
| xargs ./hack/run-in-gopath.sh go list -f '{{.Dir}} {{.Dir}}/*.go'); \
echo $$DIRECT $$INDIRECT \
| sed 's/ / \\=,/g' \
| tr '=,' '\n\t'; \
Expand Down

0 comments on commit cb8cf1a

Please sign in to comment.