3 ms·
The only bad part about Make is that it doesn't provide even the most basic utilities for doing cross platform work like removing a directory. It mostly works w
by slaymaker1907 5y ago
The only bad part about Make is that it doesn't provide even the most basic utilities for doing cross platform work like removing a directory. It mostly works with Unix, but writing a Makefile that works on Windows and Unix is really hard.
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.
- andreineculau 5y agoNowadays there's Windows Subsystem for Linux. There's no excuse not to successfully run "Linux" scripts on Windows. I've been running very complex build systems via https://github.com/ysoftwareab/yplatform https://github.com/ysoftwareab/yplatform (disclaimer: author here) since 2016 on Linux, Mac and Windows without a problem.
- metaltyphoon 5y agoThat’s why you always provide an nmake for the project :)
- Izkata 5y agoMake is a file-based dependency tree that only defaults to a specific shell. If you really want to go crazy, you could actually change it to anything that can be invoked with "<executable> <file>", such as python, and use that language instead. 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.
- pqb 5y agoThank you for reminding me it! Awesome finding. 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.html http://agdr.org/2020/05/14/Polyglot-Makefiles.html
- Izkata 5y agoNice, being able to mix them is new to me. I thought SHELL could only be set once.
- mekster 5y agoDo we not have modern alternatives for make?