by slaymaker1907 · 4y ago · 0 comments
If Make had just a few more batteries included, it would be perfect. However, maybe adding those batteries would take away from its other qualities.
As a really crude example:
SHELL := python
.ONESHELL:
out.csv:
import csv
with open("$@", "w") as f:
writer = csv.writer(f)
writer.writerow(["header1", "header2"])
and so: $ make
import csv
with open("out.csv", "w") as f:
writer = csv.writer(f)
writer.writerow(["header1", "header2"])
$ cat out.csv
header1,header2
I get that this doesn't exactly solve your "cross-platform work" gripe, but my point is that a lot of what people perceive as make providing isn't actually make in the first place.Worth noting, each recipe can have its very own SHELL[0] (e.g., ruby recipe, that uses ruby command with -e flag):
ruby: .SHELLFLAGS := -e
ruby: SHELL := ruby
ruby:
greeting = "labas"
puts "#{greeting}, ruby!"
[0]: http://agdr.org/2020/05/14/Polyglot-Makefiles.htmlI've been running very complex build systems via https://github.com/ysoftwareab/yplatform (disclaimer: author here) since 2016 on Linux, Mac and Windows without a problem.