Closed Bug 1129635 Opened 9 years ago Closed 9 years ago

move grouping of UNIFIED_SOURCES to the frontend, rather than the recursivemake backend


(Firefox Build System :: General, defect)

Not set


(Not tracked)



(Reporter: froydnj, Unassigned)



We currently figure out the UnifiedFoo.cpp -> [#include'd files] mapping in

This is a layering violation; we should be computing this someplace else.

In a similar fashion, we write out the unified files themselves in the unified make backend:

This is also a layering violation; we should be writing these files someplace else.

The "someplace else" in both cases is different:

- We want to compute the mapping between files in the frontend:

- We want to write out the files in the common backend.

And it's the second one that is a problem, because our current design for processing objects emitted by the frontend looks like:

1. subclassing backend calls super().consume_object:

2. If the common backend didn't consume the object, the subclassing backend does whatever it likes.

In the case of writing out the unified files, however, we want *both* backends to do useful things: the common backend should write out the unified files, while the subclassing backend (recursivemake, mostly) will add the necessary makefile logic.

The most straightforward solution is to have the common backend call into a hook function for subclasses (for UnifiedSources only, but I suspect we will need more instances of this in the future), so the call chain looks like:


Bikeshedding on the names welcome.

(I wonder if we should really structure things so CommonBackend.consume_object drives everything, calling subclassing methods as appropriate...)
This is all easier to do in the visual studio bug, so that we can update all the backends in the same bug.
Closed: 9 years ago
Resolution: --- → INCOMPLETE
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.