Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because Make sucks? Because it's really limited and not expressive? Because it's not really a build system (nor is it a package manager or a dependency resolver or...)
 help



> Because it's really limited and not expressive?

It's neither of those unless you limit yourself to a lowest-common-denominator feature set. GNU Make, for example, is a Turing-complete, dynamic programming language and a CLI task runner. You can build a build system in GNU Make (https://github.com/omercsp/simple-build-system) just like you can do so in any other language.

Make suffers from unfamiliar and somewhat unorthodox syntax, and inconsistent language design. So it's not a good language, and saying it "sucks" is not completely unjustified, but not because it's limited. Looking at SBS, it also seems quite expressive, although I can't say I ever tried building something in it myself.


The OCaml ecosystem tried the Make route, it was complex, turns out no one likes maintaining makefiles by hand, and they like opaque make rules even less. Like it or not, dune exists for a very good reason.

Make works fine with OCaml. There's a handful of rules you copy and paste around which is not ideal, but that's much easier to deal with than dune.

Can you link a Makefile for an OCaml project, which ensures reproducibility and locality? What I mean is checking checksums of dependencies upon when they are installed, and acting only in the project directory, not changing the surrounding system in order to run the program. Asking, because I tried and failed.

ocamldep will set up the dependencies correctly. For examples, have a look at the multiple Makefile.am files in libguestfs, guestfs-tools & virt-v2v projects. All run as non-root so they don't change anything about "the system" assuming that's what you meant. (On mobile at the moment so can't link easily.)

I'd rather not have to maintain lists of source files to compile by hand; dune eliminates this drudge work.

In Make you can’t even have recipe-local variables with scope spanning more than a single shell command. At that point I prefer to write a Bash script where at least variables work.

> Make suffers from unfamiliar and somewhat unorthodox syntax, and inconsistent language design

You just answered the question "why does every language need to re invent packaging, building, etc." Because people don't want to build build systems in Make




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: