Re: [scons-devel] auto-configuration plans
Bram Moolenaar <[email protected]>
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
David Snopek wrote: > Bram Moolenaar said: > > To be able to use SConf without SCons the interface of the module needs > > to be changed. As far as I can see now, this would involve removing all > > dependencies on SCons and turning them into a generic interface. Then > > make a wrapper that implements the interface for SCons. For Aap I then > > need to make a different wrapper. > > > > If done right the SConf module can become a generic Python module or > > package that can be used in several ways. I'm especially thinking of a > > standalone autoconf-like program. I am sure this would be very useful > > (esp. on non-Unix systems, where autoconf can't be used). > > > > Of course it takes effort to separate Sconf.py into two parts and design > > the generic interface. I am willing to do most of this work. > > I think the abstraction is pretty obvious here. Only the portion that > actually does the compiling, linking, and running is SCons specfic (or > should be ;-). This consists mainly of the SConf class. The actual > configure checks are simply Python functions that call the Try* members. > There are some extraneus SCons-isms in these functions for automatically > setting the environment which would also have to be abstracted but they > look minor at first glance. Making an interface to preform the building should not be difficult. Although it might be required to remove a few SCons-isms. This means the Environment object is not available in the config module. Only environment variables, such as $CC, $CFLAGS, etc. This probably has to be separated anyway, so that the results of the config process are separate from settings done in the SConsscript. > So what I see is the potential for sharing a library of configure checks. > FYI, Hartmut Goebel has been working on re-implementing ALL the autoconf > macros in Python for SConf. I have been busy but I have been meaning to > through together a patch for what he has given me. Unfortunately, most of > these are dependant on Autoscons for features SCons doesn't provide but > I'll throw something together. That sounds very good! If most of the autoconf functionality is rewritten in Python I'm sure a lot of people will want to use that for various purposes. The more important it becomes to design a good interface to access this functionality. If the interface is designed with the following three goals in mind it will probably cover everything: 1. Used by SCons (through a wrapper module) 2. Used by Aap (through a wrapper module) 3. Used by a standalone autoconf-like program > Now for the propaganda: if A-A-P was build on top of the SCons engine > instead of developing its own we could EASILY share the configure code. > Anyway, I think that any sort of cooperation would benefit everyone. This has been discussed before. The problem is that it would take a lot of effort to make the SCons engine work with Aap. Although the engine has been designed to be used with other scripting languages, it is very specific to how SCons works. I have tried to use it for Aap but got stuck. I couldn't figure out how to make it work. I have challenged the SCons developers before to show how the SCons engine could be used with Aap, but this has not produced results. Apparently there is nobody willing to invest time in this. By now it will be very difficult anyway (e.g., Aap uses scopes for variables). -- It is hard to understand how a cemetery raised its burial cost and blamed it on the cost of living. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01