I think the reason make is both so controversial and also long-lived is that despite how everyone thinks of it, it isn't really a build tool. It actually doesn't know anything at all about how to build C, C++, or any other kind of code. (I know this is obvious to those of us that know make, but I often get the impression that a lot of people think of make as gradle or maven for C, which it really isn't.) It's really…
> It actually doesn't know anything at all about how to build C, C++, or any other kind of code. I guess it depends on how you define "know", but there are implicit rules. $ cat foo.c #include int main() { printf("Hello\n"); return 0; } $ cat Makefile foo: foo.c $ make cc -O2 -pipe foo.c -o foo $ ./foo Hello
The Makefile I use with JavaScript projects
121–130 of 525 posts
Re: The Makefile I use with JavaScript projects
#122Re: The Makefile I use with JavaScript projects
#123Earlier quoted context omitted.
Simple makefiles couldn't be more simple. task: dependency list of commands That's about as easy as it gets.
Until a stray space finds its way into your command list indentation...
Re: The Makefile I use with JavaScript projects
#124Earlier quoted context omitted.
Wow if you consider Makefiles easy to read...
It's certainly better than the 200+ lines of JavaScript something like Webpack spits out when you statr a new project. I had to debug some of our project's build files and realized halfway through that my teammates didn't write this Webpack config monstrosity, Webpack generated it by /default/.
FWIW, Webpack 4 (which just went final a few days ago) now has "zero-config" defaults out of the box. You may want to give that a shot.
Re: The Makefile I use with JavaScript projects
#125Earlier quoted context omitted.
Meh: Compiler: collects sources from various places, assembles the result into machine code. Transpiler: collects sources from various places, converts the source to another language. Personally I cringe at the newspeak you seem to imply we should all be applying to our lives. These words mean things - quite different things, it turns out. There's a difference between human-readable source code language, and machine-…
> newspeak you seem to imply we should all be applying to our lives. http://foldoc.org/transpiler ^ no match. transpiler is the newspeak.
However, this is a fun game, so lets play:
http://www.yourdictionary.com/transpiler
https://en.wiktionary.org/wiki/transpiler
Re: The Makefile I use with JavaScript projects
#126I think the reason make is both so controversial and also long-lived is that despite how everyone thinks of it, it isn't really a build tool. It actually doesn't know anything at all about how to build C, C++, or any other kind of code. (I know this is obvious to those of us that know make, but I often get the impression that a lot of people think of make as gradle or maven for C, which it really isn't.) It's really…
> It actually doesn't know anything at all about how to build C, C++, or any other kind of code. I guess it depends on how you define "know", but there are implicit rules. $ cat foo.c #include int main() { printf("Hello\n"); return 0; } $ cat Makefile foo: foo.c $ make cc -O2 -pipe foo.c -o foo $ ./foo Hello
Re: The Makefile I use with JavaScript projects
#127Earlier quoted context omitted.
Meh: Compiler: collects sources from various places, assembles the result into machine code. Transpiler: collects sources from various places, converts the source to another language. Personally I cringe at the newspeak you seem to imply we should all be applying to our lives. These words mean things - quite different things, it turns out. There's a difference between human-readable source code language, and machine-…
> newspeak you seem to imply we should all be applying to our lives. http://foldoc.org/transpiler ^ no match. transpiler is the newspeak.
https://en.wikipedia.org/wiki/Cfront
http://www.softwarepreservation.org/projects/c_plus_plus/cfr...
ohey, noone calls it a 'transpiler'.
I'm not so angry about the word transpiler; perhaps it might improve things.. but to imply that using compiler as a common term for all things here is a regression/neologism is patently wrong - transpiler is the newcomer.
Re: The Makefile I use with JavaScript projects
#128Earlier quoted context omitted.
Because, like many other things in programming, you'll end up with a half-baked and buggy implementation of make anyways. Incremental builds by looking for changed dependencies, a configuration file with its own significant identifiers (i.e. a build DSL shoehorned into JSON or YAML), generalized target rules, shelling out commands, sub-project builds, dry runs, dependencies for your own script, parallelization, and a…
> Because, like many other things in programming, you'll end up with a half-baked and buggy implementation of make anyways. I'd argue that make is a half-baked and buggy implementation of make - so that's not really a drawback so much as the status quo. E.g. I have scripts that exist mainly to carefully select the "correct" version of make for a given project to deal with path normalization and bintools selection iss…
make was never intended to be a cross-platform tool. If you face problems using it on Windows, then that's on you.
Re: The Makefile I use with JavaScript projects
#129Earlier quoted context omitted.
> newspeak you seem to imply we should all be applying to our lives. http://foldoc.org/transpiler ^ no match. transpiler is the newspeak.
foldoc.org is the product of a single individuals' construction of definitions of computing terms and is by no means a complete and authoritative source of technical terms. It says so right there on the site... However, this is a fun game, so lets play: http://www.yourdictionary.com/transpiler https://en.wiktionary.org/wiki/transpiler https://www.thefreedictionary.com/transpiler https://www.quora.com/What-is-a-transp…
I doubt you'll find 'transpiler' at the origins of computing history; see also C++/cfront post
Re: The Makefile I use with JavaScript projects
#130A long time ago, in a developer's paradise called the 1970's there was an automated build tool called "make". It had this and only this syntax: If a line begins at character 0, that is a list of files whose timestamps should be checked, if any are 'old', then execute the series of command lines beneath, identifying them as starting with a tab character. That was it, the entire syntax of "make", and it was complete. T…