what is wrong with make why does every language need to re invent packaging, building, etc. I think these people have no useful software to write so they rewrite the development stack.
I tried to write some Ocaml stuff using a Makefile, because I also didn't want to use even more specific tooling, but it became ugly quickly, because I had to use `ocamlfind` and `ocamlc`, and provide a list of all packages to include and so on. It felt a bit like writing C at that moment, where you need to tell gcc what system libraries you are using, so that it compiles the program with those.
So in the end I tried using dune and opam and whatnot, but it all felt less than clear to me. Especially, the comment someone else made here about having 2 different types of files for dune to work ...
I just want a project local directory, that contains all my dependencies and a lock file to reproducibly built my projects. That's the minimum I expect these days. Or some equivalent alternative.
I use GNU Make for my Python and GNU Guile projects just fine. For Python projects it becomes a job runner of tooling commands. For Guile projects it uses a SHELL that is a guix shell, which references channels and manifest, to ensure reproducibility.
When I started learning make it wouldn't work and I wouldn't understand why so
I dug into it and now I understand how it works and I can make it work but seasonned programmers still tell me my makefiles are wrong and then proceed to use even more arcade parts that render their makefiles incomprehensible.
At some point I just gave up makefiles for anything non-trivial and went over to xmake where life is mostly simple and I never do it wrong.
I use Dune only for my local libraries, because the install step fits perfectly. But my app projects all use a Makefile, including apps with a table-driven parser (Menhir), where the OCaml `.ml` source has to be generated first. You have to know `make` well enough to do that, but it's definitely possible.
what’s wrong with make is largely that people are bad at writing makefiles. A tool like dune is able to enable cross compilation of a massive number of libraries out of the box, but make based projects that weren’t designed with it in mind almost always require someone to go through and separate out the mess of what needs to run on the host vs be built for the target, etc, etc
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...)
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.
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.)
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