Earlier quoted context omitted.
Maybe I'm in the minority, but I've always found its syntax to be quite nice (though admittedly a departure from most modern languages). Then again, I find using JSON or not-quite-ruby to configure a build incredibly bizarre and confusing, so I guess I'm just set in my ways... In all seriousness, what's wrong with it? Significant tabs aren't great, but I feel like that's a relatively minor wart. The simple things are…
"In all seriousness, what's wrong with it?" 1. Claiming a rule makes a target, but then fails to make that target, ought to be a runtime fatal error in the makefile. I can hardly even guess at how much time this one change alone would have saved people. 2. String concatenation as the fundamental composition method is a cute hack for the 1970s... no sarcasm, it really is... but there's better known ways to make "templ…
The Makefile I use with JavaScript projects
401–410 of 525 posts
Re: The Makefile I use with JavaScript projects
#402Earlier quoted context omitted.
you could mount the database as a filesystem
With respect to Make, does the database (mounted as a filesystem) retain accurate information that Make needs to operate as designed (primarily the timestamps). To what level of granularity is this data present within the database, and what is the performance of the database accessed in this way? Will it tell you that the table was updated at 08:40:33.7777, or will it tell you only that the whole database was altered…
Say directories map to databases and files map to tables and views. You can create new tables and views by either writing data or an appropriate query. Views and result files would be read-only while data files would be writable. Writing to a data file would be done with a query which modifies the table and the result could be retrieved by then reading the file -- the modification time would be the time of the last update which is known.
Views and queries could be cached results from the last time they were ran which could be updated/rerun by touching them or they could be dynamic and update whenever a table they reference is updated.
Re: The Makefile I use with JavaScript projects
#403Earlier 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?
Another advantage of using a scripting language is that the hard work of portability will already have been done for you by the authors of the scripting language. Make, in contrast, works within a shell and invokes programs which may be either wildly or subtly incompatible across platforms. Add in the lacking support for conditionals in POSIX make and portability is a nightmare.
Re: The Makefile I use with JavaScript projects
#404Earlier quoted context omitted.
> 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 backen…
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
#405Earlier quoted context omitted.
How would you fix that with your preferred make replacement? None of that has anything to do with make, you're trying to solve a stateful problem ("did I send this or not?") without using any state. That just doesn't work. It's not a make thing at all.
Lisper was replying to the OP who suggested using Make for general workflows. Make falls apart when your workflow doesn't naturally involve file modification tasks. With regard to my last comment (the problem with small changes in a file resulting in full-system recompilation), see Tup. It maintains a database of what's happened. So when foo.c is altered it will regenerate foo.o. But if foo.o is not changed, you can…
GNU make handles multiple outputs alright but I will admit they if you want something portable it's pretty hairy.
Re: The Makefile I use with JavaScript projects
#406Earlier quoted context omitted.
Why would you add an 'h' to 'pattern'?
I think that just supports my argument, really. I've never really used makefiles. The blog post talked about using patsubst to change a path. The name of the function essentially gives no clue at all what it does.
Isn't that the problem with using blog posts as educational sources?
(I'm happy I was learning all my toolkit long before blogs became a thing. It's hard to open and read Physics book, when someone on YT talks funny about its second chapter.)
Re: The Makefile I use with JavaScript projects
#407Earlier quoted context omitted.
It sounds like you are looking for something like Yocto/OE, which you can bake pretty much any build script into, cross compile and deploy. What exactly are you looking for with regards to deployment, and what tool do use, instead of CMake, to give you that ability?
Can Yocto or CMake build QNX systems or bare-metal binaries with TI's compiler? The tool I'm looking for is Make because Make gives me a ton of flexibility to build whatever freaky combination of binaries might go into whatever product I'm working on, and then combine those binaries into a system image. The point I'm trying to make is that every build system except Make solves a really specific class of build problem…
https://github.com/Kitware/CMake/blob/master/Modules/Platfor... https://github.com/Kitware/CMake/blob/master/Modules/Compile...
Re: The Makefile I use with JavaScript projects
#408When someone says "there are numerous alternatives", I just look out the window and smile.
Almost all issues mentioned itt can be solved in barely-compatible, but easily transition-able way. If this tool exists, its name is welcome.
Re: The Makefile I use with JavaScript projects
#409Earlier quoted context omitted.
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.
Not a problem if you use a my.cnf file...
Extra complication to avoid if possible.
Re: The Makefile I use with JavaScript projects
#410Earlier quoted context omitted.
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.
Why do it from a makefile instead of a script called by the makefile? This plays well to the strengths of both.