5 ms·
The `./make` shell script kills me. Why not just use Make?
by dblotsky 6y ago
The `./make` shell script kills me. Why not just use Make?
- smichel17 6y agoAnd as an added bonus, Make gives you tab autocompletion
- slmjkdbtl 6y ago(not strong arguments but some possible explanations) 1) ./make can be more portable e.g. you might use some GNU Make syntax that does not run on BSD and have to insall gmake just to run that 2) Make is not designed to be a command runner and have to manually add .PHONY to everything 3) case looks minimal and flexible enough (although I'm sure sh's confusing syntax can cause a lot of pain for non sh experts like esac wtf)
- dblotsky 6y agoThose all sound plausible! But... 1) I suspect GNU Make will be installed on any system where node code will run. 2) You don’t have to .PHONY anything that will never be a real file. 3) My bet is the Makefile will be shorter and clearer, but I am of course biased since I’m used to the syntax.
- efortis 6y agoI'm working on the Makefile, but I'm stuck with the `time ./make-production.js` task. `$ which time time: shell reserved word`
- gregwebs 6y agoMake is designed to track build dependencies, not to execute programs, so I think the problem is the choice of name. "just" is a utility designed to execute programs: https://github.com/casey/just#just https://github.com/casey/just#just