digego/extempore — pull request #163 by giorashh (2014-12-19 02:57:33+00:00)
Title: Build better with scons

a-bit-early-and-not-precisely what was on @benswift 's christmas list.

This is a serious stab at a fancier build system for extempore, based on the [scons](http://www.scons.org/) build tool, which uses Python as its config language. The provided build script:

- Provides help via 'scons help', specifically a list of valid targets.
- Checks EXT_LLVM_DIR or known homebrew locations for llvm.
- Checks llvm version.
- Checks that patches have been applied to 3d party libs (llvm).
- (Should) Support multiple platforms (Linux, OSX, Windows?).
- Compiles (and cleans) extempore binary.
- Compiles (and cleans) stdlib/stdlib-core/stdlib-external.
- Allows compilation of selected stdlib files. See 'scons help'
- Extracts dependency information from stdlib components (no parsing, just a grep/python hack).
- Supports parallel builds (!) of stdlib according to dependencies (with -j ).
- Caches all build artifacts (stdlib included).
- Supports command line flags (see --help for list, 'scons help' for example)

Choosing a build tool is invariably a contentious issue. All I can say is my experience with scons has been nothing but positive and the documentation has been top notch as well. I've looked at waf and CMake as well.

Tested on Fedora 21 and expect it to work out of the box on ubuntu. OSX should either work
or be relatively painless to get working.
Windows building should be possible, at least by converting the .bat files into scons' `env.Command`, but I haven't done it.

If you still want to hold out for CMake, I understand. This is a level-up on what the build system should be able to do.