'Given a list of targets, return a path for a single file
representing the result of building all the targets or None.
Uses a stamp file if necessary.'

def WriteCollapsedDependencies(self, name, targets, order_only=None):

    assert (targets == filter(None, targets)), targets
    if (len(targets) == 0):
        assert (not order_only)
        return None
    if ((len(targets) > 1) or order_only):
        stamp = self.GypPathToUniqueOutput((name + '.stamp'))
        targets = self.ninja.build(stamp, 'stamp', targets, order_only=order_only)
        self.ninja.newline()
    return targets[0]
