Closed Bug 769414 Opened 14 years ago Closed 12 years ago

Add statements manipulation API to pymake

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gps, Unassigned)

References

Details

pymake currently has two layers for interacting with make files: 1) parser layer which converts make file strings into pymake.parserdata.Statement instances 2) execution layer which takes a set of pymake.parserdata.Statement and turns that into a pymake.data.Makefile, executing some bits along the way I've created a layer that sits between them and allows manipulation and examination of make files without involving execution (which may involve lossy transforms). I would like this API layer added to pymake. What I'm proposing is basically to add https://github.com/indygreg/mozilla-central/blob/build-splendid/build/buildsplendid/makefile.py to pymake. For an initial landing, I would probably strip some things out, including the determinism checker and reformatting (which should probably be functions on Statement-derived classes anyway). I could also add new functionality, such as an API to create make files from nothing. e.g. t = Target('foo.o', prerequisities=['foo.c', 'foo.h']); makefile.add_target(t). Anyway, the code is mostly already written: it just needs to be integrated with pymake. It is worth explicitly stating that I don't intend for this code to inject itself into the current execution model. Instead, this layer will be there for people who need the additionally functionality. Think of it as a bridge between the parser and the execution layers. bsmedberg, etc: are you receptive to this idea? If so, any comments before I start working on a patch?
I certainly don't object. I'm not sure I have time to review it, so if it doesn't substantially affect the current execution system and passes unit tests you can probably just push it. I'm happy for Ted or Khuey or Joey or somebody to do real reviews if they are interested.
I'd like somebody to at least skim it.
Depends on: 778495
The link in the initial comment is dead. I'm pretty sure https://github.com/indygreg/mozilla-central/tree/build-splendid/python/pymake-bs/pymake is the continuation of that work. The mid-level API lives in builder.py IIRC.
Not actively working on this.
Assignee: gps → nobody
On second thought, meh.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.