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 <af...@apple.com>
>> Cc: Laszlo Ersek <ler...@redhat.com>
>> Cc: Leif Lindholm <l...@nuviainc.com>
>> Cc: Michael D Kinney <michael.d.kin...@intel.com>
>> Cc: Pierre Gondois <pierre.gond...@arm.com>
>> Signed-off-by: Bob Feng <bob.c.f...@intel.com>
>> Reviewed-by: Liming Gao <liming....@intel.com>
>> Tested-by: Liming Gao <liming....@intel.com>
>> ---
>>  .../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 <ler...@redhat.com>

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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#55000): https://edk2.groups.io/g/devel/message/55000
Mute This Topic: https://groups.io/mt/71583896/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to