Hacker News new | past | comments | ask | show | jobs | submit login

I’m always glad to see Make being used. It’s such a powerful and simple tool that usually does the job just as well as more “bespoke” CLI’s for various frameworks and languages



I rather just write a bash script. It's the lowest common denominator. Make may not be installed by default in many places and it has some weird syntax quirks that make it annoying to use IMO.

Here's an example of how I like to do my "bash scripts that sorta work like make": https://github.com/francislavoie/laravel-websockets-example/... basically each function is a "command", so I do like "./utils start" or whatever.


I like this style as well, we keep all our scripts in a ./bin directory, e.g. ./bin/lint.sh, ./bin/test.sh, etc. just as discoverable as make commands (run ls ./bin) and much easier to maintain.

If you really want make, you can also just call out to your bash scripts from make:

    test:
        ./bin/test.sh
    lint:
        ./bin/lint.sh
    ...


Please don't write a bash script.


Please elaborate. This is a useless comment without more information.


I would strongly discourage using make on new projects, make syntax is full of footguns and quirks (not being able to pass multiple args to subcommands is an easy example).

Bash, Python, or even Typescript are much easier, safer, and more widely standardized environments to maintain and grow your scripts once you get past a few lines.


It's programming language that distinguishes between spaces and tabs in a way that changes behavior. It's also the only PL that I know of that's outright incompatible with expand-all-tabs-to-spaces editing policy, which is what the vast majority of coders use in practice.

If you want to see a powerful and actually simple tool that does the job, take a look at DJB redo: https://redo.readthedocs.io/en/latest/


I like the idea of Make, but it's far too hacky. Even using it for a static blog site (turning foo.md -> foo.html, which is pretty close to the usual foo.c -> foo.o examples) ended up with recursive invocations, rule-creation macros, double-escaped sigils, eval, etc.

There are a bunch of lightweight alternatives to Make out there (I hear Ninja is pretty good). My personal preference is Nix these days (although that's quite heavyweight).


The biggest problem with make appears to be that people refuse to spend a little time learning how it works, and instead charge off to reimplement it, poorly, instead.




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

Search: