]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: Remove invalid leading space before !INCLUDE in Makefile
authorBob Feng <bob.c.feng@intel.com>
Thu, 27 Feb 2020 14:25:24 +0000 (22:25 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 2 Mar 2020 02:36:25 +0000 (02:36 +0000)
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 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>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Tested-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/Python/AutoGen/IncludesAutoGen.py

index 0a6314266f45b151705a7010708ccfce0126f5bf..720d93395aaff0b5dcada9df771a8172cfb97120 100644 (file)
@@ -52,17 +52,17 @@ class IncludesAutoGen():
             EdkLogger.error("build", PARAMETER_MISSING, Message="No Make path available.")\r
         elif "nmake" in MakePath:\r
             _INCLUDE_DEPS_TEMPLATE = TemplateString('''\r
-        ${BEGIN}\r
-        !IF EXIST(${deps_file})\r
-        !INCLUDE ${deps_file}\r
-        !ENDIF\r
-        ${END}\r
+${BEGIN}\r
+!IF EXIST(${deps_file})\r
+!INCLUDE ${deps_file}\r
+!ENDIF\r
+${END}\r
                ''')\r
         else:\r
             _INCLUDE_DEPS_TEMPLATE = TemplateString('''\r
-        ${BEGIN}\r
-        -include ${deps_file}\r
-        ${END}\r
+${BEGIN}\r
+-include ${deps_file}\r
+${END}\r
                ''')\r
 \r
         try:\r