linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: Larry Kollar <larry.kollar@icloud.com>
Cc: Alejandro Colomar <alx@kernel.org>, Groff <groff@gnu.org>,
	linux-man@vger.kernel.org
Subject: Re: Using LS/LE (was: [PATCH v4 2/4] man/man5/tunables.conf: Document system-wide tunables config)
Date: Sat, 29 Aug 2026 11:39:20 +0200	[thread overview]
Message-ID: <apKou1PHGi1N5gGO@isnote.usta.de> (raw)
In-Reply-To: <8DE76435-CBDB-42D6-9E0F-9E27291560B6@icloud.com>

Hi Larry,

Larry Kollar wrote on Fri, Aug 28, 2026 at 10:50:50PM -0400:
> Alejandro Colomar <alx@kernel.org> wrote:

>> I believe that a set of makefiles that would handle all of the targets
>> of a project like groff wouldn't take much more than that.  It might be
>> a few hundred kB.  If it's well organized, it can be maintainable.
>> 
>> Because the makefile language is so simple, bugs are easy to spot and
>> fix, compared to autotools (possibly automake, but I can't distinguish
>> them enough).

> I don't know. Can a Makefile check for the presence of certain libraries
> or other apps and fail gracefully

Obviously, a Makefile can do anything a sh(1) script can do -
arguably, the central idea of make(1) is topological sorting
of sh(1) script snippets according to a dependency graph.
So the answer to your question is an emphatic "yes".

> (by which I mean exiting with a message like "You need app X, plus
> libraries Y and Z, installed to successfully compile this.")?

Absolutely, and some real-world Makefiles do just that,
for example the large and frightening bsd.port.mk(5) on OpenBSD:

  https://man.openbsd.org/bsd.port.mk
  https://cvsweb.openbsd.org/ports/infrastructure/mk/bsd.port.mk

But smaller, simpler Makefiles emitting diagnostic messages of the
kind you describe exist, too.

> That's one of the things that "makes" me appreciate taking
> that extra step of typing `.configure` before make.

Well, that doesn't look like a particularly strong argument,
because adding a rule to the Makefile that automatically runs
the configure script when needed would usually not be difficult,
and the end result regarding diagnostics would be identical to
what you desire.

I think the main reason why build system developers don't usually
run configure automatically from the Makefile is that from a user
perspective, it makes sense to keep the two steps "inspect the
configuration and make some decisions, but do not start building
anything just yet" and "build the stuff, using the variables and
decisions made at the configure stage" separate.  Users may even
want to pause between the two steps, consider the decisions made,
for example by inspecting configure output files like config.h
or Makefile.local or, in case serious debugging is needed, config.log
and maybe even change some of the decisions manually and re-run
configure, even though autoconf(1) makes both steps, inspection
and manipulation of decisions, gratuitiously hard, both by spewing
vast amounts of noise and by the ./configure script being next to
unreadable.  But saner, better-written configure scripts can make
both inspection and manipulation quite simple and pleasant.

Running the configure script automatically from the Makefile
would remove this opportunity for inspection and tweaking.

My point isn't that configure should be integrated into the
Makefile.  Quite to the contrary, medium-sized projects like groff
and mandoc that need to run dozens of configuration tests do benefit
from having a separate configure script.  What i'm saying is that
developers can save themselves massive amounts of work and pain
by ditching autoconf(1) and writing their own configure script -
and thus also make life massively easier for their users, because
dealing with autoconf(1) is equally painful for users.

But again, i do *not* advocate for ripping autoconf(1) out of groff
because Branden seems happy enough with it for now, and it kind
of works most of time, admittedly with regular hiccups around
releases.  Ripping it out would look like a make-work project
at this point; constantly revisiting the same decisions is not
very productive, and automake(1) was only integrated a few years ago.

> Now, a lot of older software (or modern, simple programs) won't
> need that complexity, and a well-written INSTALL file can call out
> necessary Makefile edits before letting 'er rip.

Right, suckless.org software comes to mind as an example.
(That's not to say that i would endorse them in every respect -
for example, i like small amounts of configurability and do not
like the "zero configuration at run time" approach of suckless.)

Yours,
  Ingo

  parent reply	other threads:[~2026-08-29  9:53 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 19:21 [PATCH v4 2/4] man/man5/tunables.conf: Document system-wide tunables config DJ Delorie
2026-08-06 14:37 ` Alejandro Colomar
2026-08-06 15:33   ` DJ Delorie
2026-08-06 19:14     ` Alejandro Colomar
2026-08-06 20:17       ` DJ Delorie
2026-08-06 20:31         ` Alejandro Colomar
2026-08-06 20:42           ` DJ Delorie
2026-08-07  2:12             ` G. Branden Robinson
2026-08-07  3:29               ` DJ Delorie
2026-08-07  3:49                 ` G. Branden Robinson
2026-08-07  4:01                   ` DJ Delorie
2026-08-07  4:09                     ` G. Branden Robinson
2026-08-23 12:29               ` Using LS/LE (was: [PATCH v4 2/4] man/man5/tunables.conf: Document system-wide tunables config) Alejandro Colomar
2026-08-23 13:27                 ` G. Branden Robinson
2026-08-23 13:55                   ` Alejandro Colomar
2026-08-23 14:16                     ` G. Branden Robinson
2026-08-23 15:06                       ` Alejandro Colomar
2026-08-23 16:44                         ` G. Branden Robinson
2026-08-23 19:30                           ` Alejandro Colomar
2026-08-23 20:40                             ` G. Branden Robinson
2026-08-23 23:11                               ` Alejandro Colomar
2026-08-24  1:11                                 ` G. Branden Robinson
2026-08-24  2:01                                   ` Using LS/LE Collin Funk
2026-08-24 11:08                                     ` Alejandro Colomar
2026-08-24 11:00                                   ` Using LS/LE (was: [PATCH v4 2/4] man/man5/tunables.conf: Document system-wide tunables config) Alejandro Colomar
2026-08-23 22:31                             ` autotools, was: Using LS/LE Ingo Schwarze
2026-08-24  0:09                               ` Alejandro Colomar
2026-08-29  4:36                               ` G. Branden Robinson
2026-08-29 11:34                                 ` Ingo Schwarze
2026-08-29 12:51                                   ` Alejandro Colomar
2026-08-29 19:16                                     ` G. Branden Robinson
2026-08-29 21:43                                       ` Alejandro Colomar
     [not found]                             ` <8DE76435-CBDB-42D6-9E0F-9E27291560B6@icloud.com>
2026-08-29  8:42                               ` Using LS/LE (was: [PATCH v4 2/4] man/man5/tunables.conf: Document system-wide tunables config) Alejandro Colomar
2026-08-29  8:45                                 ` Alejandro Colomar
2026-08-29  8:52                                   ` Alejandro Colomar
2026-08-29  9:02                                     ` Alejandro Colomar
2026-08-29  9:39                               ` Ingo Schwarze [this message]
2026-08-29 13:10                                 ` configure separate from make or not (was: Using LS/LE) Alejandro Colomar
2026-08-29 15:31                                   ` configure separate from make or not Ingo Schwarze
2026-08-29 20:49                                     ` Alejandro Colomar
2026-08-30 13:17                                       ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=apKou1PHGi1N5gGO@isnote.usta.de \
    --to=schwarze@usta.de \
    --cc=alx@kernel.org \
    --cc=groff@gnu.org \
    --cc=larry.kollar@icloud.com \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).