Previous topic

Commands

Next topic

The soclib_cc module

This Page

Makefile rule parser

Some dependency trackers can generate Makefile portions to create a rule dependency list, like GCC does. In order to be able to import the generated Makefile stanza in soclib_builder, here is a parser.

class soclib_builder.mfparser.MfRule

A Makefile rule parser.

__init__(text)

Create the new parser with the given Makefile stanza.

Parameters:text – a Makefile stanza

Stanza is of the form:

dest0 dest1 destn : prerequisite0 prerequisite1 prerequisiten

Additionnaly, this parser supports correct handling of line continuation with backslashes, and escaping of colon : in file names.

dests

A list of filenames which are destinations of the rule

prerequisites

A list of filenames which are the prerequisites of the rule.