| This is in fact another misconception: > and familiar at the same time (it's bash) Make is an orchestrator that defaults to sh (not bash, actually). But what I've seen in some really good ones is taking advantage of the "orchestrator" part rather than the "sh/bash" part: One-line recipes that simply call a short script in any other language, including python, that do the desired thing for that recipe. The Makefile is then just used for coordinating partial-running those scripts. On top of that, you could in fact set SHELL/ONESHELL and then the recipes themselves are python inside the Makefile: SHELL := python
.ONESHELL:
testfile:
import csv
writer = csv.writer(open("$@", 'w'))
writer.writerow(['one', 'two'])
writer.writerow(['three', 'four'])
And: $ make testfile
import csv
writer = csv.writer(open("testfile", 'w'))
writer.writerow(['one', 'two'])
writer.writerow(['three', 'four'])
$ cat testfile
one,two
three,four
|
"Build tools are only for building software" is probably another falsehood to add, make can be a great tool anywhere you've got a dependency graph.