6 ms·
It's interesting, but I can't help but think that by the time you're adding `.PHONY` after most rules, you're not using the right tool for the job. (I generall
by shadowgovt 4y ago
It's interesting, but I can't help but think that by the time you're adding `.PHONY` after most rules, you're not using the right tool for the job.
(I generally find a small set of shell scripts work, or just three or four rules in the package.json file I can access with `npm run`).
- randomdata 4y agoI generally find shell/npm scripts work until you get to the few cases that actually benefit from the dependency management and then you wish you'd just given in to .PHONY, no matter how inelegant it may be.
- shadowgovt 4y agoAll of my dependency management issues are handled by npm. The main problem `make` solved was not wasting work rebuilding dependencies that hadn't changed, but in 2023 on modern computers I don't notice the CPU cycles burned on that kind of thing. (... if I do start to notice them, I reach for a tool like bazel, because it can handle spaces in filenames).
- deleted 4y ago[deleted]
- xyzzy_plugh 4y agoI think .PHONY is mostly fine, but as soon as you have any sort of runtime arguments or interactive stdin/stdout you are definitely using the wrong tool.
- klodolph 4y agoI think the reason for the .PHONY is just so people don't have to ./ I generally reach for a shell script with "case" instead, though. Can always invoke make from the shell script.
- hk1337 4y agohttps://c.tenor.com/2hLnLe93160AAAAd/family-guy-youre-a-big-fat-phony.gif https://c.tenor.com/2hLnLe93160AAAAd/family-guy-youre-a-big-...
- akira2501 4y agoIn our case we have most of the processes that are run by make tee their output into a project log directory. Then the make rules can use the log file itself as the dependency for the target. Works great in a lot of cases, and, you get the added benefit of being able to easily go back and observe previous process output and compare it across projects.
- nucleardog 4y agoOh wow, I can’t believe I’ve never thought of that. Simple and useful and a bit more elegant than having a phone output file that I manually `touch`.
- nine_k 4y agoThe [Just] task runner can be what you want: it's simpler than Make, with less magic, but it allows to declare task dependencies. [Just]: https://github.com/casey/just https://github.com/casey/just