From: Toon Claes Date: Wed, 22 Apr 2026 07:09:46 GMT Subject: Re: [PATCH] generate-configlist: collapse depfile for older Ninja Message-ID: <878qafeait.fsf@toon--20250203-5JQV3.mail-host-address-is-not-set> In-Reply-To: Patrick Steinhardt writes: > Do we really have to make the logic conditional? I would expect that > this works just fine for newer versions of Ninja and for Make, so it > feels rather pointless to me to have two modes to worry about. > > So wouldn't the below simplified version be sufficient? I considered that, but I wasn't sure. I went all-in to show what it could be, but I'm happy to see simplifications. Now your version doesn't remove the no-op targets from config-list.h.d. I did some testing, and while Ninja doesn't need those no-op target, they are also harmless to keep them. Thus I agree your version is simpler and better. Let me roll another version. Thanks! > diff --git a/tools/generate-configlist.sh b/tools/generate-configlist.sh > index e28054f9e0..f5f42492c6 100755 > --- a/tools/generate-configlist.sh > +++ b/tools/generate-configlist.sh > @@ -44,7 +44,9 @@ then > { > printf '%s\n' "$SOURCE_DIR"/Documentation/*config.adoc \ > "$SOURCE_DIR"/Documentation/config/*.adoc | > - sed -e 's/[# ]/\\&/g' -e "s/^/$QUOTED_OUTPUT: /" > + sed -e 's/[# ]/\\&/g' | > + tr '\n' ' ' | > + sed -e "s/^/$QUOTED_OUTPUT: /" -e 's/ $/\n/' > printf '%s:\n' "$SOURCE_DIR"/Documentation/*config.adoc \ > "$SOURCE_DIR"/Documentation/config/*.adoc | > sed -e 's/[# ]/\\&/g' -- Cheers, Toon