Home » Community » Coffee corner » The power of Waf
The power of Waf [message #29441] |
Wed, 20 October 2010 17:20  |
chickenk
Messages: 171 Registered: May 2007 Location: Grenoble, France
|
Experienced Member |
|
|
Hi everyone,
the (very successful) attempt from dolik.rce to get a working generic Makefile got me thinking more about alternatives building ways for U++.
This is important IMO because it mostly means you don't have to rely on TheIDE (which I love, don't get me wrong) and it's a big step towards the effort of making U++ libraries standalone (think usable in an existing project non U++-friendly).
I had some previous experiences with the Waf build system (http://waf.googlecode.com) which is a very good piece of software in my opinion. Anyway, I tried to compile some parts of U++ with it, and the result is the wscript file attached.
A wscript for waf is the pendant of the Makefile file for Make. This one should be copied in the base dir of u++ (for example in $HOME/upp, containing uppsrc, reference, tutorial etc.).
You will also need waf. DO NOT INSTALL IT ON YOUR SYSTEM! The preferred way is to copy the waf script (a 80kB file) in the same place as your project root. In our case, copy it in $HOME/upp (or corresponding location). You can grab it here: http://waf.googlecode.com/files/waf-1.6.0
Once it's downloaded, here are the instructions:
$ cd $HOME/upp
$ mv waf-1.6.0 waf
$ chmod a+x waf
$ ./waf configure
$ ./waf build
And if everything goes right, you'll get a build directory with Gui01, Gui05 and Gui19 apps compiled in (the equivalent of) release mode.
That's just a start, lots of things to do, but I wanted to make it public so that you can react. I don't have much time to involve to it so it may be a desperate attempt, but anyway...
UPDATE: In order for CtrlLib to compile, since I use a glob to get all cpp files in the directory, you must delete manually the file uppsrc/CtrlLib/SSettings.cpp which should not be here. It is a duplicate of the used one in Draw, and I believe it should be removed from the svn repository.
Enjoy.
Lionel
-
Attachment: wscript
(Size: 6.39KB, Downloaded 425 times)
[Updated on: Wed, 20 October 2010 17:22] Report message to a moderator
|
|
|
Re: The power of Waf [message #29443 is a reply to message #29441] |
Wed, 20 October 2010 18:49   |
|
Hi Lionel!
I am very happy to see my work is appreciated and even inspired you Also, I fully agree with the idea that U++ should be as stand-alone as possible. TheIDE is a great tool, but there are situations where some other IDE might be necessary or only build script is required. The more various systems we can support, the better.
I had a look into the script, but haven't tried it yet. Since waf is python based, it should be actually quite simple to write the parser for .upp files (definitely not "HARD" as you state in the notes ). If it was possible to write in make (and later rewritten into shell script), it must be a piece of cake in python I know some python and I'm also quite familiar with the internals of .upp files , so I can help you a bit.
The additional files (CtrlLib/SSetings.cpp etc.) won't be a problem once you have at least basic parser. And here "basic" can mean a single regexp in python Feel free to contact me if you need help/advice/psychologic support 
Best regards,
Honza
|
|
|
|
Re: The power of Waf [message #31014 is a reply to message #31012] |
Tue, 01 February 2011 10:39   |
|
Hi Lionel
The github page looks really good, especially the step by step manual seems to be really user friendly. Good work. I didn't test it yet, but definitely will 
Just one thing I noted in the wscript: "TaskGen.extension('init')(cxx_hook)" should be omitted because init files should be used only with BLITZ.
Honza
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 14:52:48 CEST 2025
Total time taken to generate the page: 0.01183 seconds
|