Пример #1
0
    def _make(self, name, block='_all'):
        """
        An internal method used by :`~rules.RuleCloth.fetch()` to process
        content from :attr:`~rules.RuleCloth.rules` and return
        :meth:`~cloth.BuildCloth.get_block()` in Makefile format.
        """
        rule = self.rules[name]

        m = MakefileCloth()

        for cmd in rule['command']:
            m.job(cmd, block=block)

        m.msg(rule['description'], block=block)

        if 'depfile' in rule:
            m.raw(['include ' + rule['depfile']], block=block)

        return m.get_block(block)