2010/1/9 Joshua L. Blocher <verbalshadow@...400...>:
- No need to list every source file in scripts, since one can use
globbing.* 2. Build scripts are written in Python and can use the full power of a general programming language. This is immensely important once you start to do non-standard things during the build.
Globbing while easy is not the correct way to do IMO. Globbing means the that build system has no way of knowing if new files have appeared unless you rerun the build system again. Unless waf has some magic I'm not aware of. Their more be more issues with recursive make but I haven't done a lot of looking.
Waf has zero issues with recursive scripts (because the compilation is run after all user scripts complete) and zero issues with globbing. If I make a new file, Waf detects it, compiles the new file and relinks the executable, without any need to modify wscripts. That's because the dependency tracking is done at a different level than Make, I can't explain it in detail now, but it obviously works.
- It is easy to include generated .cpp code as the source of an
executable or library (once you figure out the correct way - the docs are useless).
Bad Documents that sounds like one of the reasons you want not use cmake. Cmake documention is ok and has a larger community of people to help.
The reason I don't want to use CMake is that its syntax is weak and it's verbose when doing anything complicated. For example the "if" construct is annoyingly weak. In Python I can just write: sources += ['file1.cpp', 'file2.cpp'], while in CMake I would have to write, if I remember correctly, SET(sources ${sources} file1.cpp file2.cpp). Complicated build systems are most efficiently expressed in general purpose programming languages.
The docs situation in Waf can be improved by adding Epydoc comments to the source. The API itself is sound, except a few quirks that can be fixed locally
- Everything created by the build system is kept in the "build"
directory (the name can be changed), so distclean is as simple as deleting "build".
This can be done in autotools and cmake. Not as common in autotool builds but it works even with inkscape's current scripts (last time in checked). Out of source builds on the other hand is cmake's bread and butter.
Autotools can't do this because it leaves droppings in the main source dir (e.g. config.guess and aclocal.m4), and Automake creates .in files in the source tree. Didn't check how CMake behaves.
Regards, Krzysztof