Created
June 2, 2009 20:55
-
-
Save headius/122576 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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_JIBS_LIBS_PATH=/User/headius/jibx/lib | |
ALT_JDK_IMPORT_PATH=/System/Library/Frameworks/JavaVM.framework/Versions/soylatte/Home | |
ANT_HOME=/usr/share/ant | |
NO_DOCS=true | |
HOTSPOT_BUILD_JOBS=3 | |
ALT_BOOTDIR=/System/Library/Frameworks/JavaVM.framework/Versions/soylatte/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