6 ms·
From these articles, one can always tell who just hit the “need to really master make” stage in their project.
by Annatar 9y ago
From these articles, one can always tell who just hit the “need to really master make” stage in their project.
- gmueckl 9y agoYou mean the one build system that doesn't know the first thing about header files? The one build system that fails to detect that a header file changed and thus a certain set of source files must now be rebuilt? If there's a case for an existing build system here, the system in question is not make. There are much better systems out there (scons, cmake...). Just my two cents.
- AstralStorm 9y agoNah, it can spot this if you happen to add those header files to the rules and/or the rule to extract the dependencies using the compiler like autotools and cmake do.
- gmueckl 9y agoSo I need an extra preprocessor run to output make rules into temporary files and then I have to hack make rules to make it work. That's what we had 20 years ago. Any decent C/C++ build system these days does not need extra rules for this. And that's how it should be.
- Annatar 9y agoThere is no such thing as a “decent C/C++ build system”; that’s a fallacy. Master the compiler front-end’s -M option.
- gmueckl 9y agoYour world must be quite small then if all you have are conpilers that unterstand that flag. There are perfectly workable compilers out there without this feature. And with a good build system (thus thread has mentioned a few) you do not have to care. I can show you build acripts for C++ programs that know nothing about the compiler. They work with GCC on Linux, MSVC on Windows and clang on OS X without a single change. Hiw is that not decent?
- Annatar 9y agoScons and CMake are both heavier garbage, for mostly the same reasons: both require unnecesary dependencies, Scons requires Python which is a monster, and CMake is a bitch to build. Neither fully implement all of Make's capabilities, because both authors never really mastered Make and misunderstand it. As a final slap to CMake, in the end it generates Makefiles, proving that Make is the be all, end all when it comes to build engines. You better buy the book on Make and learn it and learn it well instead of wasting your time on toy tools. The longer you try to avoid it, the more time you'll waste.
- jstimpfle 9y agoHey, if you think Make is so superior and flawless, I challenge you to show what you think my build would look like as a maintainable (non-generated) Makefile? The build description I've listed is not a trivial build but it's not super complex either. I need to generate Visual Studio project files as well, but let's ignore that for now.
- lolikoisuru 9y agoI would like to attempt this even though I'm not the person you're replying to. There is just one problem though, your page isn't loading.
- jstimpfle 9y agoIt works again. Had added IPv6 but broken IPv4 access.
- lolikoisuru 9y agoIs the codebase you're trying to compile available somewhere?
- jstimpfle 9y ago
- lolikoisuru 9y ago>You mean the one build system that doesn't know the first thing about header files? It's a general purpose DAG runner. It's not really feasible to add parsing for all the different possible languages that one might want to use imports in. Luckily at least GCC and Clang both have the option -MMD and any sane compiler for other languages should have something similiar.
- gmueckl 9y agoC/C++ has text-based inclusion, which is just not a sane form of importing stuff from other modules. This is why we can get crazy stuff like broken partial builds. Most other languages are saner to build and some even come with tailor-made build tools. Using a saner tool than plain make for C/C++ is worth it every time in my book. make can still be very useful for other stuff, though.
- nrclark 9y agoScons and Cmake aren't too bad. With either one of them, you at least know that a team of developers and a large user-base have worked out most of the kinks. Honestly though, raw GNU Make isn't too bad either, except for the not having any good built-in mechanisms for a 'configuration' step.
- Annatar 9y agoMake isn’t just for building executables; if your nitpick is about make not having intimate knowledge of header files, you have a long way to go on your road to mastery of make. Make can be used for automation of many different tasks, for example web page rendering or database creation, to name a few. And, it has built in rules for handling header files correctly; you would do well to study and understand them.