Ticket #328 (closed enhancement: fixed)
Improving our build scripts
| Reported by: | Sleek | Owned by: | prock |
|---|---|---|---|
| Priority: | high | Milestone: | 0.3.0 |
| Component: | tools/build | Version: | trunk |
| Severity: | normal | Keywords: | scons |
| Cc: | Time planned: | ||
| Time spent: | Time remaining: |
Description
After reading the Scons manual, I've learnt that we are not using Scons the way it's supposed to be. For example, instead of using targets to define what will get build, we are defining options. It really should've been
scons swig_wrapper tests
rather than
scons tests=1 noengine=1
Also, Scons puts forward the concept of target, source and dependencies for our perusal, but ext/SConscript totally dismissed this. I'm not pointing to anyone but let's fix this.
Here is a proposal for a rewrite of SConstruct and SConscripts:
1) Target: FIFE Library, '_fife.pyd' , options: debug=1/0, profile=1/0, opengl=1/0, zip=1/0, log=1/0 . obj1 = Object( 'engine_object' , engine/core/*.cpp) obj2 = Object( 'swigwrap_object' , engine/swigwrappers/python/*.cxx) SharedLibrary( '_fife,pyd', [ obj1 , obj2 ] ) Depends on (3), (2). 2) Target: ext / dependents. use automake/autoconfig or make our Sconscript for each library. Depends on none ( depends on each target libraries if we write our own build script). 3) Target: fife.i, fife.py, fife_wrapper.cxx, fife_wrapper.h or when we separate each FIFE module into their own library: fife/*.py, fife/*.cxx, fife/*.h , options: no option. debug always off. env.SwigWrapper( 'engine/swigwrapper/python/fife' , interface_files ) Depends on *.i ( interface_files) . 4) Target: tests. option: debug=1/0. depends on (1). env.Program( 'test_xxx' , 'test_xxx.cpp' ) Depends on (1) 5) Target: project files. Depends on (3) 6) Target: build_utils Dependents: unknown 7) build gen_docs Dependents: none 8) Target: build_all,
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
