Skip to content

Commit

Permalink
fixup! .build/go.mk: create windows binaries with .exe extension
Browse files Browse the repository at this point in the history
  • Loading branch information
zalgonoise committed May 9, 2024
1 parent 75ece0c commit 5eeac01
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .build/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ mk_go_build_clean:

$(CROSS_COMPILED_BINARIES): $(GOFILES) $(TARGET_DIST)
$(info *** compiling $@)
@f=$@ ; if [[ $$(echo $@ | grep -c 'windows') == 1 ]]; then f=$@.exe; fi; \
GOOS=$(call get_os_from_binary_file,$@) \
@os=$(call get_os_from_binary_file,$@); \
filename=$@ ; \
if [[ $${os} == 'windows' ]]; then filename=$@.exe; fi; \
GOOS=$${os} \
GOARCH=$(call get_arch_from_binary_file,$@) \
$(GO_BUILD) $(BUILD_MODE) $(LDFLAGS) -o $${f};
$(GO_BUILD) $(BUILD_MODE) $(LDFLAGS) -o $${filename};

##### =====> Compile Tests <===== #####

Expand Down

0 comments on commit 5eeac01

Please sign in to comment.