bbahnsen | b9e16a8 | 2006-04-24 16:38:10 +0000 | [diff] [blame] | 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. |
bbahnsen | 6dbea97 | 2006-11-14 17:57:07 +0000 | [diff] [blame^] | 12 | # This file must be "sourced" not merely executed. For example: ". edksetup.sh" |
| 13 | |
| 14 | # CYGWIN users: Your path and filename related environment variables should be |
| 15 | # set up in the unix style. This script will make the necessary conversions to |
| 16 | # windows style. |
bbahnsen | b9e16a8 | 2006-04-24 16:38:10 +0000 | [diff] [blame] | 17 | |
klu2 | ace425d | 2006-07-09 17:33:16 +0000 | [diff] [blame] | 18 | export WORKSPACE=$(pwd) |
| 19 | |
bbahnsen | 6dbea97 | 2006-11-14 17:57:07 +0000 | [diff] [blame^] | 20 | # In unix-like systems, gcc is the compiler for building tools |
klu2 | ace425d | 2006-07-09 17:33:16 +0000 | [diff] [blame] | 21 | export TOOL_CHAIN=gcc |
| 22 | |
bbahnsen | b9e16a8 | 2006-04-24 16:38:10 +0000 | [diff] [blame] | 23 | if [ "$JAVA_HOME" == "" ] |
| 24 | then |
| 25 | echo "Please set JAVA_HOME before sourcing this script." |
| 26 | else |
bbahnsen | 0fff0c2 | 2006-05-24 22:03:09 +0000 | [diff] [blame] | 27 | if [ "$ANT_HOME" == "" ] |
| 28 | then |
| 29 | echo "Please set ANT_HOME before sourcing this script." |
klu2 | ace425d | 2006-07-09 17:33:16 +0000 | [diff] [blame] | 30 | else |
| 31 | if [ "$XMLBEANS_HOME" == "" ] |
| 32 | then |
| 33 | echo "Please set XMLBEANS_HOME before sourcing this script." |
bbahnsen | 0fff0c2 | 2006-05-24 22:03:09 +0000 | [diff] [blame] | 34 | else |
qouyang | 8f7f05d | 2006-08-04 03:17:05 +0000 | [diff] [blame] | 35 | |
bbahnsen | b9e16a8 | 2006-04-24 16:38:10 +0000 | [diff] [blame] | 36 | # These should be ok as they are. |
klu2 | d14ebb4 | 2006-07-31 18:55:26 +0000 | [diff] [blame] | 37 | export CLASSPATH=$WORKSPACE/Tools/Jars/SurfaceArea.jar:$WORKSPACE/Tools/Jars/frameworktasks.jar:$WORKSPACE/Tools/Jars/cpptasks.jar:$WORKSPACE/Tools/Jars/PcdTools.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 |
bbahnsen | bf0c93f | 2006-06-20 22:12:27 +0000 | [diff] [blame] | 38 | export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Jars/Common.jar |
qouyang | 8f7f05d | 2006-08-04 03:17:05 +0000 | [diff] [blame] | 39 | export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Jars/PcdTools.jar |
hche10x | da1508d | 2006-07-13 01:16:51 +0000 | [diff] [blame] | 40 | export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Bin/FrameworkWizard.jar |
bbahnsen | f79b595 | 2006-06-12 17:15:58 +0000 | [diff] [blame] | 41 | export FRAMEWORK_TOOLS_PATH=$WORKSPACE/Tools/bin |
| 42 | export PATH=$FRAMEWORK_TOOLS_PATH:$ANT_HOME/bin:$JAVA_HOME/bin:$PATH |
bbahnsen | b9e16a8 | 2006-04-24 16:38:10 +0000 | [diff] [blame] | 43 | |
| 44 | # Handle any particulars down here. |
| 45 | case "`uname`" in |
| 46 | CYGWIN*) |
| 47 | # Convert paths to windows format. |
| 48 | export WORKSPACE=`cygpath -w $WORKSPACE` |
bbahnsen | 6dbea97 | 2006-11-14 17:57:07 +0000 | [diff] [blame^] | 49 | export ANT_HOME=`cygpath -w $ANT_HOME` |
| 50 | export XMLBEANS_HOME=`cygpath -w $XMLBEANS_HOME` |
bbahnsen | b9e16a8 | 2006-04-24 16:38:10 +0000 | [diff] [blame] | 51 | export CLASSPATH=`cygpath -w -p $CLASSPATH` |
bbahnsen | f98a565 | 2006-07-27 21:54:12 +0000 | [diff] [blame] | 52 | export FRAMEWORK_TOOLS_PATH=`cygpath -w -p $FRAMEWORK_TOOLS_PATH` |
bbahnsen | b9e16a8 | 2006-04-24 16:38:10 +0000 | [diff] [blame] | 53 | ;; |
| 54 | esac |
| 55 | |
bbahnsen | 4818627 | 2006-07-14 08:02:04 +0000 | [diff] [blame] | 56 | if [ \ |
| 57 | "$1" = Rebuild -o \ |
| 58 | "$1" = ForceRebuild -o \ |
| 59 | ! -e "$WORKSPACE/Tools/Jars/Common.jar" -o \ |
klu2 | d14ebb4 | 2006-07-31 18:55:26 +0000 | [diff] [blame] | 60 | ! -e "$WORKSPACE/Tools/Jars/PcdTools.jar" -o \ |
bbahnsen | 4818627 | 2006-07-14 08:02:04 +0000 | [diff] [blame] | 61 | ! -e "$WORKSPACE/Tools/Jars/GenBuild.jar" -o \ |
| 62 | ! -e "$WORKSPACE/Tools/Jars/SurfaceArea.jar" -o \ |
| 63 | ! -e "$WORKSPACE/Tools/Jars/cpptasks.jar" -o \ |
| 64 | ! -e "$WORKSPACE/Tools/Jars/frameworktasks.jar" -o \ |
| 65 | ! -e "$WORKSPACE/Tools/bin/FrameworkWizard.jar" -o \ |
| 66 | ! -e "$WORKSPACE/Tools/bin/CompressDll.dll" -o \ |
| 67 | ! -e "$WORKSPACE/Tools/bin/CreateMtFile" -o \ |
| 68 | ! -e "$WORKSPACE/Tools/bin/EfiCompress" -o \ |
| 69 | ! -e "$WORKSPACE/Tools/bin/EfiRom" -o \ |
| 70 | ! -e "$WORKSPACE/Tools/bin/FlashMap" -o \ |
| 71 | ! -e "$WORKSPACE/Tools/bin/FwImage" -o \ |
| 72 | ! -e "$WORKSPACE/Tools/bin/GenAcpiTable" -o \ |
| 73 | ! -e "$WORKSPACE/Tools/bin/GenCRC32Section" -o \ |
| 74 | ! -e "$WORKSPACE/Tools/bin/GenCapsuleHdr" -o \ |
| 75 | ! -e "$WORKSPACE/Tools/bin/GenDepex" -o \ |
| 76 | ! -e "$WORKSPACE/Tools/bin/GenFfsFile" -o \ |
| 77 | ! -e "$WORKSPACE/Tools/bin/GenFvImage" -o \ |
| 78 | ! -e "$WORKSPACE/Tools/bin/GenSection" -o \ |
| 79 | ! -e "$WORKSPACE/Tools/bin/GenTEImage" -o \ |
| 80 | ! -e "$WORKSPACE/Tools/bin/MakeDeps" -o \ |
| 81 | ! -e "$WORKSPACE/Tools/bin/ModifyInf" -o \ |
| 82 | ! -e "$WORKSPACE/Tools/bin/PeiRebase_Ia32" -o \ |
| 83 | ! -e "$WORKSPACE/Tools/bin/PeiRebase_Ipf" -o \ |
| 84 | ! -e "$WORKSPACE/Tools/bin/PeiRebase_X64" -o \ |
| 85 | ! -e "$WORKSPACE/Tools/bin/SecApResetVectorFixup" -o \ |
| 86 | ! -e "$WORKSPACE/Tools/bin/SecFixup" -o \ |
| 87 | ! -e "$WORKSPACE/Tools/bin/SetStamp" -o \ |
| 88 | ! -e "$WORKSPACE/Tools/bin/SplitFile" -o \ |
| 89 | ! -e "$WORKSPACE/Tools/bin/StrGather" -o \ |
| 90 | ! -e "$WORKSPACE/Tools/bin/Strip" -o \ |
| 91 | ! -e "$WORKSPACE/Tools/bin/VfrCompile" -o \ |
| 92 | ! -e "$WORKSPACE/Tools/bin/ZeroDebugData" -o \ |
| 93 | ! -e "$WORKSPACE/Tools/bin/antlr" -o \ |
| 94 | ! -e "$WORKSPACE/Tools/bin/dlg" ] |
| 95 | then |
| 96 | case "$1" in |
| 97 | ForceRebuild) |
| 98 | ant -noclasspath -f $WORKSPACE/Tools/build.xml cleanall all |
| 99 | ;; |
| 100 | *) |
| 101 | ant -noclasspath -f $WORKSPACE/Tools/build.xml all |
| 102 | ;; |
| 103 | esac |
| 104 | fi |
bbahnsen | b9e16a8 | 2006-04-24 16:38:10 +0000 | [diff] [blame] | 105 | fi |
| 106 | fi |
bbahnsen | 0fff0c2 | 2006-05-24 22:03:09 +0000 | [diff] [blame] | 107 | fi |