]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/GenMake.py
Sync EDKII BaseTools to BaseTools project r2065.
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / GenMake.py
index 2e18f6771c79e699e7fc8369073b02886f59e6c7..b1e438547fb67f4dcfcb9a379ba3b6babf0444cc 100644 (file)
@@ -26,7 +26,7 @@ from BuildEngine import *
 import Common.GlobalData as GlobalData
 
 ## Regular expression for finding header file inclusions
-gIncludePattern = re.compile(r"^[ \t]*#?[ \t]*include(?:[ \t]*(?:\\(?:\r\n|\r|\n))*[ \t]*)*(?:[\"<]?[ \t]*)([\w.\\/() \t]+)(?:[ \t]*[\">]?)", re.MULTILINE|re.UNICODE|re.IGNORECASE)
+gIncludePattern = re.compile(r"^[ \t]*#?[ \t]*include(?:[ \t]*(?:\\(?:\r\n|\r|\n))*[ \t]*)*(?:\(?[\"<]?[ \t]*)([-\w.\\/() \t]+)(?:[ \t]*[\">]?\)?)", re.MULTILINE|re.UNICODE|re.IGNORECASE)
 
 ## Regular expression for matching macro used in header file inclusion
 gMacroPattern = re.compile("([_A-Z][_A-Z0-9]*)[ \t]*\((.+)\)", re.UNICODE)
@@ -769,7 +769,7 @@ cleanlib:
                     Inc = os.path.normpath(Inc)
                     for SearchPath in [CurrentFilePath] + SearchPathList:
                         FilePath = os.path.join(SearchPath, Inc)
-                        if not os.path.exists(FilePath) or FilePath in CurrentFileDependencyList:
+                        if not os.path.isfile(FilePath) or FilePath in CurrentFileDependencyList:
                             continue
                         FilePath = PathClass(FilePath)
                         CurrentFileDependencyList.append(FilePath)