Fix Makefile for Windows builds (#566)

Fixes #564 (/gitea/tea/issues/564) by applying minor changes to the Makefile.
- Defines a `BINEXT` variable which holds a file name extension (.exe for Windows, empty otherwise)
- Replaces uses of `$(EXECUTABLE)` with `tea$(EXECUTABLE)`
- appends `$(BINEXT)` to the custom vet tool flag

Besides that I made two minor changes
- Add `[.exe]` to the ignore rule for gitea-vet, so it also ignores the binary when built on Windows hosts
- Removed `$(DIST)/binaries` from release-dirs as this is not being called anywhere else

I've tested almost all `make` tasks to work on Windows. The only one I haven't run is the docker build.

WIP tag is because I still have to test it on Linux, will do so in a bit. I also asked for some discussion on the original issue, which I'd like to do before blindly asking to merge in changes

Reviewed-on: https://gitea.com/gitea/tea/pulls/566
Co-authored-by: Martin Veldwijk <riven@tae.moe>
Co-committed-by: Martin Veldwijk <riven@tae.moe>
This commit is contained in:
Martin Veldwijk
2023-07-28 14:03:26 +00:00
committed by John Olheiser
parent 5582f92df4
commit 77837e909e
2 changed files with 5 additions and 3 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
tea
/gitea-vet
/gitea-vet[.exe]
.idea/
.history/