Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit b282fb8

Browse files
committed
Fix cross and e2e-cross on windows
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
1 parent 879302e commit b282fb8

1 file changed

Lines changed: 9 additions & 13 deletions

File tree

Makefile

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,20 @@ check_go_env:
99
@test $$(go list) = "$(PKG_NAME)" || \
1010
(echo "Invalid Go environment" && false)
1111

12-
bin/%: cmd/% check_go_env
13-
$(GO_BUILD) -ldflags=$(LDFLAGS) -o $@$(EXEC_EXT) ./$<
14-
15-
.PHONY: bin/$(BIN_NAME)-windows
16-
bin/$(BIN_NAME)-windows:: bin/$(BIN_NAME)-windows.exe
17-
18-
bin/$(BIN_NAME)-% bin/$(BIN_NAME)-%.exe: cmd/$(BIN_NAME) check_go_env
19-
GOOS=$* $(GO_BUILD) -ldflags=$(LDFLAGS) -o $@ ./$<
20-
2112
cross: bin/$(BIN_NAME)-linux bin/$(BIN_NAME)-darwin bin/$(BIN_NAME)-windows.exe
2213

23-
.PHONY: bin/$(BIN_NAME)-e2e-windows
24-
bin/$(BIN_NAME)-e2e-windows:: bin/$(BIN_NAME)-e2e-windows.exe
14+
e2e-cross: bin/$(BIN_NAME)-e2e-linux bin/$(BIN_NAME)-e2e-darwin bin/$(BIN_NAME)-e2e-windows.exe
2515

26-
bin/$(BIN_NAME)-e2e-% bin/$(BIN_NAME)-e2e-%.exe: e2e bin/$(BIN_NAME)-%
16+
.PHONY: bin/$(BIN_NAME)-e2e-windows
17+
bin/$(BIN_NAME)-e2e-%.exe bin/$(BIN_NAME)-e2e-%: e2e bin/$(BIN_NAME)-%
2718
GOOS=$* $(GO_TEST) -c -o $@ ./$<
2819

29-
e2e-cross: bin/$(BIN_NAME)-e2e-linux bin/$(BIN_NAME)-e2e-darwin bin/$(BIN_NAME)-e2e-windows.exe
20+
.PHONY: bin/$(BIN_NAME)-windows
21+
bin/$(BIN_NAME)-%.exe bin/$(BIN_NAME)-%: cmd/$(BIN_NAME) check_go_env
22+
GOOS=$* $(GO_BUILD) -ldflags=$(LDFLAGS) -o $@ ./$<
23+
24+
bin/%: cmd/% check_go_env
25+
$(GO_BUILD) -ldflags=$(LDFLAGS) -o $@$(EXEC_EXT) ./$<
3026

3127
check: lint test
3228

0 commit comments

Comments
 (0)