News for hackers. Stuff that matters.
Re:Allowing CMake functions to return(value) by kazinator on Tuesday August 18, 2020 @05:42PM (#24204692)
> I can't remember the last time I saw a project that relied on Makefiles to build

I don't know what GNU/Linux you're using, because in my experience, most packages going into a distro use make.

Oh, and then there is that whole denominator in the GNU/Linux fraction that's built with GNU Make.

Maybe you don't see Makefiles because you're relying on binary packages?

Re:Allowing CMake functions to return(value) by jcelerier on Tuesday August 18, 2020 @06:02PM (#24204877)
> I don't know what GNU/Linux you're using, because in my experience, most packages going into a distro use make.

no, they use autotools or cmake, which happens to generate makefiles. the package authors themselves definitely don't write any makefiles by hand except maybe for trivial packages (and frankly I'm not sure)

Re:Allowing CMake functions to return(value) by kazinator on Tuesday August 18, 2020 @06:29PM (#24205098)
Autotools generate a Makefile project, and nothing but a Makefile project. All the buiding in the development cycle is done by typing "make". Autotools projects include a template makefile: Makefile.am. Make is not concealed in any way.

Also note that not all Autotools-based projects use Automake. Using only Autoconf, with a hand-maintained Makefile, is a thing.

The goal of Autotools is to produce a software distribution that doesn't require the end user to have Autotools. The end user has a shell to run the configure script, and that's it. If that works, they run "make".

About the most sophisticated generation the user will see is that some Makefile.in template is passed through sed to substitute @@XYZ@@ variables.

Re:Allowing CMake functions to return(value) by de_watcher on Wednesday August 19, 2020 @03:45AM (#24208122)
Make is like an assembly language of the build systems. This layer gives structure and debuggability (otherwise you're spending time poking at some opaque UI or something).
Re:Allowing CMake functions to return(value) by anand-bala on Wednesday August 19, 2020 @01:22AM (#24207409)
This is true for Autotools projects, but isn't true for CMake, Bazel, Meson, and others. Let's take CMake for example, which is IMHO the most popular build tool: most modern CMake projects prefer to use the Ninja build system over Make.

And coming back to Autotools, some of the largest Autotools projects (see the GNOME ecosystem) has been moving/moved to Meson, which can also be used to generate Ninja rules instead of Makefiles.

CMake Generators: https://cmake.org/cmake/help/latest/manual/cmake-generators.... Meson: https://mesonbuild.com/ Bazel: https://bazel.build/

GNOME and Meson: https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting

Re:Allowing CMake functions to return(value) by rumanator on Wednesday August 19, 2020 @01:55AM (#24207561)
> Autotools generate a Makefile project

That's what all build systems do. Hell, cmake's description is "cross-platform Makefile generator".

The rationale is quite obvious: the DAG part is solved problem. The hard part is extracting platform-dependent info, perform validations, and use it to generate the DAG.

And a Makefile is a DAG.