|
WafAndOtherBuildSystems
some points of comparison against other build systems
I. Overview of the main build system families1. The Make modelFrom historical reasons mostly, the make-like tools have gained mainstream diffusion. The idea of these tools was to provide a minimal language in which dependencies between files are expressed, and a minimum scheduler using these dependencies for launching compilation commands. This design is wrong for at least two reasons:
2. Extending Make means creating tool chainsThe main concepts for extending software, such as: function overloading, inheritance, composition do not exist in such simple languages. Since the language fixes were too difficult to implement (the space/tab problem still exists in gmake), the mainstream solution was the development of makefile generators, or tools that generate code that make can read. But the makefile generators in their turn were not created with portability or configuration in mind, and other tools were created to generate code for these code generators. The best known tool chain is the assembly of Autoconf,Automake,Libtool,Make. In this case each tool in the toolchain generates code using macro languages (m4) which makes the system difficult to debug and to maintain. More recently the same mistake was made in QMake with a new programming language. In CMake the developers have at least tried to include the configuration system, yet users still need to create wrappers for it (kde unsercmake, etc). In OMake the developers have even included a shell. For launching commands in parallel or for caching the compilation results, tool chains abstracting make from the files system have had to be written too (distcc, ccache). 3. The Ant familyAnt-like tools contain XML-based configuration scripts, and extensions written in Java, therefore reusing the power of the Java libraries. They were written in the hope that machines could create new production rules, and that people could control the compiler tool chains right from their favorite IDEs (Eclipse..). This is not satisfactory for at least three important reasons:
If JSON were used, things would not have been much different, although extensions could have been written in Javascript. 4. On native build systemsNative build systems such as Scons and Waf use the Python programming language to allow library code reuse and extensible APIs. The dynamic typing nature of Python makes it easy to write new rules, however bugs might hide and not pop up until much later. Note: Another new native build system in the context of Java applications has popped up (Grails). 5. Domain specific programming languages - bad ideaDesigning a language is easy, but designing a language that can be extended is extremely difficult. A build system is a tool, not a language. We have seen the same mistake countless times: for example in the field of constraint programming, tons of domain-specific languages have been written, yet the most successful tools use existing languages or languages very similar to existing ones choco:java, facile:ocaml, etc. Creating a custom programming language in the hope it will make the system more flexible is chasing two different animals at the same time. In the context of build systems, there are at least 3 concepts to keep in mind:
II. Waf vs SconsSimilarities:
Differences:
|
Sign in to add a comment