[Scummvm-devel] Small source restructuring
Max Horn
max at quendi.de
Sun Feb 12 02:16:04 CET 2006
Am 12.02.2006 um 10:29 schrieb Jonathan Gray:
> On Sun, Feb 12, 2006 at 09:06:18AM +0000, Lars Persson wrote:
>>
>> Hi all!
>>
>> Just been messing around with the Small source restructuring..
>> And..
>> just wonder.. small change? :-) Well.. anyway.. changing the
>> structure
>> in the module.mk means that Symbian is currently no go.. but
>> that will
>> be fixed with some more clever perl scripting (Sumthin... where
>> are
>> youuuu!).
>
> Why is this module.mk structure used anyway, surely a
> standard traditional make structure with a per directory
> Makefile would cause less headaches?
> Perhaps Max can shed some light as to why this was done.
Because recursive make sucks? See <http://www.pcug.org.au/~millerp/
rmch/recu-make-cons-harm.html>
Roughly, a single Makefile allows for much faster and more correct
builds. If I do a "make" in an up-to-date checkout of e.g. Exult
(which uses automake and recursive make in far *fewer* subdirs than
ScummVM) I have to wait 20-30 secs before it tells me "nothing to
do", in ScummVM it's a few seconds.
Also, in a recursive make setup, there are various interdependencies
that can't be recorded. For details, read the paper I linked to above.
Note, we *are* using a standard Makefile, it's simply split over
multiple directories. For me, it actually makes things a lot easier,
since e.g. editing a module.mk file is quite straightforward.
Finally, I don't see how a "standard traditional make structure with
a per directory Makefile" would have helped Lars here -- parsing a
full Makefile isn't any easier than parsing a module.mk file, to the
contrary, I'd say :-).
Bye,
Max
More information about the Scummvm-devel
mailing list