Re: [AD] build process overhaul

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


On Sat, 2005-11-26 at 21:10 -0500, Jon Rafkind wrote:

> Attached is something, although wildly unfinished. There are multiple 
> ways to build a project with SCons but I think I like this way so far. 
> The technique is to have a top-level SConstruct that calls SConscript 
> files in subdirectories that each return a list of files that should be 
> built and linked together to form liballeg.so. This makes it easy to 
> return a different list of files for different platforms since all the 
> SConscript files have to do is include the SConscript files for the 
> correct platform, i.e. src/unix, src/linux for linux and src/win for 
> windows, etc.

I would prefer something like:

allegro/
   src/
      keep this clean from build files please
   SConstruct
   scons/
       unix.scons
       mingw.scons
       vc.scons
       misc.scons
       util.scons
       linux.scons
       alsa.scons
       x11.scons
       ...

I.e., keep all the src directories clean of build files, have a single
SConstruct file in the top dir, and put all helper scripts into a scons
dir (which may be hierarchical itself if it makes sense). So there's not
so much clutter.
    
> The first hurdle I have stumbled upon is that scons thinks 
> src/linux/svgalibs.s is a "static" file and cant be compiled into a 
> shared library. Im not sure what this is about but I will investigate.

The .s files should be compiled with gcc -x assembler-with-cpp. Not sure
if scons does dependencies for them, but a custom scanner (or just some
Depend() calls) would be quite trivial for them.

> 
> The scons build doesnt do anything fancy like creating the platform 
> specific header files nor the config.h file, but Ill get to that at some 
> point.

Heh, yes. Actually, if we first have a unix build only, that would be a
good first step.

> One more thing, I used map, lambda, and reduce which I guess some people 
> dont like so if anyone is really opposed to using these things feel free 
> to change them or just complain until I change them.

Dunno, Peter Wang gave me this link on allegro.cc - so Guido van Rossum
himself seems to be among the people who don't like it:
http://www.artima.com/weblogs/viewpost.jsp?thread=98196

-- 
Elias Pschernig





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