News for hackers. Stuff that matters.
Re:Why Use Make? (2013) by roeme on Saturday March 29, 2014 @12:52PM (#7492864)
I don't quite see the benefit of using make for arbitrary workflows (opposed to building software) over using plain old shell scripts.

But it sure isn't that much more complex nor requires a lot more of your system, so I'd say it's more a matter of preference.

Re:Why Use Make? (2013) by sheetjs on Saturday March 29, 2014 @12:57PM (#7492885)
Make has more natural built-in dependency management.

To write your workflow purely in shell scripts, you will invariably use lots of tests.

Also note that they are not necessarily mutually exclusive. You can write Makefiles that call shell scripts (and shell scripts that call make)

Re:Why Use Make? (2013) by epistasis on Saturday March 29, 2014 @01:48PM (#7493102)
I use a ton of inline shell in make for data munging. I often put

SHELL=/bin/bash

at the top of the Makefile when I use bashisms to construct complex pipelines.

And once, in a fit of mad genius, I made a particularly complex and useful Makefile executable by putting #!/usr/bin/make -f at the top. (It was a bad idea, obviously, and I won't be doing that again.)

For large file based datasets, the shell is just a REPL.

Re:Why Use Make? (2013) by to3m on Saturday March 29, 2014 @03:42PM (#7493624)
I've found these things to make Make useful for shell scripting:

- straightforward and obvious support for multiple named entry points

- by default, process terminates when a command returns a non-0 exit code

- often-adequate (though still crappy, especially for paths with spaces) set of built-in string processing functions

- scripts often somewhat portable between Unix-style shells and Windows

(I suppose there may be Unix-style shells available for Windows, but I've never found a low-dependency one that actually works. So combined with the first three advantages I've stuck with make.)

I've actually found Make much better as a shell script replacement than it is for its stated purpose of building software :)

Re:Why Use Make? (2013) by apw on Sunday March 30, 2014 @12:18PM (#7496628)
If you can express your workflow as a set of dependencies (granted, not all workflows are easily expressed this way), make gives you parallel and incremental computation "for free".

Imagine that you needed to download a tar archive, unpack it, then run several simulations followed by regressions followed by figure plotting on the data. You could write a shell script to do this, but it would be hard to make the shell script simulate the capabilities of `make -j', and you'd have to do a lot of timestamping and file existence checking to simulate the incremental computation capabilities of make.

Re:Why Use Make? (2013) by gyepi on Saturday March 29, 2014 @03:55PM (#7493673)
The advantage of make, or any other decent build tool, is the dependency management; what depends on what, what's changed, what needs to be (re)built, what order to do all this. In the absence of all that, everything gets rebuilt all the time. Not a big deal for small projects but an absolute killer as projects get larger.
Re:Why Use Make? (2013) by camus2 on Saturday March 29, 2014 @01:05PM (#7492924)
how to you track directory and file changes with shell scripts?
Re:Why Use Make? (2013) by sparkie on Sunday March 30, 2014 @10:45AM (#7496263)
Use inotifywait