blob: cc4f58211afe4a9eec3fd132243a0414d13889b5 [file] [log] [blame]
bbahnsenb9e16a82006-04-24 16:38:10 +00001#
jljusten000c06d2008-02-12 22:27:42 +00002# Copyright (c) 2006 - 2008, Intel Corporation
bbahnsenb9e16a82006-04-24 16:38:10 +00003# 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.
klu22b1473c2009-07-08 05:54:53 +000010#
11# In *inux environment, the build tools's source is required and need to be compiled
12# firstly, please reference https://edk2.tianocore.org/unix-getting-started.html to
13# to get how to setup build tool.
14#
15# After build tool is downloaded and compiled, a soft symbol linker need to be created
16# at <workspace>/Conf. For example: ln -s /work/BaseTools /work/edk2/Conf/BaseToolsSource.
17#
bbahnsenb9e16a82006-04-24 16:38:10 +000018# Setup the environment for unix-like systems running a bash-like shell.
bbahnsen6dbea972006-11-14 17:57:07 +000019# This file must be "sourced" not merely executed. For example: ". edksetup.sh"
klu22b1473c2009-07-08 05:54:53 +000020#
bbahnsen6dbea972006-11-14 17:57:07 +000021# CYGWIN users: Your path and filename related environment variables should be
22# set up in the unix style. This script will make the necessary conversions to
23# windows style.
klu22b1473c2009-07-08 05:54:53 +000024#
25# Please reference edk2 user manual for more detail descriptions at https://edk2.tianocore.org/files/documents/64/494/EDKII_UserManual.pdf
26#
bbahnsenb9e16a82006-04-24 16:38:10 +000027
bbahnsen48186272006-07-14 08:02:04 +000028if [ \
jljusten000c06d2008-02-12 22:27:42 +000029 -z "$1" -o \
jljustena3108862007-10-16 20:52:46 +000030 "$1" = "-?" -o \
31 "$1" = "-h" -o \
32 "$1" = "--help" \
33 ]
bbahnsen48186272006-07-14 08:02:04 +000034then
lhauch3a6b4552008-12-31 16:57:24 +000035 echo BaseTools Usage: \'. edksetup.sh\'
jljustena3108862007-10-16 20:52:46 +000036 echo
37 echo Please note: This script must be \'sourced\' so the environment can be changed.
38 echo \(Either \'. edksetup.sh\' or \'source edksetup.sh\'\)
39 return
bbahnsen48186272006-07-14 08:02:04 +000040fi
jljustena3108862007-10-16 20:52:46 +000041
lhauch3a6b4552008-12-31 16:57:24 +000042if [ -z "$WORKSPACE" ]
jljustena3108862007-10-16 20:52:46 +000043then
lhauch3a6b4552008-12-31 16:57:24 +000044 . BaseTools/BuildEnv $*
jljustena3108862007-10-16 20:52:46 +000045else
lhauch3a6b4552008-12-31 16:57:24 +000046 . $WORKSPACE/BaseTools/BuildEnv $*
bbahnsenb9e16a82006-04-24 16:38:10 +000047fi
jljustena3108862007-10-16 20:52:46 +000048
49