I definitely don't remember the last machine I saw that didn't have bash on it.
I definitely don't remember the last machine I saw that didn't have bash on it.
If you're working in a team with other people, or are publishing things for a broader public to use… no. Especially since things like .ONESHELL don't just flat-out cause errors, but rather introduce subtle and insidious distinctions in behavior.
And a Make supergenius, should I ever meet one, surely will look at the top of the file or derive from "incorrect" code that something is nonstandard.
I'd love better tools that take the good parts of Make (around file transformations, mostly) and expose them more effectively in shells (because doing so in a more fully featured programming language often results in different and worse hacks--hi, Rake) but using Make to do things more people will find predictable seems fine to me.
Example:
.ONESHELL:
sometarget: someinput
␉BASEDIR=other_expression
␉SHELLVAR=complicated_expression
␉rm -rf $$BASEDIR/$$SHELLVAR
(obviously extreme to illustrate the point, but you get the idea.)(If you use any of these features — please rename your Makefile to GNUmakefile. Please. I beg you.)
I can only assume that's the last of the GPLv2 licensed ones. Classic Apple.