Larry McVoy wrote in
<20240616234654.GB12821(a)mcvoy.com>:
|On Sun, Jun 16, 2024 at 04:34:34PM -0700, Luther Johnson wrote:
|> I think there's a parallel from the Unix/Linux systems that we think of
...
|> For example: CMake vs. just learning how to write makefiles properly.
|> You fiddle with CMake and you never really know why it does what it
|> does, especially from one version to the next, "but you don't have to
|> write makefiles".
|
|I could not agree more with this post, all of it, but especially the
|Cmake stuff. Writing Makefiles isn't that hard, if you are a programmer
|and can't do that, how good of a programmer are you? And is it really
|easier to learn shiny-new-make-replacement-du-jour every year?
It must be said that "thrillingly fast" is a key item all those
(maybe ninja cmake ant) throw in.
And that it takes quite a bit of (non-portability and) thought to
empower "normal" makefiles to achieve full parallelism etc.
I think you watch the FreeBSD hacker community, and there is "war"
around the "meta-mode" (against cmake) to avoid recompilations etc.
Multiple people are working on BSD make and the BSD makefile
system. (In fact on NetBSD the last years even saw a tremendous
run on overhauling BSD make, which then only got imported to
FreeBSD.) The files are very dense after decades of engineering,
and due to "clean namespace" paradigm there are long variable
names that sometimes fill half of an eighty column screen alone;
for (stupid first-see-and-take) things like
INSTALL_DDIR= ${_INSTALL_DDIR:S://:/:g:C:/$::}
you need a clear head. This is not self-descriptive. (Not to
talk about the fact that lines (may) become expanded by the shell
after they have become expanded by make, ie, all the quoting, and
the delayed or immediate macro expansion mechanism(s).)
Original make did not have conditionals, or file inclusions, or
dedicated control of parallelism (on file, on target level) via
.NOTPARALLEL: and .WAIT:, so things like
tangerine: config .WAIT build .WAIT test .WAIT install
are not portable. (In fact portability and parallelism is not
possible unless you use a recursive approach, with all the
pitfalls that then brings.)
And then all the bugs everywhere, with quoting pitfalls, and this
applies to helper tools like awk too (ie xpg4/bin/awk even
documents "Notice that backslash escapes are interpreted twice").
I also remember (from the time i still gave money to journalists)
terms like "the usual triad" for "./configure && make &&
make
install" with that implied "grazy times, but that is how you do
it" undertone maybe even. Now i see for example "cmake -D VAR1
.. && cmake --build build && cmake --install build" which is
possibly easier to grasp when compiling a C compiler that is 1.2
GiB when installed.
--End of <20240616234654.GB12821(a)mcvoy.com>
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)