Live data from Hacker News

The Language Agnostic, All-Purpose, Incredible, Makefile

blog.mindlessness.life

91–100 of 124 posts

Re: The Language Agnostic, All-Purpose, Incredible, Makefile

#91
post #21

Earlier quoted context omitted.

Note that the author of that paper (a friend of mine) wrote another build system, the dead-simple-but-awesome make.py. I have a mirror/fork of it[0], since it's been unmaintained for a while (but it mostly doesn't need any maintenance). The entire build system is a single Python script that's less than 500 lines of code. Rather than trying to fit complicated rules into Make's arcane syntax, rules are specified with a…

make.py looks great. I also wrote a make replacement in python (2.7) [1]. I'm proud of it but it doesn't do parallel builds and there are so many other build tools that are better tested. But I'll put it here in case it gives anyone any ideas. [1] https://github.com/robochat/buildbit

That's pretty cool! It's really not too different from make.py. Using decorators and python functions is likely cleaner in a lot of cases, though I'm not sure if that would fit well with make.py's pseudo-declarative model. It probably wouldn't be too hard to add support for parallelism, either.

Re: The Language Agnostic, All-Purpose, Incredible, Makefile

#93
post #82
post #2

Make is great, and I wish more people would use it in place of whatever monstrosity is en vogue this week. However, there is one thing which Make absolutely cannot handle, and that is file names with spaces . If you have any risk of encountering these without any possibility of renaming them, you’ll sadly have to give up on using Make; it just won’t work.

File names with spaces is a sign of lousy developers and IT technicians. If you have file names with spaces you have already lost.

[deleted]

Re: The Language Agnostic, All-Purpose, Incredible, Makefile

#94
post #70
post #2

Make is great, and I wish more people would use it in place of whatever monstrosity is en vogue this week. However, there is one thing which Make absolutely cannot handle, and that is file names with spaces . If you have any risk of encountering these without any possibility of renaming them, you’ll sadly have to give up on using Make; it just won’t work.

A way around that is to convert any spaces in a filename to non-breaking spaces (if you can). That will not only fix problems in Make, but also ease use in the command line.

For very low values of "ease use", in my opinion. Spaces in filenames are a bad idea; non-breaking spaces would be an anti-pattern or an attack, in my opinion.

How do you portably type a non-breaking space, if you don't have tab-completion?

Re: The Language Agnostic, All-Purpose, Incredible, Makefile

#95
post #84

Earlier quoted context omitted.

i am dead serious about that. Allowing the separator character in filenames is a nightmarish error.

Only for tools that are stupid for not being able to handle any kind of filename.

Yes, like filenames with multiple dots, for example.

I agree that filesystems must allow almost arbitrary filenames. But some characters should definitely be forbidden, like '/', '\n' and ' '.

Re: The Language Agnostic, All-Purpose, Incredible, Makefile

#96
post #75

What I love about Makefiles is that they just use the CLI tools. Full build tools like Gradle or Bazel require installing specific plugins and learning a new inferior syntax, making them a nightmare to use if you need to use a non implemented feature of the underlying tool. The biggest pain point is also that they don't even bother to print the actual command being executed! I recently used make in a side project[1]…

make works well when you are targeting a single platform with a decent shell and the project is not too complex (e.g., no auto-generated source code that requires its own automatic dependency tracking). Once that no longer holds, make becomes a real liability.

Re: The Language Agnostic, All-Purpose, Incredible, Makefile

#97
post #70
post #2

Make is great, and I wish more people would use it in place of whatever monstrosity is en vogue this week. However, there is one thing which Make absolutely cannot handle, and that is file names with spaces . If you have any risk of encountering these without any possibility of renaming them, you’ll sadly have to give up on using Make; it just won’t work.

A way around that is to convert any spaces in a filename to non-breaking spaces (if you can). That will not only fix problems in Make, but also ease use in the command line.

Huh? If you can rename the files why keep any kind of whitespace in them at all?

Re: The Language Agnostic, All-Purpose, Incredible, Makefile

#98
post #47
post #2

Make is great, and I wish more people would use it in place of whatever monstrosity is en vogue this week. However, there is one thing which Make absolutely cannot handle, and that is file names with spaces . If you have any risk of encountering these without any possibility of renaming them, you’ll sadly have to give up on using Make; it just won’t work.

And are we gonna talk about case-insensitive filesystems? cringe

The thing I cringe at is the notion that it is ever helpful to manage files with names that differ only in case. Who does this? Why?

Re: The Language Agnostic, All-Purpose, Incredible, Makefile

#99
post #23
post #2

Make is great, and I wish more people would use it in place of whatever monstrosity is en vogue this week. However, there is one thing which Make absolutely cannot handle, and that is file names with spaces . If you have any risk of encountering these without any possibility of renaming them, you’ll sadly have to give up on using Make; it just won’t work.

Make is useful and the concept is sound. However, the implementation is dated. Just off the top of my head, it could be object oriented (rules could be subclassed), the language could have more sophisticated statements, it could have debugging, etc

This ("the conceptual model is sound but the implementation could be improved") is pretty much the basis for build2: https://build2.org/build2/doc/build2-build-system-manual.xht...

Re: The Language Agnostic, All-Purpose, Incredible, Makefile

#100

As a facade, Make is great. Anything more, and it's not. You can express so much in Make, and so quickly; but the expression is horrible and basically confusing.

This describes my Makefiles - they all run some other Bash or Python script.
Post reply on HN