git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] generate-configlist: collapse depfile for older Ninja

From
Toon Claes <toon@iotcl.com>
Date
Apr 22, 2026, 07:09 UTC
Message-ID
<878qafeait.fsf@toon--20250203-5JQV3.mail-host-address-is-not-set>
In-Reply-To
<aehsikCfPm83M9dN@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 5 quoted lines
> 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!
Show 15 quoted lines
> 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
Previous: Patrick SteinhardtNext: Toon Claes
Message 3 of 12 in “generate-configlist: collapse depfile for older Ninja”
  1. generate-configlist: collapse depfile for older NinjaToon Claes, Apr 21, 2026
  2. Patrick SteinhardtApr 22, 2026
  3. Toon ClaesApr 22, 2026
  4. generate-configlist: collapse depfile for older NinjaToon Claes, Apr 22, 2026
  5. Patrick SteinhardtApr 22, 2026
  6. Phillip WoodApr 22, 2026
  7. Phillip WoodApr 22, 2026
  8. Toon ClaesMay 15, 2026
  9. generate-configlist: collapse depfile for older NinjaToon Claes, May 15, 2026
  10. Phillip WoodMay 15, 2026
  11. Patrick SteinhardtMay 21, 2026
  12. D. Ben KnobleApr 22, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.