Reviewed-by: Yonghong Zhu <[email protected]> 

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Marvin Häuser [mailto:[email protected]] 
Sent: Wednesday, July 20, 2016 11:02 PM
To: [email protected]
Cc: Gao, Liming <[email protected]>; Zhu, Yonghong <[email protected]>
Subject: [PATCH v1 1/1] 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 <[email protected]>
---
 BaseTools/toolsetup.bat | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/BaseTools/toolsetup.bat b/BaseTools/toolsetup.bat index 
76fd8bb6ef9e..c1ab9bcc8d33 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
+        )
       )
     )
   )
--
2.9.0.windows.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to