4 ms·
> - if your paths have white space in them, you are generally fucked Paths containing ':' are also fun. That make doesn't handle paths - and most likely other
by dan00 6y ago
> - if your paths have white space in them, you are generally fucked
Paths containing ':' are also fun. That make doesn't handle paths - and most likely other things - as a unit, but just substitutes their string representation into the makefile, is just asking for trouble.
- barumi 6y ago> Paths containing ':' are also fun. To be fair, anyone who uses reserved/special characters in file names is asking for trouble in pretty much any usage.
- maple3142 6y agoBut linux filename basically allows any byte sequence except EOF and /, so I think it is "make" fault to not being able to support it. Other proper build tools support it correctly.
- patrec 6y agoWell, just because make is faulty, doesn't mean linux isn't too ;) Spaces -- ok. But there is absolutely no use case for allowing near arbitrary byte sequences in filenames, it causes no end of trouble, and it would have been trivial to fix in a non-disruptive manner ages ago (mount -o allowreallydumbfilenames, off by default).
- barumi 6y ago> But linux filename basically allows any byte sequence except EOF and / (...) Could/should/would... Even though UNIX doesn't impose many restrictions on file names that doesn't mean it's in your best interests to use any weird character in them. I mean, do you honestly believe it's a good idea to have file names that are 256-characters long, have line breaks in their name, and have substrings such as "sudo rm -rf /"?
- dan00 6y agoThe point isn’t if it’s a good idea, but that a program shouldn’t misbehave.
- maple3142 6y ago> I mean, do you honestly believe it's a good idea to have file names that are 256-characters long, have line breaks in their name, and have substrings such as "sudo rm -rf /"? Yes. It is usually some badly written programs or scripts choke on space, newline other things. BTW, I would like to impose a restriction that filename must be valid UTF-8 string instead of random bytes.
- saagarjha 6y agoStill, it's not great to trip over them.
- dan00 6y agoHaving to be aware which character in a path is considered as special by which program, just doesn’t scale very well. It shouldn’t differentiate what an os and a program consider as a valid path.