3 ms·
Makefile is “make file“. It has been abused into being a task runner. The wrong tool for the job. The “make file” is all about file dependencies based on last
by jbverschoor 1y ago
Makefile is “make file“. It has been abused into being a task runner. The wrong tool for the job.
The “make file” is all about file dependencies based on last modified date. Outdated target files can be rebuilt using source file. It’s is dependency management and the essence of an incremental compiler, but all revolving around files, not tasks.
- tgv 1y agoThe nice thing about make is that is ubiquitous, and that it offers nice things out of the box.
- jbverschoor 1y agoThis is so unfortunate about these ubiquitous tools. At a certain point we seem to have stopped adding tools to POSIX. Does anyone know why exactly?
- wahern 1y agoTo be added to POSIX usually requires common existing availability of a feature, if not literally at least substantially similar and not too difficult to add a POSIX-compliant mode. Fortunately this has become easier to achieve now that most of the more esoteric Unix-like systems have died off. POSIX-2024 added at least three new utilities: readlink, realpath, and timeout.[1] (It also added the gettext localization framework, which includes new C APIs and a few additional shell utilities.) Many utilities gained new flags and features, including Make. For example, POSIX Make now supports "!=" variable assignment for capturing shell command invocations, as well as guaranteed computed macro name evaluation (i.e. `$($(FOO).$(BAR))`). The latter actual gives a standards compliant way to implement conditionals, and interestingly had already been supported on all common Make implementations for a very long time. These days anybody can meaningfully participate in POSIX. You can get started by checking out https://austingroupbugs.net/ https://austingroupbugs.net/, where both errata and suggestions for new features can be added. There's also a mailing-list you can join, though most of the discourse happens in the ticket tracker. But please don't spam new feature requests, a la GitHub drive-bys. Spend a good amount of time understanding the specification and existing review processes, e.g. by reading alot of ticket discussions. [1] See https://sortix.org/blog/posix-2024/ https://sortix.org/blog/posix-2024/
- dima55 1y agoRight. It kinda sucks for that purpose too, which gives Make a bad name.
- kristopolous 1y agoWhat gives make a bad name is the same thing that gave javascript or m4 a bad name - these things are their own exotic birds - doing them well require new concepts and new behaviors. You can indeed shoehorn them into what you know but really you need to fully embrace their weird world. See also forth, dc, awk, jq ... It'd be nice to have a dedicated crash course on these things for people who understand conventional programming and have been doing the normal stuff for a number of years. Also see supercollider, prolog, haskell, apl... I think the most mainstream exotic bird people learn is Lisp. Doing all these things well is as different as Lisp is from say conventional python.
- anthk 1y agoForth it's far easier than dc. On Lisp, exotic? it's damn easy. Haskell it's far worse.
- eddythompson80 1y agoI’m confused. Are you saying that python is less exotic than javascript, jq, awk, m4, haskell, lisp, dc, prolog, apl, and supercollider therefore it’s bad, but the least bad out of these?
- jonhohle 1y agoIt may suck for it, but it’s better than a collection of random scripts and commands baked into CI configuration that evolve to become unrunnable in normal dev environments.
- paulddraper 1y agoIt works fine for PHONY targets. But most people don’t realize in many cases they can do better than that.