News for hackers. Stuff that matters.
Re:Using Makefile(s) for Go by wnoise on Tuesday December 10, 2019 @11:36AM (#21753997)
Put "$@" at the bottom of the file. Then type ./filename function.

You can extend that to a fancier function dispatcher, argument checker, etc, if you want.

Re:Using Makefile(s) for Go by TheDong on Tuesday December 10, 2019 @11:46AM (#21754103)
Well technically simple to do, that misses the point.

That is neither ubiquitous, nor (as a result), trivial for a newcomer to understand.

If I clone a repo and see a makefile, I know what to do.

If I clone a repo and see './hack.sh' or './runme' or './do' or whatever you chose to call it, I have no clue whether I should invoke it or not.

There are few alternatives to make that have the same level of mindshare, and thus the same ease of use for a given newcomer to grok what to do.

Most alternatives are language specific (e.g. "rake" in rails did a good job of building programmer expectations that you use 'rake ...' to do various common tasks).

Re:Using Makefile(s) for Go by aidenn0 on Tuesday December 10, 2019 @11:48AM (#21754136)
If you name it "configure" then most people will run it; you can put the instructions there.