Il 24/06/2014 13:33, Laszlo Ersek ha scritto:
> The code being removed checks if "./BaseTools/BuildEnv" is the same
> script file (by device and inode numbers) as the one executing (whether
> forked or sourced). This seems to be the polar opposite of what
> EDK_TOOLS_PATH is supposed to enable -- an out-of-WORKSPACE (== $PWD)
> BaseTools subdir. I checked the commit log but still can't figure out
> why this check was added in the first place.
>
> If the SetWorkspace function only wants to ensure that it is called from
> the root of an edk2 clone (ie. a WORKSPACE candidate), then it should
> check eg. for the existence of "./MdePkg/MdePkg.dec", rather than
> depending on an embedded BaseTools (which defeats EDK_TOOLS_PATH).
I agree that having a check like this makes a lot of sense. However,
BaseTools should not have dependencies on the layout of EDK2, I think.
Perhaps this check should be in edksetup.sh's SetupEnv rather than
BaseTools/BuildEnv?
Paolo
> If that's the case, then I think the following patch would be preferable:
>
> --------
> diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv
> index cccc753..d85c967 100755
> --- a/BaseTools/BuildEnv
> +++ b/BaseTools/BuildEnv
> @@ -23,7 +23,7 @@ SetWorkspace() {
> return 0
> fi
>
> - if [ ! ${BASH_SOURCE[0]} -ef ./BaseTools/BuildEnv ]
> + if [ ! -e MdePkg/MdePkg.dec ]
> then
> echo Run this script from the base of your tree. For example:
> echo " cd /Path/To/Edk/Root"
> --------
>
> Ie. the current code does have one practical benefit -- a basic sanity
> check that you are standing in an edk2 root dir -- but the
> implementation incurs an unnecessary dependency on BaseTools. Let's keep
> the intent, just improve the implementation.
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel