Skip to content

Commit 337f01a

Browse files
committed
Makefile: changed to remove limactl.exe if GOOS is not Windows.
Signed-off-by: Norio Nomura <[email protected]>
1 parent 9db7680 commit 337f01a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,12 @@ endif
203203
ENVS__output/bin/limactl$(exe) = CGO_ENABLED=1 GOOS=$(GOOS) GOARCH=$(GOARCH) CC=$(CC)
204204

205205
_output/bin/limactl$(exe): $(LIMACTL_DEPS) $$(call force_build,$$@)
206+
# If the previous cross-compilation was for GOOS=windows, limactl.exe might still be present.
207+
ifneq ($(GOOS),windows) #
208+
@rm -rf _output/bin/limactl.exe
209+
else
210+
@rm -rf _output/bin/limactl
211+
endif
206212
# The hostagent must be compiled with CGO_ENABLED=1 so that net.LookupIP() in the DNS server
207213
# calls the native resolver library and not the simplistic version in the Go library.
208214
$(ENVS_$@) $(GO_BUILD) -o $@ ./cmd/limactl

0 commit comments

Comments
 (0)