Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » The power of Waf
The power of Waf [message #29441] Wed, 20 October 2010 17:20 Go to next message
chickenk is currently offline  chickenk
Messages: 169
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 333 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 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Lionel!

I am very happy to see my work is appreciated and even inspired you Smile 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 Wink ). If it was possible to write in make (and later rewritten into shell script), it must be a piece of cake in python Wink I know some python and I'm also quite familiar with the internals of .upp files Wink , 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 Very Happy Feel free to contact me if you need help/advice/psychologic support Wink

Best regards,
Honza
Re: The power of Waf [message #31012 is a reply to message #29443] Tue, 01 February 2011 09:54 Go to previous messageGo to next message
chickenk is currently offline  chickenk
Messages: 169
Registered: May 2007
Location: Grenoble, France
Experienced Member
Hello!

That's a late reply but I've not had much time for this, though it's interesting stuff.

I finally created a github repo with the wscript and a few instructions: https://github.com/chickenkiller/upp-waf

Feel free to clone, fork, trash, and report issues in the github issue tracker.

Thanks to everyone who wants to try it out and give me feedback Smile

Lionel
Re: The power of Waf [message #31014 is a reply to message #31012] Tue, 01 February 2011 10:39 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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 Wink

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
Re: The power of Waf [message #31015 is a reply to message #31014] Tue, 01 February 2011 10:44 Go to previous message
chickenk is currently offline  chickenk
Messages: 169
Registered: May 2007
Location: Grenoble, France
Experienced Member
Thanks for looking, and for the remark about init files.

For later remarks, please try to use the issue tracker (https://github.com/chickenkiller/upp-waf/issues) so that it's easier for me to manage everything Smile

[Updated on: Tue, 01 February 2011 11:00]

Report message to a moderator

Previous Topic: Thoughts about resource management
Next Topic: U++ inspires other projects and languages
Goto Forum:
  


Current Time: Thu Mar 28 10:49:26 CET 2024

Total time taken to generate the page: 0.00884 seconds