Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between SCons and Shake

I'm working on a Python/Haskell project and I'm looking for alternatives to Makefile. Obvious choices are Python SCons and Haskell Shake. Since I have no experience with either of them, I'd like to ask if there is any comparison of their drawbacks and advantages.

Update: The project has somewhat complex requirements for building:

  • Let the user configure the build - like options to enable/disable, paths to tools etc.
  • There are both Haskell and Python files generated at compile time. Their dependencies should work properly.
  • There are multiple Haskell programs that share most of the source files. I'd like so that:
    • it's possible to build each one individually, not building the sources that aren't needed;
    • source files aren't built multiple times when compiling multiple programs;
    • yet achieve parallelism during compilation, if possible.
  • Check for several installed programs on target systems and their paths (like python, flock etc.)
  • Check for dependencies on target systems, both Python, Haskell.
  • Parametrize the build according to the dependencies - if the dependencies for testing are missing, it should still be possible to build the project, skipping the tests (and informing the user about it).
like image 705
Petr Avatar asked Mar 04 '14 13:03

Petr


2 Answers

There is a Why Shake? document that gives reasons to chose Shake over other build systems, but it does not focus on a comparison to SCons.

Update: All of your requirements seem easy enough to express in Shake (ask on StackOverflow if you get stuck with any of them). As to Shake vs SCons:

  • Shake is particularly good at dealing with generated files with dependencies that cannot be statically predicted, particularly if you are generating the files from programs you compile.
  • Building the Haskell parts of your project is likely to be harder than building the Python (since Haskell has a richer structure and more complex compiler). Using Shake makes it easier to tap into existing examples of compiling Haskell and use libraries for parsing Haskell if you need it.
like image 86
Neil Mitchell Avatar answered Nov 20 '22 12:11

Neil Mitchell


There is a SCons wiki page that compares it to other build tools, unfortunately there is no comparison there with Haskell/Shake.

Also, this question may help.

SCons really shines as compared to other tools (especially make and cmake) by its Python syntax, and its implicit dependency system that is very accurate and easy to use.

like image 3
Brady Avatar answered Nov 20 '22 11:11

Brady