Mercurial > hg > truffle
diff make/defs.make @ 8212:ed3fa3ae7b61
applied patch to Makefile system for building graal.jar (CR-102)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 11 Mar 2013 18:57:12 +0100 |
parents | fb19af007ffc |
children | b9a918201d47 |
line wrap: on
line diff
--- a/make/defs.make Mon Mar 11 17:30:21 2013 +0100 +++ b/make/defs.make Mon Mar 11 18:57:12 2013 +0100 @@ -236,6 +236,33 @@ JDK_IMAGE_DIR=$(ALT_JDK_IMAGE_DIR) endif +# Utilities ant +ifeq ($(PLATFORM), windows) + ifeq ($(ANT_HOME),) + ANT_HOME := $(call DirExists,$(JDK_DEVTOOLS_DIR)/share/ant/latest,,) + endif +endif + +# There are few problems with ant we need to workaround: +# 1) ant is using temporary directory java.io.tmpdir +# However, this directory is not unique enough and two separate ant processes +# can easily end up using the exact same temp directory. This may lead to weird build failures +# To workaround this we will define tmp dir explicitly +# 2) ant attempts to detect JDK location based on java.exe location +# This is fragile as developer may have JRE first on the PATH. +# To workaround this we will specify JAVA_HOME explicitly +# 3) Sometimes we need to run ant with the boot jdk, sometimes with the import +# jdk, sometimes with the jdk we are building (see deploy repo). + +ANT_TMPDIR = $(OUTPUTDIR)/tmp +ANT_WORKAROUNDS = ANT_OPTS=-Djava.io.tmpdir='$(ANT_TMPDIR)' + +ifeq ($(ANT_HOME),) + ANT = $(ANT_WORKAROUNDS) JAVA_HOME='$(BOOTDIR)' ant +else + ANT = $(ANT_WORKAROUNDS) JAVA_HOME='$(BOOTDIR)' $(ANT_HOME)/bin/ant +endif + # The platform dependent defs.make defines platform specific variable such # as ARCH, EXPORT_LIST etc. We must place the include here after BOOTDIR is defined. include $(GAMMADIR)/make/$(OSNAME)/makefiles/defs.make @@ -336,6 +363,7 @@ EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jni.h EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jmm.h +EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/graal.jar # By default, run Queens test after building TEST_IN_BUILD ?= true