comparison make/windows/makefiles/defs.make @ 6603:0d8e265ba727

7181175: Enable builds on Windows with MinGW/MSYS Summary: This fix is the minimum number of Makefile changes to enable building HotSpot with MinGW/MSYS Reviewed-by: jcoomes, dcubed, tbell, ohair Contributed-by: volker.simonis@gmail.com
author dcubed
date Fri, 03 Aug 2012 18:34:28 -0700
parents fb8f9ab27c14
children fb19af007ffc
comparison
equal deleted inserted replaced
6602:282abd0fd878 6603:0d8e265ba727
186 # build number. It must not be zero padded. 186 # build number. It must not be zero padded.
187 ifdef COOKED_BUILD_NUMBER 187 ifdef COOKED_BUILD_NUMBER
188 MAKE_ARGS += JDK_BUILD_NUMBER=$(COOKED_BUILD_NUMBER) 188 MAKE_ARGS += JDK_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
189 endif 189 endif
190 190
191 NMAKE= MAKEFLAGS= MFLAGS= nmake /NOLOGO 191 NMAKE= MAKEFLAGS= MFLAGS= nmake -NOLOGO
192 ifndef SYSTEM_UNAME
193 SYSTEM_UNAME := $(shell uname)
194 export SYSTEM_UNAME
195 endif
192 196
193 # Check for CYGWIN 197 # Check for CYGWIN
194 ifneq (,$(findstring CYGWIN,$(shell uname))) 198 ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
195 USING_CYGWIN=true 199 USING_CYGWIN=true
196 else 200 else
197 USING_CYGWIN=false 201 USING_CYGWIN=false
202 endif
203 # Check for MinGW
204 ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))
205 USING_MINGW=true
198 endif 206 endif
199 # FIXUP: The subdirectory for a debug build is NOT the same on all platforms 207 # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
200 VM_DEBUG=debug 208 VM_DEBUG=debug
201 209
202 # Windows wants particular paths due to nmake (must be after macros defined) 210 # Windows wants particular paths due to nmake (must be after macros defined)
206 ifeq ($(USING_CYGWIN), true) 214 ifeq ($(USING_CYGWIN), true)
207 ABS_OUTPUTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(OUTPUTDIR)")) 215 ABS_OUTPUTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(OUTPUTDIR)"))
208 ABS_BOOTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(BOOTDIR)")) 216 ABS_BOOTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(BOOTDIR)"))
209 ABS_GAMMADIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(GAMMADIR)")) 217 ABS_GAMMADIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(GAMMADIR)"))
210 ABS_OS_MAKEFILE := $(shell /bin/cygpath -m -a "$(HS_MAKE_DIR)/$(OSNAME)")/build.make 218 ABS_OS_MAKEFILE := $(shell /bin/cygpath -m -a "$(HS_MAKE_DIR)/$(OSNAME)")/build.make
211 else 219 else ifeq ($(USING_MINGW), true)
212 ABS_OUTPUTDIR := $(subst /,\\,$(shell $(CD) $(OUTPUTDIR);$(PWD))) 220 ABS_OUTPUTDIR := $(shell $(CD) $(OUTPUTDIR);$(PWD))
213 ABS_BOOTDIR := $(subst /,\\,$(shell $(CD) $(BOOTDIR);$(PWD))) 221 ABS_BOOTDIR := $(shell $(CD) $(BOOTDIR);$(PWD))
214 ABS_GAMMADIR := $(subst /,\\,$(shell $(CD) $(GAMMADIR);$(PWD))) 222 ABS_GAMMADIR := $(shell $(CD) $(GAMMADIR);$(PWD))
215 ABS_OS_MAKEFILE := $(subst /,\\,$(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make) 223 ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make
224 else
225 ABS_OUTPUTDIR := $(subst /,\\,$(shell $(CD) $(OUTPUTDIR);$(PWD)))
226 ABS_BOOTDIR := $(subst /,\\,$(shell $(CD) $(BOOTDIR);$(PWD)))
227 ABS_GAMMADIR := $(subst /,\\,$(shell $(CD) $(GAMMADIR);$(PWD)))
228 ABS_OS_MAKEFILE := $(subst /,\\,$(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make)
216 endif 229 endif
217 230
218 # Disable building SA on windows until we are sure 231 # Disable building SA on windows until we are sure
219 # we want to release it. If we build it here, 232 # we want to release it. If we build it here,
220 # the SDK makefiles will copy it over and put it into 233 # the SDK makefiles will copy it over and put it into