We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cd05541 + 725eb54 commit bac9a29Copy full SHA for bac9a29
Makefile
@@ -26,9 +26,17 @@ default: all
26
# If you are using WSL, it is recommended you build with NOWINE=1.
27
WSLENV ?= no
28
ifeq ($(WSLENV),no)
29
-NOWINE = 0
+ NOWINE = 0
30
else
31
-NOWINE = 1
+ # As of build 17063, WSLENV is defined in both WSL1 and WSL2
32
+ # so we need to use the kernel release to detect between
33
+ # the two.
34
+ UNAME_R := $(shell uname -r)
35
+ ifeq ($(findstring WSL2,$(UNAME_R)),)
36
+ NOWINE = 1
37
+ else
38
39
+ endif
40
endif
41
42
ifeq ($(OS),Windows_NT)
@@ -50,7 +58,10 @@ endif
50
58
51
59
52
60
ifeq ($(NOWINE),1)
53
-WINE :=
61
+ WINE :=
62
+ WINPATH := wslpath
63
+else
64
+ WINPATH := winepath
54
65
55
66
56
67
################ Target Executable and Sources ###############
0 commit comments