Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make it possible to specify GOARCH when compile #2469

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ default: install
######################################## Code Check ####################################################
## Static Code Analysis
vet: swagger
GOOS=$(GOOS) GOARCH=amd64 go vet $$(GOOS=${GOOS} GOARCH=${GOARCH} go list ./...)
GOOS=$(GOOS) GOARCH=$(GOARCH) go vet $$(GOOS=${GOOS} GOARCH=${GOARCH} go list ./...)

## Unit Test
test:
cd $(PROJECT_NAME) && GOOS=$(GOOS) GOARCH=amd64 go test -v ./... -count 1
test:
cd $(PROJECT_NAME) && GOOS=$(GOOS) GOARCH=$(GOARCH) go test -v ./... -count 1

clean:
GOOS=$(GOOS) GOARCH=$(GOARCH) go clean
Expand All @@ -82,12 +82,12 @@ install_scannerd:
dlv_install:
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -gcflags "all=-N -l" $(GO_BUILD_FLAGS) ${LDFLAGS} -tags $(GO_BUILD_TAGS) -o $(GOBIN)/sqled ./$(PROJECT_NAME)/cmd/sqled
swagger:
GOARCH=amd64 go build -o ${shell pwd}/bin/swag ${shell pwd}/build/swag/main.go
GOARCH=$(GOARCH) go build -o ${shell pwd}/bin/swag ${shell pwd}/build/swag/main.go
rm -rf ${shell pwd}/sqle/docs
${shell pwd}/bin/swag init -g ./$(PROJECT_NAME)/api/app.go -o ${shell pwd}/sqle/docs

parser:
cd build/goyacc && GOOS=${GOOS} GOARCH=amd64 GOBIN=$(GOBIN) go install
cd build/goyacc && GOOS=${GOOS} GOARCH=$(GOARCH) GOBIN=$(GOBIN) go install
$(GOBIN)/goyacc -o /dev/null ${PARSER_PATH}/parser.y
$(GOBIN)/goyacc -o ${PARSER_PATH}/parser.go ${PARSER_PATH}/parser.y 2>&1 | egrep "(shift|reduce)/reduce" | awk '{print} END {if (NR > 0) {print "Find conflict in parser.y. Please check y.output for more information."; exit 1;}}'
rm -f y.output
Expand Down
Loading