From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.1714.1582796843455693358 for ; Thu, 27 Feb 2020 01:47:23 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: bob.c.feng@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2020 01:47:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,491,1574150400"; d="scan'208";a="317730008" Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.66]) by orsmga001.jf.intel.com with ESMTP; 27 Feb 2020 01:47:20 -0800 From: "Bob Feng" To: devel@edk2.groups.io Cc: Andrew Fish , Laszlo Ersek , Leif Lindholm , Michael D Kinney , Pierre Gondois , Liming Gao Subject: [Patch 1/1][edk2-stable202002]BaseTools: Fixed a regression issue in Makefile for incremental build Date: Thu, 27 Feb 2020 17:47:05 +0800 Message-Id: <20200227094705.25404-1-bob.c.feng@intel.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2563 This patch is to fix a increametal build regression bug which happen when using nmake. That's introduced by 818283de3f6d. If there is white space before !INCLUDE instruction, nmake will not process it. Source code's dependent header files are listed in ${deps_file} file, if it's not included successfully, nmake will not detect the change of those header file. This patch has been verified in Windows with VS2015 and Linux with GCC5. The header file add/modify/delete can trig the incremental build with this fix. There is no impact on the clean build. Cc: Andrew Fish Cc: Laszlo Ersek Cc: Leif Lindholm Cc: Michael D Kinney Cc: Pierre Gondois Signed-off-by: Bob Feng Reviewed-by: Liming Gao Tested-by: Liming Gao --- .../Source/Python/AutoGen/IncludesAutoGen.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py index 0a6314266f45..720d93395aaf 100644 --- a/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py +++ b/BaseTools/Source/Python/AutoGen/IncludesAutoGen.py @@ -50,21 +50,21 @@ class IncludesAutoGen(): MakePath = self.module_autogen.BuildOption.get('MAKE', {}).get('PATH') if not MakePath: EdkLogger.error("build", PARAMETER_MISSING, Message="No Make path available.") elif "nmake" in MakePath: _INCLUDE_DEPS_TEMPLATE = TemplateString(''' - ${BEGIN} - !IF EXIST(${deps_file}) - !INCLUDE ${deps_file} - !ENDIF - ${END} +${BEGIN} +!IF EXIST(${deps_file}) +!INCLUDE ${deps_file} +!ENDIF +${END} ''') else: _INCLUDE_DEPS_TEMPLATE = TemplateString(''' - ${BEGIN} - -include ${deps_file} - ${END} +${BEGIN} +-include ${deps_file} +${END} ''') try: deps_include_str = _INCLUDE_DEPS_TEMPLATE.Replace(deps_file) except Exception as e: -- 2.20.1.windows.1