3 ms·
That last bit is really key. Nearly every modern build system is also a dependency management system, something that really isn't possible using Make. There hav
by orclev 9y ago
That last bit is really key. Nearly every modern build system is also a dependency management system, something that really isn't possible using Make. There have been tools introduced to address that particular need for C/C++, but they integrate poorly if at all with the build system, so it turns all your builds into (at least initially) three step processes of run dependency installer, run config tool to figure out exactly which flavor of C compiler/linker/etc. to invoke, run make to actually build the thing.
It's also possible to do some truly awful things with make. I once worked on an embedded device that the SDK provided by the OEM was written using a truly horrific makefile system. There were no less than 80 makefiles all tied together to build an entire system image, including the building of the linux kernel, all the bintools, and a bunch of other custom stuff the OEM provided. Trying to understand, much less modify any part of that build system was an absolute nightmare, and is one of the few times I've actually wished they had used shell scripts instead of make for some of that stuff.
As for Maven, it was quite a pioneer in its day, but it hasn't aged well, in particular being written in XML which just adds needless verbosity. For a more modern take, look at Gradle, which provides everything that Maven does (and uses mavens dependency system), but is a lot more flexible because it's a DSL for project building instead of a declarative system like Maven.
- snuxoll 9y agoI think the declarative model is why I prefer Maven over any other build system I've worked with, yeah XML is a little noisy but if it's really that big of a deal there's the polyglot plugin. Maven POM's are pretty easy to figure out once you've worked with them for a while, there's a learning curve when you start adding plugins and have to get at least a basic understanding of build phases - but a large chunk of projects need nothing more than the default plugin bindings, they just add their dependencies and go off to the races.
- rleigh 9y ago> Nearly every modern build system is also a dependency management system, something that really isn't possible using Make The BSD Ports tree provides exactly this functionality. All package dependencies provided via standard make variables and rules, enabling recursive resolution of all package dependencies.
- JdeBP 9y agoredo is mentioned elsewhere in this very discussion. One of the things that Daniel J. Bernstein did in his packages is merge steps two and three. There would be makefile/redo rules for detecting the presence of operating-system-specific stuff, and linking the appropriate source/header files into place. Here's an example from ucspi-tcp that auto-configures whether the platform supports waitpid(): * https://github.com/comotion/ucspi-tcp/blob/master/Makefile#L338 https://github.com/comotion/ucspi-tcp/blob/master/Makefile#L... * https://github.com/comotion/ucspi-tcp/blob/master/choose.sh https://github.com/comotion/ucspi-tcp/blob/master/choose.sh * https://github.com/comotion/ucspi-tcp/blob/master/trywaitp.c https://github.com/comotion/ucspi-tcp/blob/master/trywaitp.c * https://github.com/comotion/ucspi-tcp/blob/master/haswaitp.h1 https://github.com/comotion/ucspi-tcp/blob/master/haswaitp.h... * https://github.com/comotion/ucspi-tcp/blob/master/haswaitp.h2 https://github.com/comotion/ucspi-tcp/blob/master/haswaitp.h... When I extended redo to the whole of djbwares, this system was fairly simple to convert. Here is haswaitp.h.do which is what redo ends up running whenever something reveals a dependency from haswaitp.h : #!/bin/sh -e redo-ifchange trywaitp.c compile link if ( ./compile trywaitp.o trywaitp.c trywaitp.d && ./link trywaitp trywaitp.o ) >/dev/null 2>&1 then echo \#define HASWAITPID 1 > "$3" else echo '/* sysdep: -waitpid */' > "$3" fi * http://jdebp.eu./Softwares/djbwares/ http://jdebp.eu./Softwares/djbwares/