Changeset 240503 in webkit


Ignore:
Timestamp:
Jan 25, 2019 1:51:03 PM (5 years ago)
Author:
Keith Rollin
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):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r240498 r240503  
     12019-01-25  Keith Rollin  <krollin@apple.com>
     2
     3        Fix missing dependencies in extract-dependencies-from-makefile
     4        https://bugs.webkit.org/show_bug.cgi?id=193783
     5        <rdar://problem/47201571>
     6
     7        Reviewed by Alex Christensen.
     8
     9        The extract-dependencies-from-makefile script generates .xcfilelists
     10        for XCBuild by invoking a makefile in --debug mode, parsing the
     11        dependency information in the output, and extracting information
     12        regarding targets and dependents. However, the way `make` emits this
     13        dependency information is not rigorous, and so we need to determine
     14        what lines to look for and parse by trial and error. This approach
     15        didn't coriginally atch all the information we needed to collect, so
     16        update the script to look for the additional lines we now know to look
     17        for.
     18
     19        * Scripts/extract-dependencies-from-makefile:
     20        (Parser):
     21        (Parser.addTarget):
     22        (Parser.addPrereq):
     23        (Parser.doParse):
     24
    1252019-01-25  Brent Fulgham  <bfulgham@apple.com>
    226
  • trunk/Tools/Scripts/extract-dependencies-from-makefile

    r238854 r240503  
    4646    fileNamePattern         = r"`([^']+)'"
    4747    rePrerequisite          = re.compile(r"Prerequisite {} is .* than target {}".format(fileNamePattern, fileNamePattern))
     48    reMustRemakeTarget      = re.compile(r"Must remake target {}".format(fileNamePattern))
    4849    reWasConsideredAlready  = re.compile(r"{} was considered already.".format(fileNamePattern))
    4950    rePruningFile           = re.compile(r"Pruning file {}.".format(fileNamePattern))
     
    6162
    6263    def addTarget(self, target):
    63         self.targets[target] = 1
     64        if target != 'all' and target != 'force':
     65            self.targets[target] = 1
    6466
    6567    def addPrereq(self, prereq):
    66         self.prereqs[prereq] = 1
     68        if prereq != 'all' and prereq != 'force':
     69            self.prereqs[prereq] = 1
    6770
    6871    def doParse(self, input):
     
    7578                self.addTarget(m.group(2))
    7679                self.addPrereq(m.group(1))
     80                continue
     81
     82            m = Parser.reMustRemakeTarget.search(line)
     83            if m:
     84                self.addTarget(m.group(1))
    7785                continue
    7886
Note: See TracChangeset for help on using the changeset viewer.