Skip to content

Commit

Permalink
BaseTools: Remove invalid leading space before !INCLUDE in Makefile
Browse files Browse the repository at this point in the history
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2563

This patch is to fix a incremental build regression bug
which happen when using nmake. That's introduced by 818283d.

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>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Tested-by: Liming Gao <liming.gao@intel.com>
  • Loading branch information
BobCF authored and mergify[bot] committed Mar 2, 2020
1 parent edfe16a commit 2be4828
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions BaseTools/Source/Python/AutoGen/IncludesAutoGen.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@ def CreateDepsInclude(self):
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:
Expand Down

0 comments on commit 2be4828

Please sign in to comment.