Hi,
in SVN r2646, I added support for an alternative build system to configure and compile Geany's sources. It's called Waf (http://code.google.com/p/waf/) and really nice ;-).
Short usage instructions: Assuming a fresh SVN checkout: 1) ./waf configure 2) ./waf build 3) ./waf install
And you are done. If you like fancy, coloured output and progress bars, replace step 2) with: ./waf build -p
Waf requires Python 2.3, due to some extensions to the build script (wscript) it actually needs Python 2.4 but I don't think this is a problem.
Details: This is not an attempt to remove or replace the autotools build system. It is just an alternative. The autotools files keep being maintained in future as well as Waf's wscript.
Why Waf? It's great ;-). Some days ago, I read about Waf and had a looked at it. Since this time, I fell in love with it and started to write the wscript file for Geany. Now let's get a little more technically :D.
Advantages: - faster than autotools - easier to use and understand - no magic (!) - more flexible
Disadvantages: - equivalent of "make dist" is missing (it's actually there but is not really unusable) - maybe a little less portable - need Python 2.4 (I guess almost every user on a mainstream Linux distribution has it, so)
Waf's dist command is a little of the one of the autotools suite: it includes everything in the source directory except some well known files and a list of user-defined files. But this would make a lot of work to create a list of all files to not include. Therefore, tarball creation for releases should be done with the autotools suite, at least for now.
At the moment, only the wscript (Python script with build instructions for Geany) is included in EXTRA_DIST (used for release tarballs). If you agree, I would like to add the waf script too. It increases the tarball file size by about 80 KB.
There are still a few problems with the wscript, e.g. the dependency handling of source files is not yet perfect but I'll work on this within the next days. Anyway, it already works great in general, e.g. building and installing the sources.
And it *should* also be possible to use both build systems side by side. Every created or compiled file by Waf is stored in the a subdirectory named "build". There are two exceptions: geany.desktop.in and doc/Doxyfile. Everything else goes into build/default.
For those (like me) who are used to type configure && make && make install, I wrote a little script wafinit.sh which creates a fake configure script and a Makefile which actually only call the waf script with the different actions. configure.sh calls ./waf configure make calls ./waf build make install calls ./waf install
(some kind of wrapper just for convenience) To use it, simply call once: scripts/wafinit.sh and the necessary configure and Makefile are created.
Regards, Enrico
On Thu, 5 Jun 2008 16:35:28 +0200, Enrico Tröger enrico.troeger@uvena.de wrote:
Hi,
in SVN r2646, I added support for an alternative build system to configure and compile Geany's sources.
And as usual I sent the mail before I finished writing ;-).
If there are no objections and problems, I'll announce it with short usage instructions on the users mailing list and add a note in the docs.
Regards, Enrico
On Thu, 5 Jun 2008 16:35:28 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
Hi,
in SVN r2646, I added support for an alternative build system to configure and compile Geany's sources. It's called Waf (http://code.google.com/p/waf/) and really nice ;-).
What maintenance does it need - e.g. if I add a source file or change configure.in, Makefile.am does it need updating?
Regards, Nick
On Thu, 5 Jun 2008 17:04:34 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Thu, 5 Jun 2008 16:35:28 +0200 Enrico Tröger enrico.troeger@uvena.de wrote:
Hi,
in SVN r2646, I added support for an alternative build system to configure and compile Geany's sources. It's called Waf (http://code.google.com/p/waf/) and really nice ;-).
What maintenance does it need - e.g. if I add a source file or change configure.in, Makefile.am does it need updating?
Depends on what you change ;-). Adding source files generally don't need updating as source files are currently found using find_sources_in_dirs(), see lines 246, 256 and 270.
Generally the two most important functions are configure() and build(). But if you don't like updating it when you change anything in the configure.in/Makefile.am's, then just skip it, I'll do it afterwards.
And I forgot just another thing to mention before: Waf has another disadvantage: it's not as good documented as it could be ;-). Anyway, it's not that difficult at all.
Regards, Enrico