blob: 0c0265a378c372143616eb56155f29e372f381df [file] [log] [blame]
bbahnsenb9e16a82006-04-24 16:38:10 +00001#
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.
bbahnsen48186272006-07-14 08:02:04 +000012# This file must be "sourced" notcuted. For example: ". edksetup.sh"
bbahnsenb9e16a82006-04-24 16:38:10 +000013
klu2ace425d2006-07-09 17:33:16 +000014export WORKSPACE=$(pwd)
15
16# In unix-like system, gcc is the compiler for building tools
17export TOOL_CHAIN=gcc
18
bbahnsenb9e16a82006-04-24 16:38:10 +000019if [ "$JAVA_HOME" == "" ]
20then
21 echo "Please set JAVA_HOME before sourcing this script."
22else
bbahnsen0fff0c22006-05-24 22:03:09 +000023if [ "$ANT_HOME" == "" ]
24then
25 echo "Please set ANT_HOME before sourcing this script."
klu2ace425d2006-07-09 17:33:16 +000026else
27if [ "$XMLBEANS_HOME" == "" ]
28then
29 echo "Please set XMLBEANS_HOME before sourcing this script."
bbahnsen0fff0c22006-05-24 22:03:09 +000030else
bbahnsenb9e16a82006-04-24 16:38:10 +000031
32# These should be ok as they are.
bbahnsen7a05c962006-06-06 23:41:12 +000033export 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
bbahnsenbf0c93f2006-06-20 22:12:27 +000034export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Jars/Common.jar
hche10xda1508d2006-07-13 01:16:51 +000035export CLASSPATH=$CLASSPATH:$WORKSPACE/Tools/Bin/FrameworkWizard.jar
bbahnsenf79b5952006-06-12 17:15:58 +000036export FRAMEWORK_TOOLS_PATH=$WORKSPACE/Tools/bin
37export PATH=$FRAMEWORK_TOOLS_PATH:$ANT_HOME/bin:$JAVA_HOME/bin:$PATH
klu2ace425d2006-07-09 17:33:16 +000038# In some unix-like system, following export is to export system's environment to user's environment
39export ANT_HOME=$ANT_HOME
40export JAVA_HOME=$JAVA_HOME
41export XMLBEANS_HOME=$XMLBEANS_HOME
bbahnsenb9e16a82006-04-24 16:38:10 +000042
43# Handle any particulars down here.
44case "`uname`" in
45 CYGWIN*)
46 # Convert paths to windows format.
47 export WORKSPACE=`cygpath -w $WORKSPACE`
48 export CLASSPATH=`cygpath -w -p $CLASSPATH`
bbahnsenf98a5652006-07-27 21:54:12 +000049 export FRAMEWORK_TOOLS_PATH=`cygpath -w -p $FRAMEWORK_TOOLS_PATH`
bbahnsenb9e16a82006-04-24 16:38:10 +000050 ;;
51esac
52
bbahnsen48186272006-07-14 08:02:04 +000053if [ \
54 "$1" = Rebuild -o \
55 "$1" = ForceRebuild -o \
56 ! -e "$WORKSPACE/Tools/Jars/Common.jar" -o \
57 ! -e "$WORKSPACE/Tools/Jars/GenBuild.jar" -o \
58 ! -e "$WORKSPACE/Tools/Jars/SurfaceArea.jar" -o \
59 ! -e "$WORKSPACE/Tools/Jars/cpptasks.jar" -o \
60 ! -e "$WORKSPACE/Tools/Jars/frameworktasks.jar" -o \
61 ! -e "$WORKSPACE/Tools/bin/FrameworkWizard.jar" -o \
62 ! -e "$WORKSPACE/Tools/bin/CompressDll.dll" -o \
63 ! -e "$WORKSPACE/Tools/bin/CreateMtFile" -o \
64 ! -e "$WORKSPACE/Tools/bin/EfiCompress" -o \
65 ! -e "$WORKSPACE/Tools/bin/EfiRom" -o \
66 ! -e "$WORKSPACE/Tools/bin/FlashMap" -o \
67 ! -e "$WORKSPACE/Tools/bin/FwImage" -o \
68 ! -e "$WORKSPACE/Tools/bin/GenAcpiTable" -o \
69 ! -e "$WORKSPACE/Tools/bin/GenCRC32Section" -o \
70 ! -e "$WORKSPACE/Tools/bin/GenCapsuleHdr" -o \
71 ! -e "$WORKSPACE/Tools/bin/GenDepex" -o \
72 ! -e "$WORKSPACE/Tools/bin/GenFfsFile" -o \
73 ! -e "$WORKSPACE/Tools/bin/GenFvImage" -o \
74 ! -e "$WORKSPACE/Tools/bin/GenSection" -o \
75 ! -e "$WORKSPACE/Tools/bin/GenTEImage" -o \
76 ! -e "$WORKSPACE/Tools/bin/MakeDeps" -o \
77 ! -e "$WORKSPACE/Tools/bin/ModifyInf" -o \
78 ! -e "$WORKSPACE/Tools/bin/PeiRebase_Ia32" -o \
79 ! -e "$WORKSPACE/Tools/bin/PeiRebase_Ipf" -o \
80 ! -e "$WORKSPACE/Tools/bin/PeiRebase_X64" -o \
81 ! -e "$WORKSPACE/Tools/bin/SecApResetVectorFixup" -o \
82 ! -e "$WORKSPACE/Tools/bin/SecFixup" -o \
83 ! -e "$WORKSPACE/Tools/bin/SetStamp" -o \
84 ! -e "$WORKSPACE/Tools/bin/SplitFile" -o \
85 ! -e "$WORKSPACE/Tools/bin/StrGather" -o \
86 ! -e "$WORKSPACE/Tools/bin/Strip" -o \
87 ! -e "$WORKSPACE/Tools/bin/VfrCompile" -o \
88 ! -e "$WORKSPACE/Tools/bin/ZeroDebugData" -o \
89 ! -e "$WORKSPACE/Tools/bin/antlr" -o \
90 ! -e "$WORKSPACE/Tools/bin/dlg" ]
91then
92 case "$1" in
93 ForceRebuild)
94 ant -noclasspath -f $WORKSPACE/Tools/build.xml cleanall all
95 ;;
96 *)
97 ant -noclasspath -f $WORKSPACE/Tools/build.xml all
98 ;;
99 esac
100fi
bbahnsenb9e16a82006-04-24 16:38:10 +0000101fi
102fi
bbahnsen0fff0c22006-05-24 22:03:09 +0000103fi