Re: [dev] getting rid of cmake builds

From: NRK <nrk_AT_disroot.org>
Date: Fri, 22 Sep 2023 19:27:25 +0600

On Fri, Sep 22, 2023 at 12:33:15PM +0200, Roberto E. Vargas Caballero wrote:
> In a Makefile (in a good well written) you only have to pass a
> different CFLAGS value

Either I haven't communicated properly, or people are not reading
clearly. In either case, here's a practical example using a fresh ST
repo:

        $ make
        # ... builds st
        $ make CFLAGS="-g3 -fsanitize=address,undefined"
        # ... builds nothing because make doesn't take CFLAGS changes into account.

I've seen some (hacky) ways to dump the flags into a file to trigger
re-build more reliably. But as I've said, it's a solution to a self-made
problem.

> but in the shell script

There is no shell script involved. You invoke the compiler directly with
whatever flags you please. There's no need to track dependencies or
flags.

And this is no longer the 50s, we have enough memory to build a couple
thousand line of code without *requiring* splitting things into multiple
intermediate object files to avoid going OOM (even with bloated
compilers like gcc/clang with optimization enabled).

Incremental builds are not free. And for small projects, the complexities
they bring is (IMO) much higher compared to the benefits (which are
either non-existent or negligible for small projects).

> that is not about build systems, is about software design:

This is true. But it is also true that when people have a hammer in
hand, everything looks like a nail.

When someone start off with an over-complicated build system, they tend
to also end up over-engineering the software architecture as a result of
the build system making it easy to over-complicate things.

- NRK
Received on Fri Sep 22 2023 - 15:27:25 CEST

This archive was generated by hypermail 2.3.0 : Fri Sep 22 2023 - 15:36:09 CEST