4 ms·
The Manual[0] contains an intro that isn't particularly compelling. It contains things like: phony "clean" $ do putNormal "Cleaning files in _build
by Tobani 12y ago
The Manual[0] contains an intro that isn't particularly compelling. It contains things like:
phony "clean" $ do
putNormal "Cleaning files in _build"
removeFilesAfter "_build" ["//*"]
Which would be the make equivalent:
clean:
rm _build/*
Now that's obviously the trivial example. But its not trivial to drop make entirely for something entirely different. A make solution can slowly get more complicated over time. It looks like shake might be useful for something really big. I can't quite tell where the investment of learning a new tool and re-develop something(that works well enough) would pay off.
0: https://github.com/ndmitchell/shake/blob/master/docs/Manual.md#readme https://github.com/ndmitchell/shake/blob/master/docs/Manual....
- mitchty 12y agoSo as someone thats recently been getting into Haskell I can say this, that example while sure its rather much more verbose for the simple case, the more complex stuff is where it starts to shine more. That and without knowing haskell a little a lot of that will look like needless chatter. But like rake once you realize the dsl is just Haskell it starts to fall into place more.
- Tobani 12y agoWhich is fine if you're using Haskell. I'm not sure I see the case for something like this if you're not using Haskell. Adding another package management system (cabal) into the mix seems like a lot of work. Of course I don't think language-agnostic build systems in general make a whole lot of sense unless you have a huge enough project to have a team dedicated to the build system.
- slavik81 12y agoYes, but that 'make clean' will stop working if there happens to be a file named 'clean' in the directory. You need to mark clean as a .PHONY target. Make is complicated. By the time you get all *.c files to rebuild based upon a change to any header they include, your makefile is going to look like a magic spell. And it only gets worse from there if you're doing any code generation. Make is concise, but it's weird and painful. I've not actually tried shake, but it looks a lot less magical. I'm willing to type a little more if it means I can actually understand it when I look at it again tomorrow. Or, that my coworkers can understand me today. Though, on an open-source project I'd probably use CMake just for ubiquity. It has the added bonus of being able to spit out either makefiles or ninja build files (which can be used by shake).