Merge pull request #9 from AnonymousRandomPerson/main

Ported WSL2 fix from HeartGold
This commit is contained in:
AnonymousRandomPerson
2023-08-28 00:23:15 -04:00
committed by GitHub

View File

@@ -1,38 +1,46 @@
WSLENV ?= no
ifeq ($(WSLENV),no)
NOWINE = 0
NOWINE = 0
else
NOWINE = 1
# As of build 17063, WSLENV is defined in both WSL1 and WSL2
# so we need to use the kernel release to detect between
# the two.
UNAME_R := $(shell uname -r)
ifeq ($(findstring WSL2,$(UNAME_R)),)
NOWINE = 1
else
NOWINE = 0
endif
endif
ifeq ($(OS),Windows_NT)
EXE := .exe
WINE :=
GREP := grep -P
SED := sed -r
SHA1SUM := sha1sum
MKTEMP := mktemp
EXE := .exe
WINE :=
GREP := grep -P
SED := sed -r
SHA1SUM := sha1sum
MKTEMP := mktemp
else
EXE :=
WINE := wine
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
GREP := grep -E
SED := gsed -r
SHA1SUM := shasum
MKTEMP := gmktemp
else
GREP := grep -P
SED := sed -r
SHA1SUM := sha1sum
MKTEMP := mktemp
endif
EXE :=
WINE := wine
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
GREP := grep -E
SED := gsed -r
SHA1SUM := shasum
MKTEMP := gmktemp
else
GREP := grep -P
SED := sed -r
SHA1SUM := sha1sum
MKTEMP := mktemp
endif
endif
ifeq ($(NOWINE),1)
WINE :=
WINPATH := wslpath
WINE :=
WINPATH := wslpath
else
WINPATH := winepath
WINPATH := winepath
endif