Skip to content

Commit 4eea603

Browse files
committed
Fix .exe suffix usage in Makefile on Windows
1 parent e5b40f4 commit 4eea603

File tree

1 file changed

+16
-25
lines changed

1 file changed

+16
-25
lines changed

Makefile

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,24 @@ VERSION ?=
77
# ALS build date
88
BUILD_DATE ?=
99

10-
# Location of home dir for tests
11-
export ALS_HOME=$(ROOTDIR)/testsuite
12-
13-
# Exectuable extension
14-
ifeq ($(OS),)
15-
# Not Windows
16-
EXE=""
10+
# Define platform-specific variables
11+
ifeq ($(OS),Windows_NT)
12+
PYTHON=python.exe
13+
EXE=.exe
1714
else
18-
# Windows
19-
EXE=.exe
15+
UNAME_S := $(shell uname -s)
16+
ifeq ($(UNAME_S),Linux)
17+
OS=unix
18+
else ifeq ($(UNAME_S),Darwin)
19+
OS=osx
20+
endif
21+
PYTHON=python3
22+
EXE=
2023
endif
2124

25+
# Location of home dir for tests
26+
export ALS_HOME=$(ROOTDIR)/testsuite
27+
2228
# Command to run for tests
2329
export ALS=$(ROOTDIR)/.obj/server/ada_language_server$(EXE)
2430

@@ -64,21 +70,6 @@ else
6470
NODE_PLATFORM=$(shell node -e "console.log(process.platform)")
6571
endif
6672

67-
# Target platform as nodejs reports it
68-
ifeq ($(OS),Windows_NT)
69-
PYTHON=python.exe
70-
EXE=.exe
71-
else
72-
UNAME_S := $(shell uname -s)
73-
ifeq ($(UNAME_S),Linux)
74-
OS=unix
75-
else ifeq ($(UNAME_S),Darwin)
76-
OS=osx
77-
endif
78-
PYTHON=python3
79-
EXE=
80-
endif
81-
8273
VSCE=npx vsce
8374

8475
LIBRARY_FLAGS=-XBUILD_MODE=$(BUILD_MODE) \
@@ -110,7 +101,7 @@ all: coverage-instrument
110101
-XVERSION=$(VERSION)
111102
ifdef NODE
112103
mkdir -p integration/vscode/ada/$(NODE_ARCH)/$(NODE_PLATFORM)
113-
cp -f $(ALS)$(EXE) integration/vscode/ada/$(NODE_ARCH)/$(NODE_PLATFORM)
104+
cp -f $(ALS) integration/vscode/ada/$(NODE_ARCH)/$(NODE_PLATFORM)
114105
endif
115106

116107
generate:

0 commit comments

Comments
 (0)