4 ms·
You can just tell make to use a different character instead of tab. Literally.* It works fine. What could go wrong? * this may be a gnu extension, not sure.
by gumby 4y ago
You can just tell make to use a different character instead of tab. Literally.* It works fine.
What could go wrong?
* this may be a gnu extension, not sure. I did test it once and it works perfectly.
- thenoblesunfish 4y agoThat's not really the point - the point is that the tabs are baked into the de facto standard, so must always be supported, forever, because people use them, so new people use them because they're supported, and so on.
- notpushkin 4y agoThat's not the problem with Make though. If it supported both tabs and spaces, everybody would win. As noted somewhere else in this thread, this would essentially assume you don't have job names beginning with whitespaces, and that's the compatibility bit you're losing, but hey exactly why would you have a job named ' fdsfgs' in your Makefile. Another caveat is that whitespace-Makefiles will be supported by new versions of make only. Well, if you expect your Makefile to be called by a 40 y. o. box running UNIX that can't get a new version you'll have to stick to tabs.
- gumby 4y agoNotice I said I only tried it once? Adding that feature was probably a mistake, as widespread use would make other peoples' Makefiles unreadable.
- jwilk 4y agoThe .RECIPEPREFIX variable is indeed specific to GNU make. https://www.gnu.org/software/make/manual/html_node/Special-Variables.html#index-_002eRECIPEPREFIX-_0028change-the-recipe-prefix-character_0029 https://www.gnu.org/software/make/manual/html_node/Special-V...