NMAKE is limited to command-line length of 4096 characters. Due to the
large number of /I directives specified on command line (one per include
directory), the path length of WORKSPACE is multiplied by the number of
/I directives and can exceed the limit.
The patch is going to generate inc.lst for every module.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong....@intel.com>
---
 BaseTools/Source/Python/AutoGen/GenMake.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py 
b/BaseTools/Source/Python/AutoGen/GenMake.py
index 89285c1..7909789 100644
--- a/BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
@@ -516,15 +516,18 @@ cleanlib:
                                                     )
             FileMacroList.append(FileMacro)
 
         # INC_LIST is special
         FileMacro = ""
+        if FileBuildRule.INC_LIST_MACRO not in self.ListFileMacros:
+            self.ListFileMacros[FileBuildRule.INC_LIST_MACRO] = []
+
         IncludePathList = []
         for P in  self._AutoGenObject.IncludePathList:
             IncludePathList.append(IncPrefix + self.PlaceMacro(P, self.Macros))
-            if FileBuildRule.INC_LIST_MACRO in self.ListFileMacros:
-                
self.ListFileMacros[FileBuildRule.INC_LIST_MACRO].append(IncPrefix + P)
+            
self.ListFileMacros[FileBuildRule.INC_LIST_MACRO].append(IncPrefix+P)
+
         FileMacro += self._FILE_MACRO_TEMPLATE.Replace(
                                                 {
                                                     "macro_name"   : "INC",
                                                     "source_file" : 
IncludePathList
                                                 }
-- 
2.6.1.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to