News for hackers. Stuff that matters.
Re:The Makefile I use with JavaScript projects by markbnj on Wednesday February 28, 2018 @12:23PM (#16484701)
> If only whoever authored Make 40 years ago

Make was created by Stuart Feldman at Bell Labs in 1976. The fact that it is still in use in any form and still being discussed here is a testament to what an amazingly good job he did at the time. Whether it is the right tool for any given modern use case is up to the people who decide to use it or pass it by. I still work with almost daily, and it's in wide use by backend system engineers if my experience is any guide. Yes, it's quite clunky but also quite powerful and reliable at the few things it does. Its also pretty much guaranteed to already be installed and working on every nix system, and that's not nothing.

Re:The Makefile I use with JavaScript projects by nthompson on Wednesday February 28, 2018 @12:56PM (#16485032)
Look at the git makefile: https://github.com/git/git/blob/master/Makefile

You know what you have to do to build git? Type make. It's amazing.

Re:The Makefile I use with JavaScript projects by kowdermeister on Wednesday February 28, 2018 @01:16PM (#16485243)
If fixing things in this makefile is not your job, then it really is amazing.
Re:The Makefile I use with JavaScript projects by markbnj on Wednesday February 28, 2018 @01:41PM (#16485473)
Honestly its like any other tool we use: once you know the rules governing its behavior it really isn't that hard to debug issues. Make is very consistent in most cases. There are plenty of traps, and they're made easier to fall into given the archaic syntax, but you don't typically have to fall into them over and over again :).
Re:The Makefile I use with JavaScript projects by IshKebab on Wednesday February 28, 2018 @05:25PM (#16487720)
Yes but some tools have... shall we say, irregular rules. Tell me how CMake's argument quoting works for example.
Re:The Makefile I use with JavaScript projects by isaachier on Thursday March 01, 2018 @12:47AM (#16489958)
Actually, you might want to glance at the first few hundred lines of platform specific stuff you are supposed to set manually before the main makefile begins. Literally meant to be set by hand, but the Git developers made educated guesses about the specifics of each platform.
Re:The Makefile I use with JavaScript projects by oblio on Wednesday February 28, 2018 @04:53PM (#16487431)
> The fact that it is still in use in any form and still being discussed here is a testament to what an amazingly good job he did at the time.

Not necessarily.

> It’s also pretty much guaranteed to already be installed and working on every nix system, and that's not nothing.

First mover advantage.

The fact that no modern language, basically nothing outside of C/C++ uses it, says a lot. And even those are moving away, see Cmake & co.

Re:The Makefile I use with JavaScript projects by deckard1 on Wednesday February 28, 2018 @06:26PM (#16488240)
> basically nothing outside of C/C++ uses it

That's how it has always been, though. In the '90s you didn't need to run Perl or Tcl through it because you weren't compiling anything. The Venn diagram of "Platforms that have make" and "Popular compiled languages" comes up with only asm/C/C++.

Many languages want to do things their way, such as Erlang, Common Lisp, Java, etc. Ruby and Python are interpreted and also don't need a build process. JS, until recently, was interpreted. Lots of NIH going around.

> And even those are moving away, see Cmake & co.

Cmake is closer to autoconf/automake/libtool. If you have serious cross-platform needs, then Cmake is a fine tool. But it's hardly less archaic than make (and only slightly less so than autoconf) and I'm dubious that too many people are really moving away rather than just picking up the newer, shiny tool for newer projects.

If I were doing a small static website or something that required a build with standard *ix tools, vanilla make would be my tool of choice, hands down. Tools like autoconf and, as the author pointed out, webpack provide a more specialized need.

Re:The Makefile I use with JavaScript projects by oblio on Thursday March 01, 2018 @03:58AM (#16490566)
> That's how it has always been, though. In the '90s you didn't need to run Perl or Tcl through it because you weren't compiling anything. The Venn diagram of "Platforms that have make" and "Popular compiled languages" comes up with only asm/C/C++.

Pascal/Delphi were wildly popular in the late 80's, early 90's, though. I don't remember it being built with make, though.