| 1 | # |
| 2 | # Copyright (c) 2006, Intel Corporation |
| 3 | # All rights reserved. This program and the accompanying materials |
| 4 | # are licensed and made available under the terms and conditions of the BSD License |
| 5 | # which accompanies this distribution. The full text of the license may be found at |
| 6 | # http://opensource.org/licenses/bsd-license.php |
| 7 | # |
| 8 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, |
| 9 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. |
| 10 | |
| 11 | # Setup the environment for unix-like systems running a bash-like shell. |
| 12 | # This file must be "sourced" not executed. For example: ". edksetup.sh" |
| 13 | |
| 14 | export WORKSPACE=$(pwd) |
| 15 | |
| 16 | # In unix-like system, gcc is the compiler for building tools |
| 17 | export TOOL_CHAIN=gcc |
| 18 | |
| 19 | if [ "$JAVA_HOME" == "" ] |
| 20 | then |
| 21 | echo "Please set JAVA_HOME before sourcing this script." |
| 22 | else |
| 23 | if [ "$ANT_HOME" == "" ] |
| 24 | then |
| 25 | echo "Please set ANT_HOME before sourcing this script." |
| 26 | else |
| 27 | if [ "$XMLBEANS_HOME" == "" ] |
| 28 | then |
| 29 | echo "Please set XMLBEANS_HOME before sourcing this script." |
| 30 | else |
| 31 | |
| 32 | # These should be ok as they are. |
| 33 | export CLASSPATH=$WORKSPACE/Tools/Jars/SurfaceArea.jar:$WORKSPACE/Tools/Jars/frameworktasks.jar:$WORKSPACE/Tools/Jars/cpptasks.jar:$WORKSPACE/Tools/Jars/GenBuild.jar:$XMLBEANS_HOME/lib/resolver.jar:$XMLBEANS_HOME/lib/xbean.jar:$XMLBEANS_HOME/lib/xmlpublic.jar:$XMLBEANS_HOME/lib/jsr173_1.0_api.jar:$XMLBEANS_HOME/lib/saxon8.jar:$XMLBEANS_HOME/lib/xbean_xpath.jar |
| 34 | export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Jars/Common.jar |
| 35 | export FRAMEWORK_TOOLS_PATH=$WORKSPACE/Tools/bin |
| 36 | export PATH=$FRAMEWORK_TOOLS_PATH:$ANT_HOME/bin:$JAVA_HOME/bin:$PATH |
| 37 | # In some unix-like system, following export is to export system's environment to user's environment |
| 38 | export ANT_HOME=$ANT_HOME |
| 39 | export JAVA_HOME=$JAVA_HOME |
| 40 | export XMLBEANS_HOME=$XMLBEANS_HOME |
| 41 | |
| 42 | # Handle any particulars down here. |
| 43 | case "`uname`" in |
| 44 | CYGWIN*) |
| 45 | # Convert paths to windows format. |
| 46 | export WORKSPACE=`cygpath -w $WORKSPACE` |
| 47 | export CLASSPATH=`cygpath -w -p $CLASSPATH` |
| 48 | ;; |
| 49 | esac |
| 50 | |
| 51 | # Now we need to build the tools. |
| 52 | (cd Tools; ant -noclasspath) |
| 53 | fi |
| 54 | fi |
| 55 | fi |