Hi
I'm working on a new build system called Meson. Every now and then I look into public projects that have complex build definitions and rewrite them in Meson to test its usability. Mame's build system is quite complex so it provides an interesting challenge.
I ported enough of it so that I can compile Mame with miniosd and all tools. It compiles, links and runs but I have not tested it any further (there may be gremlins there).
The main advantage is that Mame's current Make config takes ~16k lines of code whereas Meson takes just under 10k lines. The biggest savings come from the fact that you don't need to manually write (and keep updating ) the source-header dependencies. Meson extracts them automatically by having the compiler write dependency files (yes, even with msvc).
This is not directly comparable, of course, as Meson does not do all the stuff the Make system does. Most of the lines are source listings that are almost identical for both build systems, a rough estimate is that adding the remaining functionality would take less than 1k lines.
Compile times are roughly the same of around 10 minutes using 8 cores.
Should someone want to try it themselves, get the tarball from here, then get Meson from trunk and follow the instructions.
That's about the jist of it. It was a fun challenge, hopefully someone else will also find it interesting.
Thanks,
|