VirtualBox

Ignore:
Timestamp:
Oct 28, 2015 8:17:18 PM (9 years ago)
Author:
vboxsync
Message:

EFI/Firmware: 'svn merge /vendor/edk2/UDK2010.SR1 /vendor/edk2/current .', reverting and removing files+dirs listed in ReadMe.vbox, resolving conflicts with help from ../UDK2014.SP1/. This is a raw untested merge.

Location:
trunk/src/VBox/Devices/EFI/Firmware
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/Firmware

  • trunk/src/VBox/Devices/EFI/Firmware/edksetup.sh

    r48674 r58459  
    2626#
    2727
    28 if [ \
    29      "$1" = "-?" -o \
    30      "$1" = "-h" -o \
    31      "$1" = "--help" \
    32    ]
     28function HelpMsg()
     29{
     30  echo Please note: This script must be \'sourced\' so the environment can be changed.
     31  echo ". edksetup.sh"
     32  echo "source edksetup.sh"
     33  return 1
     34}
     35
     36function SetWorkspace()
     37{
     38  #
     39  # If WORKSPACE is already set, then we can return right now
     40  #
     41  if [ -n "$WORKSPACE" ]
     42  then
     43    return 0
     44  fi
     45
     46  if [ ! ${BASH_SOURCE[0]} -ef ./edksetup.sh ]
     47  then
     48    echo Run this script from the base of your tree.  For example:
     49    echo "  cd /Path/To/Edk/Root"
     50    echo "  . edksetup.sh"
     51    return 1
     52  fi
     53
     54  #
     55  # Check for BaseTools/BuildEnv before dirtying the user's environment.
     56  #
     57  if [ ! -f BaseTools/BuildEnv ] && [ -z "$EDK_TOOLS_PATH" ]
     58  then
     59    echo BaseTools not found in your tree, and EDK_TOOLS_PATH is not set.
     60    echo Please point EDK_TOOLS_PATH at the directory that contains
     61    echo the EDK2 BuildEnv script.
     62    return 1
     63  fi
     64
     65  #
     66  # Set $WORKSPACE
     67  #
     68  export WORKSPACE=`pwd`
     69
     70  return 0
     71}
     72
     73function SetupEnv()
     74{
     75  if [ -n "$EDK_TOOLS_PATH" ]
     76  then
     77    . $EDK_TOOLS_PATH/BuildEnv $*
     78  elif [ -f "$WORKSPACE/BaseTools/BuildEnv" ]
     79  then
     80    . $WORKSPACE/BaseTools/BuildEnv $*
     81  else
     82    echo BaseTools not found in your tree, and EDK_TOOLS_PATH is not set.
     83    echo Please check that WORKSPACE is not set incorrectly in your
     84    echo shell, or point EDK_TOOLS_PATH at the directory that contains
     85    echo the EDK2 BuildEnv script.
     86    return 1
     87  fi
     88}
     89
     90function SourceEnv()
     91{
     92  if [ \
     93       "$1" = "-?" -o \
     94       "$1" = "-h" -o \
     95       "$1" = "--help" \
     96     ]
     97  then
     98    HelpMsg
     99  else
     100    SetWorkspace &&
     101    SetupEnv "$*"
     102  fi
     103}
     104
     105if [ $# -gt 1 ]
    33106then
    34   echo BaseTools Usage: \'. edksetup.sh\'
    35   echo
    36   echo Please note: This script must be \'sourced\' so the environment can be changed.
    37   echo \(Either \'. edksetup.sh\' or \'source edksetup.sh\'\)
    38   return
     107  HelpMsg
     108elif [ $# -eq 1 ] && [ "$1" != "BaseTools" ]
     109then
     110  HelpMsg
    39111fi
    40112
    41 if [ -z "$WORKSPACE" ]
     113RETVAL=$?
     114if [ $RETVAL -ne 0 ]
    42115then
    43   . BaseTools/BuildEnv $*
    44 else
    45   . $WORKSPACE/BaseTools/BuildEnv $*
     116  return $RETVAL
    46117fi
    47118
     119SourceEnv "$*"
    48120
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette