15 ms·
Doesn't work for me: $ make -v | head -n1 GNU Make 4.3 $ printf 'SHELL := /bin/false\nall:\n\tls\n' > Makefile $ make ls make: *** [Makefile:3: a
by jwilk 4y ago
Doesn't work for me:
$ make -v | head -n1
GNU Make 4.3
$ printf 'SHELL := /bin/false\nall:\n\tls\n' > Makefile
$ make
ls
make: *** [Makefile:3: all] Error 1
- jart 4y agoI completely forgot that the GNU Make source code has a check to see if the shell is bourne-compatible (it just strcmp's with sh, bash, and a hard coded list), and then only applies that optimization if it is. I deleted that code in my Landlock Make fork so I could use shells like /bin/false and still get the optimization. So sorry about that! Give it a try with Landlock Make https://github.com/jart/landlock-make https://github.com/jart/landlock-make and https://justine.lol/make/ https://justine.lol/make/