Re: [AD] build process overhaul

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat, 2005-11-26 at 15:36 +0100, Evert Glebbeek wrote:
> About the build system, I think there's something to be said for an 
> established and common system. I think that means autotools.
> Personally, I don't have much against the way the current configure script 
> works, though it could all be a lot more consistent and `clean'.
> 
> > #1 Dependency generation under unix (all those misc/dep* sed scripts) is
> > error prone and slow (24 seconds to run "make depend" here, compared to
> > 9 seconds running "make depend" when cross-compiling to mingw, where gcc
> > is used instead of sed).
> 
> We should be able to use gcc instead of sed under *nix, shouldn't we?

Yes, just doing that was my first idea, but it only would make the
annoyance somewhat smaller.

> > #2 Use of "make depend" itself is error prone, automatic dependencies
> > are much better. I don't want to know how often I hunted phantom bugs
> > caused by forgetting make depend.
> 
> Yes, but I do like the ability to regenerate dependencies manually.

Well, you never lose that ability. Just the necessity would be gone.

> > #3 It is hard to add configure checks due to use of m4. Maybe someone
> > thinks it is an easy to use language, but I doubt it.
> 
> I think it's horribly confusing, but I also think that Allegro's 
> configure.in and aclocal scripts make it worse than it has to be.

Yeah. According to the autoconf manual, we should create a directory
called "m4", and split aclocal.m4 up into multiple files. Like:

m4/cpu.m4
m4/gcc.m4
m4/alsa.m4
...

I was thinking about doing that after I get automake to work, but it
would be independent.

> > #4 Platform dependence, i.e. we have separate makefiles for each
> > platform/compiler. (E.g. getting the split demo to compile again
> > everywhere took several iterations because of that.)
> 
> I'm not sure I think this really is a problem, but maybe it needs to be 
> done better. For my own projects, I used to just have one Makefile for 
> everything. Recently, I split it up into a makefile.lst (similar to 
> Allegro's), seperate include files for each platform (for setting up 
> variables and things like that) and a skeleton makefile that includes all 
> the special rules and targets.
> Feels about right to me.

Yes, I'm not sure either, since there simply are all those platform
differences. The ideal solution would of course be to have only one
platform independent build specification - but in practice, no tool
seems to be ready for that.

Still, I feel, Allegro deserves to have a build process which could be
presented, instead of "the build process works by using lots of custom
makefiles, but better don't look at details" :)

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/