From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C42C2821CE for ; Wed, 1 Mar 2017 05:19:21 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Mar 2017 05:19:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,225,1484035200"; d="scan'208";a="70924357" Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.13]) by fmsmga005.fm.intel.com with ESMTP; 01 Mar 2017 05:19:20 -0800 From: Hao Wu To: edk2-devel@lists.01.org Cc: Hao Wu , Liming Gao , Yonghong Zhu Date: Wed, 1 Mar 2017 21:19:12 +0800 Message-Id: <1488374352-12508-1-git-send-email-hao.a.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.0 Subject: [PATCH] BaseTools/Source/C/Makefiles: Fix NmakeSubdirs.bat always return 0 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Mar 2017 13:19:21 -0000 In batch script file NmakeSubdirs.bat, the value changes made to the variable 'TOOL_ERROR' within the 'setlocal...endlocal' block will not be reflected in the return value of the script. A value of 0 will always be returned. Thus, the script will not reflect the result of the 'nmake' command correctly when building BaseTool source codes. Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- BaseTools/Source/C/Makefiles/NmakeSubdirs.bat | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/C/Makefiles/NmakeSubdirs.bat b/BaseTools/Source/C/Makefiles/NmakeSubdirs.bat index 4b3edfe..816d4fa 100644 --- a/BaseTools/Source/C/Makefiles/NmakeSubdirs.bat +++ b/BaseTools/Source/C/Makefiles/NmakeSubdirs.bat @@ -1,7 +1,7 @@ @REM ## @file @REM # Makefile @REM # -@REM # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+@REM # Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
@REM # This program and the accompanying materials @REM # are licensed and made available under the terms and conditions of the BSD License @REM # which accompanies this distribution. The full text of the license may be found at @@ -12,8 +12,8 @@ @REM # @echo off -@set TOOL_ERROR=0 setlocal +set TOOL_ERROR=0 SET NMAKE_COMMAND=%1 SHIFT @@ -39,7 +39,6 @@ goto exit :error popd set /A TOOL_ERROR=%TOOL_ERROR%+%ERRORLEVEL% -ENDLOCAL ECHO Error while making %1! VERIFY OTHER 2>NUL -- 1.9.5.msysgit.0