7191703: jprt cannot build jdk on MacOSX
Reviewed-by: anthony
This commit is contained in:
parent
901ebe2983
commit
89f1772d07
@ -609,14 +609,18 @@ endif
|
||||
# 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 = $(ABS_OUTPUTDIR)/tmp
|
||||
ANT_WORKAROUNDS = ANT_OPTS=-Djava.io.tmpdir='$(ANT_TMPDIR)' JAVA_HOME='$(BOOTDIR)'
|
||||
ANT_WORKAROUNDS = ANT_OPTS=-Djava.io.tmpdir='$(ANT_TMPDIR)'
|
||||
|
||||
ifeq ($(ANT_HOME),)
|
||||
ANT = $(ANT_WORKAROUNDS) ant
|
||||
ANT = $(ANT_WORKAROUNDS) JAVA_HOME='$(BOOTDIR)' ant
|
||||
ANT_WITH_IMPORT = $(ANT_WORKAROUNDS) JAVA_HOME='$(JDK_IMPORT_PATH)' ant
|
||||
else
|
||||
ANT = $(ANT_WORKAROUNDS) $(ANT_HOME)/bin/ant
|
||||
ANT = $(ANT_WORKAROUNDS) JAVA_HOME='$(BOOTDIR)' $(ANT_HOME)/bin/ant
|
||||
ANT_WITH_IMPORT = $(ANT_WORKAROUNDS) JAVA_HOME='$(JDK_IMPORT_PATH)' $(ANT_HOME)/bin/ant
|
||||
endif
|
||||
|
||||
ifdef ALT_COPYRIGHT_YEAR
|
||||
|
@ -62,15 +62,22 @@ $(STABLE_METADATA_FILES): stabilize
|
||||
ABS_OUTPUTDIR=$(realpath $(OUTPUTDIR))
|
||||
ABS_STABLE_GEN_DIR=$(realpath $(STABLE_GEN_DIR))
|
||||
|
||||
# How to run ant
|
||||
ifdef LANGTOOLS_DIST
|
||||
ANT_CMD = $(ANT)
|
||||
else
|
||||
ANT_CMD = $(ANT_WITH_IMPORT)
|
||||
endif
|
||||
|
||||
$(BUILT_DYLIB) $(BUILT_JAR): $(STABLE_METADATA_FILES) $(CORE_SRC) $(GENERATOR_SRC) $(ADDITIONS_SRC) $(BUILD_SRC)
|
||||
@echo JObjC dylib or jar out of data wrt FRAMEWORKS '(' $(FRAMEWORKS) ')' or JObjC source '(' core, generator, additions, build ')'
|
||||
@echo Running ant with java_home set to ${ALT_BOOTDIR}
|
||||
(cd $(SRCDIR); OBJROOT="$(ABS_OUTPUTDIR)/JObjC.build" DSTROOT="$(ABS_OUTPUTDIR)/JObjC.dst" JAVA_HOME=${ALT_BOOTDIR} STABLE_GEN_DIR="$(ABS_STABLE_GEN_DIR)" /usr/bin/ant -verbose all)
|
||||
(cd $(SRCDIR); OBJROOT="$(ABS_OUTPUTDIR)/JObjC.build" DSTROOT="$(ABS_OUTPUTDIR)/JObjC.dst" JAVA_HOME=${ALT_BOOTDIR} STABLE_GEN_DIR="$(ABS_STABLE_GEN_DIR)" $(ANT_CMD) -verbose all)
|
||||
|
||||
all: $(BUILD_DYLIB) $(BUILT_JAR)
|
||||
$(CP) $(BUILT_DYLIB) $(LIB_LOCATION)/libJObjC.dylib
|
||||
|
||||
clean clobber::
|
||||
(cd $(SRCDIR); export OBJROOT=$(OUTPUTDIR)/JObjC.build; export DSTROOT=$(OUTPUTDIR)/JObjC.dst; /usr/bin/ant clean)
|
||||
(cd $(SRCDIR); export OBJROOT=$(OUTPUTDIR)/JObjC.build; export DSTROOT=$(OUTPUTDIR)/JObjC.dst; $(ANT_CMD) clean)
|
||||
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user