Skip to content

Instantly share code, notes, and snippets.

@headius headius/gist:170544
Created Aug 19, 2009

Embed
What would you like to do?
# source build.sh
# This script is originally derived from Stephen Bannasch's instructions:
# http://confluence.concord.org/display/CCTR/Build+OpenJDK+Java+1.7.0+on+Mac+OS+X+10.5
# This script is placed in ../davinci/sources/ and run from there. See also:
# http://mail.openjdk.java.net/pipermail/mlvm-dev/2009-April/000434.html
# Works on JDK7 M3 (b59).
# Note the dependency on http://sourceforge.net/projects/jibx
# Download 1.1.2 from here:
# http://sourceforge.net/project/showfiles.php?group_id=69358&package_id=68290
# The current version (1.2) may break your build.
export LC_ALL=C
export LANG=C
unset CLASSPATH
unset JAVA_HOME
#export ALT_BOOTDIR=/usr/local/soylatte16-amd64-1.0.3
#for solaris hack this file: ./jdk/src/solaris/javavm/export/machine/endian.h
sets="
ALT_BINARY_PLUGS_PATH=/Users/headius/jdk-7-icedtea-plugs
ALT_FREETYPE_HEADERS_PATH=/usr/X11R6/include
ALT_FREETYPE_LIB_PATH=/usr/X11R6/lib
ALT_CUPS_HEADERS_PATH=/usr/include
ALT_JIBX_LIBS_PATH=/Users/headius/jibx/lib
ALT_JDK_IMPORT_PATH=/System/Library/Frameworks/JavaVM.framework/Versions/soylatte-i386-1.0.3/Home
ANT_HOME=/usr/share/ant
NO_DOCS=true
HOTSPOT_BUILD_JOBS=3
ALT_BOOTDIR=/System/Library/Frameworks/JavaVM.framework/Versions/soylatte-i386-1.0.3/Home
BUILD_LANGTOOLS=true
BUILD_JAXP=false
BUILD_JAXWS=false
BUILD_CORBA=false
BUILD_HOTSPOT=true
BUILD_JDK=true
"
# Execute the above sets, into the environment.
for s in $sets; do eval export $s; done
#export ALT_BOOTDIR=$JAVA7X_HOME
# Preview sets in command line
for s
do case $s in
*'[ ;]'*) break;;
*'='*) eval "$s";;
*) break;;
esac
done
# Incremental JVM rebuilds have trouble with *.gch files.
# The *.gch file does not get regenerated unless you remove it,
# even if 20 header files have changed.
# This is not a problem for batch builds, of course.
$BUILD_HOTSPOT && {
${KEEP_HOTSPOT_HEADERS:-false} ||
rm -f $(find build -name _precompiled.incl.gch)
}
# Run make, or whatever, in the resulting environment.
eval "${@-make}"
# Usage example: For a partial (re-)build of JDK only:
# sh build.sh BUILD_{HOTSPOT,LANGTOOLS}=false make
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.