7 ms·
Not directly related, but looking at this commit: Why do people still write raw Makefiles?
by Kelteseth 4y ago
Not directly related, but looking at this commit: Why do people still write raw Makefiles?
- mort96 4y agoI use raw makefiles because I know (GNU) make and all the alternatives I've used are worse.
- gyan 4y agoLegacy methods in large projects need a big motivation to change. Every couple of years, someone proposes a new build system. The conversation usually dies within a week or two.
- lifthrasiir 4y agoFor starters, ffmpeg does not use raw Makefile; it has to be generated by running configure. Historically configure (and autoconf etc.) was required due to the variety of platforms to support, which is increasingly less relevant today. The real "raw" Makefile---where you are supposed to run just `make` to build---is not as cumbersome as you may think; even the dependency among source files can be automatically generated.
- capableweb 4y agoTurning the question around (from someone who does write "raw" makefiles): What's the problem with writing "raw" makefiles? If it works, it works. Haven't encountered any major issues with writing them in my years.
- jcelerier 4y agoYou're lucky to not have a name with spaces in it as make does not support that
- th3typh00n 4y agoWhy would you have spaces in source code filenames? It's just a bad idea in general and makes things more complicated for no reason, regardless of what build system you're using.
- jcelerier 4y agoThe spaces may be in parent folders, such as c:\Users\Jean-Michaël Celerier\Documents\Visual Studio Projects\Project 1\... Which your uni's group policy would make it so that you can only write there (thankfully mine was sane, but I've seen it aha). And even then, a build system that does not support arbitrary file names is just terminally broken and should not be used, even less encouraged.
- stavros 4y agoSpaces in filenames aren't inherently bad, they become bad because tools that don't support them are bad. Saying "why would you have spaces?" as a counterargument to "make doesn't support spaces" doesn't work, because the problem with spaces is exactly that make doesn't support them.
- trinovantes 4y agoRandom trivia: Microsoft explicitly added the space in "Program Files" to ensure developers know they need to handle spaces in paths
- stavros 4y agoReally? Huh, that's very interesting, thanks!
- deleted 4y ago[deleted]
- Vogtinator 4y agoSpaces are almost ok. Colons however...
- bsenftner 4y agoMakefiles are extremely powerful. I used to write them myself by hand, for a lot more than program generation. Makefiles can be used to recognize data events, and trigger responses - which I used for years in scientific visualization. In grad school, in the inevitable group projects where people lag and do the work at the last possible minute, I used makefiles to recognize when their contribution landed in the share folder so I could review and incorporate. Makefiles are the IFTTT of the pre-Internet era.
- coldpie 4y agoMakefiles are excellent, but I think they're hampered a bit by their extremely terse syntax (see also: perl). I wonder if a slightly different dialect would help modern users who are used to more verbose languages work with them. Off the top of my head, take this make example: %.o: %.c %.h gcc -o $@ $< mkdir $* cp $@ $* and spell it out a bit more: $MATCH$.o <- $MATCH$.c $MATCH$.h gcc -o $OUT$ $FIRST_DEPEND$ mkdir $MATCH$ cp $OUT$ $MATCH$ Obviously this needs a lot more thought than that, but I think newbies would find the 2nd format much more friendly than the first.
- mrlonglong 4y agoI like it, reduces the need to browse through documentation to find out the exact syntax. Been there, got the t shirt many times.
- jedisct1 4y agoBecause if something works, and the actual project developers are comfortable with it, why change it? For new projects, people may prefer to use something like Zig as the build system. But a build system is not what will make the project faster or magically add new features and fix bugs. What makes that happen is developers being comfortable with the source code, including its build system.