Title: [240503] trunk/Tools
Revision
240503
Author
[email protected]
Date
2019-01-25 13:51:03 -0800 (Fri, 25 Jan 2019)

Log Message

Fix missing dependencies in extract-dependencies-from-makefile
https://bugs.webkit.org/show_bug.cgi?id=193783
<rdar://problem/47201571>

Reviewed by Alex Christensen.

The extract-dependencies-from-makefile script generates .xcfilelists
for XCBuild by invoking a makefile in --debug mode, parsing the
dependency information in the output, and extracting information
regarding targets and dependents. However, the way `make` emits this
dependency information is not rigorous, and so we need to determine
what lines to look for and parse by trial and error. This approach
didn't coriginally atch all the information we needed to collect, so
update the script to look for the additional lines we now know to look
for.

* Scripts/extract-dependencies-from-makefile:
(Parser):
(Parser.addTarget):
(Parser.addPrereq):
(Parser.doParse):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (240502 => 240503)


--- trunk/Tools/ChangeLog	2019-01-25 21:49:03 UTC (rev 240502)
+++ trunk/Tools/ChangeLog	2019-01-25 21:51:03 UTC (rev 240503)
@@ -1,3 +1,27 @@
+2019-01-25  Keith Rollin  <[email protected]>
+
+        Fix missing dependencies in extract-dependencies-from-makefile
+        https://bugs.webkit.org/show_bug.cgi?id=193783
+        <rdar://problem/47201571>
+
+        Reviewed by Alex Christensen.
+
+        The extract-dependencies-from-makefile script generates .xcfilelists
+        for XCBuild by invoking a makefile in --debug mode, parsing the
+        dependency information in the output, and extracting information
+        regarding targets and dependents. However, the way `make` emits this
+        dependency information is not rigorous, and so we need to determine
+        what lines to look for and parse by trial and error. This approach
+        didn't coriginally atch all the information we needed to collect, so
+        update the script to look for the additional lines we now know to look
+        for.
+
+        * Scripts/extract-dependencies-from-makefile:
+        (Parser):
+        (Parser.addTarget):
+        (Parser.addPrereq):
+        (Parser.doParse):
+
 2019-01-25  Brent Fulgham  <[email protected]>
 
         Activate the WebResourceLoadStatisticsStore in the NetworkProcess and deactivate it in the UIProcess.

Modified: trunk/Tools/Scripts/extract-dependencies-from-makefile (240502 => 240503)


--- trunk/Tools/Scripts/extract-dependencies-from-makefile	2019-01-25 21:49:03 UTC (rev 240502)
+++ trunk/Tools/Scripts/extract-dependencies-from-makefile	2019-01-25 21:51:03 UTC (rev 240503)
@@ -45,6 +45,7 @@
 
     fileNamePattern         = r"`([^']+)'"
     rePrerequisite          = re.compile(r"Prerequisite {} is .* than target {}".format(fileNamePattern, fileNamePattern))
+    reMustRemakeTarget      = re.compile(r"Must remake target {}".format(fileNamePattern))
     reWasConsideredAlready  = re.compile(r"{} was considered already.".format(fileNamePattern))
     rePruningFile           = re.compile(r"Pruning file {}.".format(fileNamePattern))
 
@@ -60,10 +61,12 @@
             if line: yield line
 
     def addTarget(self, target):
-        self.targets[target] = 1
+        if target != 'all' and target != 'force':
+            self.targets[target] = 1
 
     def addPrereq(self, prereq):
-        self.prereqs[prereq] = 1
+        if prereq != 'all' and prereq != 'force':
+            self.prereqs[prereq] = 1
 
     def doParse(self, input):
 
@@ -76,6 +79,11 @@
                 self.addPrereq(m.group(1))
                 continue
 
+            m = Parser.reMustRemakeTarget.search(line)
+            if m:
+                self.addTarget(m.group(1))
+                continue
+
             m = Parser.reWasConsideredAlready.search(line)
             if m:
                 self.addTarget(m.group(1))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to