]> git.proxmox.com Git - mirror_edk2.git/blobdiff - edksetup.bat
ArmPkg/AsmMacroIoLib: force word alignment for functions
[mirror_edk2.git] / edksetup.bat
index b69bd26857f573bc37c9e05437d6adb513bd0380..f066d869e1e3f8e146dc8e64a554e50c638da84d 100755 (executable)
@@ -1,7 +1,7 @@
 @REM @file\r
 @REM   Windows batch file to setup a WORKSPACE environment\r
 @REM\r
-@REM Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+@REM Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
 @REM This program and the accompanying materials\r
 @REM are licensed and made available under the terms and conditions of the BSD License\r
 @REM which accompanies this distribution.  The full text of the license may be found at\r
@@ -100,21 +100,23 @@ shift
 :no_nt32\r
 \r
 if /I "%1"=="NewBuild" shift\r
-if exist %WORKSPACE%\BaseTools (\r
-  set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools\r
-) else (\r
-  if defined PACKAGES_PATH (\r
-    for %%i IN (%PACKAGES_PATH%) DO (\r
-      if exist %%~fi\BaseTools (\r
-        set EDK_TOOLS_PATH=%%~fi\BaseTools\r
-        goto checkBaseTools\r
+if not defined EDK_TOOLS_PATH (\r
+  if exist %WORKSPACE%\BaseTools (\r
+    set EDK_TOOLS_PATH=%WORKSPACE%\BaseTools\r
+  ) else (\r
+    if defined PACKAGES_PATH (\r
+      for %%i IN (%PACKAGES_PATH%) DO (\r
+        if exist %%~fi\BaseTools (\r
+          set EDK_TOOLS_PATH=%%~fi\BaseTools\r
+          goto checkBaseTools\r
+        )\r
       )\r
+    ) else (\r
+      echo.\r
+      echo !!! ERROR !!! Cannot find BaseTools !!!\r
+      echo. \r
+      goto BadBaseTools\r
     )\r
-  ) else (\r
-    echo.\r
-    echo !!! ERROR !!! Cannot find BaseTools !!!\r
-    echo. \r
-    goto BadBaseTools\r
   )\r
 )\r
 if exist %EDK_TOOLS_PATH%\Source set BASE_TOOLS_PATH=%EDK_TOOLS_PATH%\r
@@ -123,6 +125,7 @@ if exist %EDK_TOOLS_PATH%\Source set BASE_TOOLS_PATH=%EDK_TOOLS_PATH%
 IF NOT EXIST "%EDK_TOOLS_PATH%\toolsetup.bat" goto BadBaseTools\r
 call %EDK_TOOLS_PATH%\toolsetup.bat %*\r
 if /I "%1"=="Reconfig" shift\r
+goto check_NASM\r
 goto check_cygwin\r
 \r
 :BadBaseTools\r
@@ -139,6 +142,15 @@ goto check_cygwin
   @echo.\r
   goto end\r
 \r
+:check_NASM\r
+if not defined NASM_PREFIX (\r
+    @echo.\r
+    @echo !!! WARNING !!! NASM_PREFIX environment variable is not set\r
+    @if exist "C:\nasm\nasm.exe" @set "NASM_PREFIX=C:\nasm\"\r
+    @if exist "C:\nasm\nasm.exe" @echo   Found nasm.exe, setting the environment variable to C:\nasm\\r
+    @if not exist "C:\nasm\nasm.exe" echo   Attempting to build modules that require NASM will fail.\r
+)\r
+\r
 :check_cygwin\r
 if defined CYGWIN_HOME (\r
   if not exist "%CYGWIN_HOME%" (\r