News for hackers. Stuff that matters.
Re:A Simple Makefile for Medium-Sized C/C++ Projects by mbrock on Friday August 26, 2016 @10:01AM (#12366293)
I strongly disagree. The tab requirement for Make is very well known and less strange than custom Makefile generation. Simple Makefiles work extremely well in lots of projects.
Re:A Simple Makefile for Medium-Sized C/C++ Projects by revelation on Friday August 26, 2016 @10:05AM (#12366329)
Somebody listed a number of common build system requirements below, but of course there are usually many many more like custom compilers, cross-compilation, any number of things that your "simple makefile" can't work with.

By the time the Makefile has grown to support all these things it no longer has the properties that made it useful in the first place (parsimonious, understandable, small).

Re:A Simple Makefile for Medium-Sized C/C++ Projects by anjbe on Friday August 26, 2016 @10:15AM (#12366387)
Supporting custom compilers and cross‐compilation is as simple as using ${CC} in the Makefile instead of gcc…
Re:A Simple Makefile for Medium-Sized C/C++ Projects by revelation on Friday August 26, 2016 @10:22AM (#12366450)
This is how we got into this mess in the first place. "Surely it can't be very difficult, let me just add this.."
Re:A Simple Makefile for Medium-Sized C/C++ Projects by anjbe on Friday August 26, 2016 @10:36AM (#12366555)
Perhaps, but I suspect writing a portable Makefile is not as difficult as you think.

Speaking as a packager, I have to patch many CMake build systems for portability issues. And don’t even get me started on SCons. Autotools is better in that regard, but has many flaws of its own.

Here’s an example of a portable Makefile I’ve contributed to a project which handles the common packaging issues (staging directories, cross‐compilation, parallel builds): https://github.com/sinamas/gambatte/pull/6/commits/8d6fffc2b...

Compared to the original build system (two SConstructs): https://github.com/sinamas/gambatte/blob/master/gambatte_sdl... https://github.com/sinamas/gambatte/blob/master/libgambatte/...