summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarvin Haeuser <Marvin.Haeuser@outlook.com>2016-07-20 23:02:27 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2016-07-26 10:42:09 +0800
commit1f2cd65297f973181f02889a94cad5bb9276bb29 (patch)
tree1273942301dedf6449fc23095e70c9af09f4f91c
parent03630a81488ca30c384c09034caa1a70afb80a0d (diff)
downloadedk2-1f2cd65297f973181f02889a94cad5bb9276bb29.tar.gz
edk2-1f2cd65297f973181f02889a94cad5bb9276bb29.tar.bz2
edk2-1f2cd65297f973181f02889a94cad5bb9276bb29.zip
BaseTools/toolsetup: Do not set CONF_PATH when already set.
When CONF_PATH is already set, toolsetup.bat overwrites its value. This is not the case on Linux platforms (BuildEnv) and contra-productive when using the same Workspace across multiple Operating Systems. With this patch, a check is performed prior to setting the variable. Furthermore, it will not be scanned for Conf directories in PACKAGES_PATH directories to respect the user's choice. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
-rwxr-xr-xBaseTools/toolsetup.bat17
1 files changed, 10 insertions, 7 deletions
diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat
index 76fd8bb6ef..c1ab9bcc8d 100755
--- a/BaseTools/toolsetup.bat
+++ b/BaseTools/toolsetup.bat
@@ -160,13 +160,16 @@ if not defined WORKSPACE (
goto skip_reconfig
)
-set CONF_PATH=%WORKSPACE%\Conf
-if NOT exist %CONF_PATH% (
- if defined PACKAGES_PATH (
- for %%i IN (%PACKAGES_PATH%) DO (
- if exist %%~fi\Conf (
- set CONF_PATH=%%i\Conf
- goto CopyConf
+if not defined CONF_PATH (
+ set CONF_PATH=%WORKSPACE%\Conf
+
+ if NOT exist %CONF_PATH% (
+ if defined PACKAGES_PATH (
+ for %%i IN (%PACKAGES_PATH%) DO (
+ if exist %%~fi\Conf (
+ set CONF_PATH=%%i\Conf
+ goto CopyConf
+ )
)
)
)