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.
$< $> $* $^ ... 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.