User:Gszorc/Build System Experimentation
The Mozilla build system, specifically all the makefiles and the things they do, is scary. I have a personal project (which will inevitably bleed into bugs and patches) to improve it any way I can.
Impetus
User:ally and I were opining how developing mozilla-central on Windows isn't very Windows-y. Specifically, there is no official Visual Studio story. Windows developers love Visual Studio and it is really unfortunate we can't give them what they love. So, all the work on this page started as a way to explore generating Visual Studio project files automatically with the goal of eventually bundling them in the source tree (or at least providing a way for them to be generated automatically on checkout).
PyMake Tracing
I've implemented tracing to PyMake. When you construct a Makefile instance in PyMake, you can supply an object which will receive callbacks when various build events occur, such as:
- Start/end of new Makefile processing
- Start/end of target processing
- Start/end of command execution
These callbacks all pass information about the object they are operating on.
I've implemented a basic tracing logger and integrated it with the PyMake make.py driver. It takes the callback data, converts it to JSON, and writes it to a file. This stream contains very detailed records, including dependencies and variables. From that stream, we should be able to perform magic not previously conceivable.
This work can be found at https://github.com/indygreg/mozilla-central/tree/pymake_hacking.