public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch 1/1][edk2-stable202002]BaseTools: Fixed a regression issue in Makefile for incremental build
@ 2020-02-27  9:47 Bob Feng
  2020-02-27 12:39 ` Laszlo Ersek
  0 siblings, 1 reply; 7+ messages in thread
From: Bob Feng @ 2020-02-27  9:47 UTC (permalink / raw)
  To: devel
  Cc: Andrew Fish, Laszlo Ersek, Leif Lindholm, Michael D Kinney,
	Pierre Gondois, Liming Gao

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 <afish@apple.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Tested-by: Liming Gao <liming.gao@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:
-- 
2.20.1.windows.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-02-28  1:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-27  9:47 [Patch 1/1][edk2-stable202002]BaseTools: Fixed a regression issue in Makefile for incremental build Bob Feng
2020-02-27 12:39 ` Laszlo Ersek
2020-02-27 12:43   ` Laszlo Ersek
2020-02-27 14:12   ` [edk2-devel] " Liming Gao
2020-02-27 15:53   ` Bob Feng
2020-02-27 17:17     ` Laszlo Ersek
2020-02-28  1:34       ` Bob Feng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox