News for hackers. Stuff that matters.
Re:The Makefile I use with JavaScript projects by simias on Wednesday February 28, 2018 @12:28PM (#16484747)
I've been writing Makefiles regularly for maybe 15 years and I always end up on this page every time I need to write a new one: https://www.gnu.org/software/make/manual/html_node/Automatic...

$< $> $* $^ ... Not particularly explicit. You also have the very useful substitution rules, like $(SRC:.c=.o) which are probably more arcane than they ought to be. You can make similar complaints about POSIX shell syntax but at least the shell has the excuse of being used interactively so it makes sense to save on the typing I suppose.

That's my major qualm with it however, the rest of the syntax is mostly straightforward in my opinion, at least for basic Makefiles.

Re:The Makefile I use with JavaScript projects by cat199 on Wednesday February 28, 2018 @12:38PM (#16484852)
give pmake a shot sometime.. the syntax/semantics are much more 'shell-like' imho and some things are just much more possible.. (e.g. looping rather than recursive calls to function definitions)

manual: ('make' on a bsd is PMake)

https://www.freebsd.org/cgi/man.cgi?query=make&apropos=0&sek...

but most linux flavors have a package somewhere..

Re:The Makefile I use with JavaScript projects by majewsky on Wednesday February 28, 2018 @01:21PM (#16485278)
> $(SRC:.c=.o)

I use

  $(patsubst %.c,%.o,$(SRC))
instead, which I find easier to remember.
Re:The Makefile I use with JavaScript projects by simias on Wednesday February 28, 2018 @01:42PM (#16485484)
Isn't that a GNU extension? Here's an other problem right there, figure out which dialect of Make you're using and their various quirks and extensions.
Re:The Makefile I use with JavaScript projects by wbkang on Wednesday February 28, 2018 @04:59PM (#16487492)
I think you can compile gmake for most platforms.