diff options
author | Leif Lindholm <leif.lindholm@linaro.org> | 2017-08-23 15:34:59 +0100 |
---|---|---|
committer | Leif Lindholm <leif.lindholm@linaro.org> | 2017-08-23 15:39:37 +0100 |
commit | e9d6f5779974c1f27d1da4136ee0fea830c8aedb (patch) | |
tree | 2778c8ff2ce9ba12e6b1396c22d7b486560f999a | |
parent | c2edba5052e05aaa2bd79bbe91ea2c19731be7ae (diff) |
Detangle TOOLS_DIR resolution
The recent update to edk2-build.sh to qualify paths with "readlink" caused
unintended consequences, since this did not also take TOOLS_DIR into account.
At the same time, all of the other scripts were individually re-resolving
TOOLS_DIR (in the now-incompatible fashion).
So... do the readlink also on TOOLS_DIR in edk2-build.sh, export TOOLS_DIR
in both edk2-build.sh and uefi-build.sh and delete all localised settings
of TOOLS_DIR.
If anyone is calling any of the secondary scripts directly, I expect to be
receiving complaints.
Reported-by: Alan Ott <alan@softiron.co.uk>
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
-rwxr-xr-x | atf-build.sh | 1 | ||||
-rw-r--r-- | common-functions | 2 | ||||
-rwxr-xr-x | edk2-build.sh | 2 | ||||
-rwxr-xr-x | opteed-build.sh | 1 | ||||
-rwxr-xr-x | tos-build.sh | 1 | ||||
-rwxr-xr-x | uefi-build.sh | 1 |
6 files changed, 3 insertions, 5 deletions
diff --git a/atf-build.sh b/atf-build.sh index e07c0d8..65d4dbc 100755 --- a/atf-build.sh +++ b/atf-build.sh @@ -8,7 +8,6 @@ # parse-platforms.py and platforms.config. # -TOOLS_DIR="`dirname $0`" . "$TOOLS_DIR"/common-functions OUTPUT_DIR="$PWD"/uefi-build diff --git a/common-functions b/common-functions index 4cea2f5..145c054 100644 --- a/common-functions +++ b/common-functions @@ -4,8 +4,6 @@ RESULT_BUF=`echo -e ------------------------------------------------------------ RESULT_PASS_COUNT=0 RESULT_FAIL_COUNT=0 -TOOLS_DIR="`dirname $0`" - function result_log { if [ $1 -eq 0 ]; then diff --git a/edk2-build.sh b/edk2-build.sh index 60da4df..20686f6 100755 --- a/edk2-build.sh +++ b/edk2-build.sh @@ -7,6 +7,8 @@ unset MAKEFLAGS # BaseTools not safe to build parallel, prevent env overrides TOOLS_DIR="`dirname $0`" +TOOLS_DIR="`readlink -f \"$TOOLS_DIR\"`" +export TOOLS_DIR . "$TOOLS_DIR"/common-functions PLATFORM_CONFIG="-c $TOOLS_DIR/edk2-platforms.config" ARCH= diff --git a/opteed-build.sh b/opteed-build.sh index a69917a..702860e 100755 --- a/opteed-build.sh +++ b/opteed-build.sh @@ -7,7 +7,6 @@ # parse-platforms.py and platforms.config. # -TOOLS_DIR="`dirname $0`" . "$TOOLS_DIR"/common-functions export CFG_TEE_CORE_LOG_LEVEL=2 # 0=none 1=err 2=info 3=debug 4=flow diff --git a/tos-build.sh b/tos-build.sh index 9dc4b2d..a3bf421 100755 --- a/tos-build.sh +++ b/tos-build.sh @@ -8,7 +8,6 @@ # parse-platforms.py and platforms.config. # -TOOLS_DIR="`dirname $0`" . "$TOOLS_DIR"/common-functions function usage diff --git a/uefi-build.sh b/uefi-build.sh index ce5d727..7fec3d0 100755 --- a/uefi-build.sh +++ b/uefi-build.sh @@ -12,6 +12,7 @@ unset WORKSPACE EDK_TOOLS_DIR MAKEFLAGS TOOLS_DIR="`dirname $0`" +export TOOLS_DIR . "$TOOLS_DIR"/common-functions PLATFORM_CONFIG="" VERBOSE=0 |