Skip to content

Commit d691d84

Browse files
Ramsay Jonesgitster
authored andcommitted
Makefile: keep MSVC and Cygwin configuration separate
Signed-off-by: Ramsay Jones <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 035b76b commit d691d84

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Makefile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
212212
uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
213213
uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
214214

215+
ifdef MSVC
216+
# avoid the MingW and Cygwin configuration sections
217+
uname_S := Windows
218+
uname_O := Windows
219+
endif
220+
215221
# CFLAGS and LDFLAGS are for the users to override from the command line.
216222

217223
CFLAGS = -g -O2 -Wall
@@ -893,7 +899,7 @@ ifeq ($(uname_S),HP-UX)
893899
NO_SYS_SELECT_H = YesPlease
894900
SNPRINTF_RETURNS_BOGUS = YesPlease
895901
endif
896-
ifdef MSVC
902+
ifeq ($(uname_S),Windows)
897903
GIT_VERSION := $(GIT_VERSION).MSVC
898904
pathsep = ;
899905
NO_PREAD = YesPlease
@@ -945,7 +951,7 @@ else
945951
BASIC_CFLAGS += -Zi -MTd
946952
endif
947953
X = .exe
948-
else
954+
endif
949955
ifneq (,$(findstring MINGW,$(uname_S)))
950956
pathsep = ;
951957
NO_PREAD = YesPlease
@@ -994,7 +1000,6 @@ else
9941000
NO_PTHREADS = YesPlease
9951001
endif
9961002
endif
997-
endif
9981003

9991004
-include config.mak.autogen
10001005
-include config.mak

0 commit comments

Comments
 (0)