PR #26318 opened by Forgejo_Fairy
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26318
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/26318.patch

Fixes #26279.

Quiet mode expands one `printf` command per source and repeats the destination 
in each. With the Windows CI prefix in #26279, this produces a 12,318-character 
libavutil header recipe. The bulk install starts at offset 9,993, beyond the 
point where the CI log stops.

Print the same source-to-destination messages in a shell loop, then run the 
existing bulk install on a separate recipe line. The longest line with that 
prefix is now 2,369 characters.

Tested on x86-64 Linux. A long-prefix `make install-libavutil-headers` that 
failed on master installed all 103 headers with this change. An out-of-tree 
comparison preserved the status messages and installed contents for headers and 
examples, including the example Makefile installed under a new name. A staged 
static and shared library install also passed.


>From f1e421a4fe4527261ec974ebb923e7b179ca4d10 Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <[email protected]>
Date: Tue, 24 Nov 2026 15:50:37 +0000
Subject: [PATCH] ffbuild: shorten quiet install recipes

Expanding a printf command and its destination for every source makes
the libavutil header recipe exceed 12k characters with the Windows CI
prefix in #26279. The install command itself fits comfortably.

Print the source names in a shell loop and run install on a separate
recipe line. This keeps the per-file output and single install call.

Fixes #26279.

Assisted-by: Fairy
---
 ffbuild/common.mak | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index 68efac4d0d5..6cb130a643f 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -30,7 +30,12 @@ M      = @$(call ECHO,$(TAG),$@);
 $(foreach VAR,$(BRIEF), \
     $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
 $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
-INSTALL_FILES = @$(foreach F,$(2),printf 'INSTALL\t%s -> %s\n' 
"$(F:$(SRC_PATH)/%=%)" "$(3)"; )$(INSTALL) $(1) $(2) "$(3)"
+define INSTALL_FILES
+@for file in $(2:$(SRC_PATH)/%=%); do \
+    printf 'INSTALL\t%s -> %s\n' "$$file" "$(3)"; \
+done
+@$(INSTALL) $(1) $(2) "$(3)"
+endef
 endif
 
 # Prepend to a recursively expanded variable without making it simply expanded.
-- 
2.54.1

_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to