make/windows/makefiles/defs.make
Print this page
rev 3161 : Enable OpenJDK builds on Windows with MinGW/MSYS
@@ -129,18 +129,22 @@
# build number. It must not be zero padded.
ifdef COOKED_BUILD_NUMBER
MAKE_ARGS += JDK_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
endif
-NMAKE= MAKEFLAGS= MFLAGS= nmake /NOLOGO
+NMAKE= MAKEFLAGS= MFLAGS= nmake -NOLOGO
# Check for CYGWIN
ifneq (,$(findstring CYGWIN,$(shell uname)))
USING_CYGWIN=true
else
USING_CYGWIN=false
endif
+# Check for MinGW
+ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))
+ USING_MINGW=true
+endif
# FIXUP: The subdirectory for a debug build is NOT the same on all platforms
VM_DEBUG=debug
# Windows wants particular paths due to nmake (must be after macros defined)
# It is important that gnumake invokes nmake with C:\\...\\ formated
@@ -150,14 +154,21 @@
ABS_OUTPUTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(OUTPUTDIR)"))
ABS_BOOTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(BOOTDIR)"))
ABS_GAMMADIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(GAMMADIR)"))
ABS_OS_MAKEFILE := $(shell /bin/cygpath -m -a "$(HS_MAKE_DIR)/$(OSNAME)")/build.make
else
+ ifeq ($(USING_MINGW), true)
+ ABS_OUTPUTDIR := $(shell $(CD) $(OUTPUTDIR);$(PWD))
+ ABS_BOOTDIR := $(shell $(CD) $(BOOTDIR);$(PWD))
+ ABS_GAMMADIR := $(shell $(CD) $(GAMMADIR);$(PWD))
+ ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make
+ else
ABS_OUTPUTDIR := $(subst /,\\,$(shell $(CD) $(OUTPUTDIR);$(PWD)))
ABS_BOOTDIR := $(subst /,\\,$(shell $(CD) $(BOOTDIR);$(PWD)))
ABS_GAMMADIR := $(subst /,\\,$(shell $(CD) $(GAMMADIR);$(PWD)))
ABS_OS_MAKEFILE := $(subst /,\\,$(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make)
+ endif
endif
# Disable building SA on windows until we are sure
# we want to release it. If we build it here,
# the SDK makefiles will copy it over and put it into