I used make heavily in the 80s and 90s, but haven't much since then. Recently I started a project that had source files getting processed into PDF files, for use by humans. Since this is the 21st century, those files have spaces in their names. At a certain point, I realized that I should be managing this processing somehow, so I thought of using a simple Makefile. A little searching reveals that the consensus on usi…
Demanding the support of spaces in filenames significantly complicates code as simple space delimination no longer works and other delimination schemes are much more error prone -- forgetting balancing quotes, any one? While you are allowing spaces, you probabaly are allowing all possible code points or maybe even a null byte? Thinking about it gives me headaches. I hate hearing people using 21st century or modern as…
The Makefile I use with JavaScript projects
461–470 of 525 posts
Re: The Makefile I use with JavaScript projects
#462Earlier quoted context omitted.
No, not really - I have no particular opinion about what POSIX chooses to support or not. But I'm going to go back to my original point. What I do have an opinion about is how reasonable it is for tools not to support a character that is valid in file names, when that character is straightforward to support with everyday, well known syntax. And when that character is ' ', the standard English word separator, as strai…
Please write a makefile that uses an environment variable as a mysql password to connect to a mysql server and perform an arbitrary administrative task. Now do the same, assuming that the password can have a dollar in it. You can do it. It is not as easy, readable or maintanable. Avoid it if you can.
Re: The Makefile I use with JavaScript projects
#463Earlier quoted context omitted.
There's this program called make...
My question was aimed at ops generic statement. As for Make, it originally wasn’t clear to me where the issue was supposed to lie. Lines in rule bodies are handed off to the shell, and that whitespace in rule dependencies need escaping didn’t seem surprising since it’s a list (though it’s probably a bug that whitespace in target names must be escaped, since it’s just one token that ends in a colon). But I see now tha…
It's perfectly fine for a rule to have multiple targets, e.g.
output.txt error.txt: source
build source > output.txt 2> error.txtRe: The Makefile I use with JavaScript projects
#464CMake is so nice compared to vanilla makefiles. I wonder if it can be used this way with Javascript.
Re: The Makefile I use with JavaScript projects
#465Earlier quoted context omitted.
My question was aimed at ops generic statement. As for Make, it originally wasn’t clear to me where the issue was supposed to lie. Lines in rule bodies are handed off to the shell, and that whitespace in rule dependencies need escaping didn’t seem surprising since it’s a list (though it’s probably a bug that whitespace in target names must be escaped, since it’s just one token that ends in a colon). But I see now tha…
> though it’s probably a bug that whitespace in target names must be escaped, since it’s just one token that ends in a colon It's perfectly fine for a rule to have multiple targets, e.g. output.txt error.txt: source build source > output.txt 2> error.txt
Re: The Makefile I use with JavaScript projects
#466Earlier quoted context omitted.
I was able to to it. Here's the source code "hello world.c": #include int main(void) { puts("Hello, world!"); return 0; } And here's the minimal Makefile to generate the output: hello world: Of course, I did have to swap out the ASCII SP (character 32) for the Unicode non-blank space (code 160) to get this to work, but hey, spaces!
>I did have to swap out the ASCII SP (character 32) for the Unicode non-blank space (code 160) How? EDIT: Ok, now I got it. Boy that was a wild ride.
Re: The Makefile I use with JavaScript projects
#467Re: The Makefile I use with JavaScript projects
#468Earlier quoted context omitted.
Make is such a horrifically awful thing to work with that I just end up using a regular scripting language for building. Why learn another language with all its eccentricities and footguns when I already know several others?
Do you honestly think Make has no advantages over conventional scripting languages when it comes to building software? I suspect you know that it’s designed for that task and has been used for that task for several decades. Presumably you respect the community over those decades sufficiently to have a strong prior belief that there are good arguments for Make (as well as downsides), even if you can’t be bothered to r…
And no, I don't respect the community. The community very often makes "The Way Things Are Done" its personal religion and refuses to ever change anything for the better.
Re: The Makefile I use with JavaScript projects
#469Earlier quoted context omitted.
Pro-tip: you don’t have to switch tools the minute that something new comes out.
You do, since different communities use different build tools. And they even switch tools, for the new kid on the block.
Stop presenting these ridiculous false dichotomies.
Re: The Makefile I use with JavaScript projects
#470Earlier quoted context omitted.
JavaScript is in the server, browser, mobile apps, desktop apps and embedded devices. Basically, it’s used everywhere that C is used and then some.
What is the runtime? Always the same. More than C? Ha! The platform where your js is running is probably written in C!
That's why many, many, many, many, many more people are writing server, browser, desktop and mobile apps with JS and not C.