From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.61]) by mx.groups.io with SMTP id smtpd.web09.3456.1582807418508633601 for ; Thu, 27 Feb 2020 04:43:38 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=YUtGEuDf; spf=pass (domain: redhat.com, ip: 205.139.110.61, mailfrom: lersek@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582807417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0hrH8Rg2BnLsQeccRsd3JmCu4K+EgB3wLNTvGf6FLek=; b=YUtGEuDft2qH+RQLC3ngL03i7U9r2OZTiPdp9bZsTEG2uzB36pzGV94dLfTFSJ9UNKfg+j 5BT9v3uNjmydob0PBwB3EpoPQlcB7DfChtHh98RSPtWDXbka1wYxmJS+8pnN5M5waBtfgG W1VpdG+GWmq8xHa9ipAfcCZr7shAXt8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-302-W_rb9OcBP2GKt0nvJrbMIw-1; Thu, 27 Feb 2020 07:43:33 -0500 X-MC-Unique: W_rb9OcBP2GKt0nvJrbMIw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4DC5E189F762; Thu, 27 Feb 2020 12:43:32 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-46.ams2.redhat.com [10.36.116.46]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD30519E9C; Thu, 27 Feb 2020 12:43:30 +0000 (UTC) Subject: Re: [Patch 1/1][edk2-stable202002]BaseTools: Fixed a regression issue in Makefile for incremental build From: "Laszlo Ersek" To: Bob Feng , Andrew Fish , Leif Lindholm , Michael D Kinney , Liming Gao Cc: devel@edk2.groups.io, Pierre Gondois References: <20200227094705.25404-1-bob.c.feng@intel.com> Message-ID: Date: Thu, 27 Feb 2020 13:43:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit On 02/27/20 13:39, Laszlo Ersek wrote: > On 02/27/20 10:47, Bob Feng wrote: >> 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: >> > > (1) I agree this should go into edk2-stable202002. > > Acked-by: Laszlo Ersek Before I forget: please update the subject line of this patch to something that actually carries information. For example: BaseTools: remove invalid leading space in nmake rules/directives I'm not familiar with NMAKE, so maybe "rules" and "directives" aren't the right terms. Still, the subject should name both NMAKE and leading space (or whitespace at least). Laszlo