[Scummvm-devel] Small source restructuring
Jonathan Gray
jsg at goblin.cx
Sun Feb 12 16:39:00 CET 2006
On Sun, Feb 12, 2006 at 11:15:23AM +0100, Max Horn wrote:
>
> 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.
I routinely build a source tree of over 600 MB in size, it works fine.
>
> 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.
I don't see it as being any harder.
ie Makefile for ls here is:
# $OpenBSD: Makefile,v 1.7 2003/08/06 19:09:09 tedu Exp $
PROG= ls
SRCS= cmp.c ls.c main.c print.c util.c
DPADD= ${LIBUTIL}
LDADD= -lutil
.include <bsd.prog.mk>
And you can actually do things like make clean in only one
directory which people expect to work.
It isn't a standard Makefile as such as it requires GNU extensions
to build, but I guess that you will claim GNU make is really make.
More information about the Scummvm-devel
mailing list