PR #23621 opened by Kacper Michajłow (kasper93)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23621
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/23621.patch


From 48e8b38906c9ae76793423df2973430369c0c548 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sun, 28 Jun 2026 00:58:35 +0200
Subject: [PATCH 1/2] ffbuild/common.mak: fix source path prefix stripping in
 INSTALL output
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Use $(SRC_PATH), the source tree root, for consistent
repository-relative paths. SRC_DIR used before was undefined and this
macro only stripped leading /.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 ffbuild/common.mak | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index 059de5abf3..e59a9eedef 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -27,7 +27,7 @@ M      = @$(call ECHO,$(TAG),$@);
 $(foreach VAR,$(BRIEF), \
     $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
 $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
-$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
+$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_PATH)/%=%)); $(INSTALL))
 endif
 
 # Prepend to a recursively expanded variable without making it simply expanded.
-- 
2.52.0


From d4212ee17292324206a2c2cb5d257b17c0079d50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= <[email protected]>
Date: Sun, 28 Jun 2026 01:03:54 +0200
Subject: [PATCH 2/2] ffbuild: show install destinations in the INSTALL build
 output
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The INSTALL pretty-printer echoed the rule prerequisites ($^), which had
several shortcomings:

- For recipes that run install more than once (e.g. installing a shared
  library installs the dll, the import library and the def file) the same
  prerequisite was printed for every command, so the dll name appeared
  three times regardless of what was actually being installed.
- Phony prerequisites such as install-progs-yes leaked into the output.
- The destination was never shown.

Route install through a small helper that receives the real install
command line and prints one "source -> destination" line per installed
file before execing install. This deduplicates the output, drops the
phony names and shows where each file is installed, similar to meson.

Signed-off-by: Kacper Michajłow <[email protected]>
---
 ffbuild/common.mak       |  2 +-
 ffbuild/install_print.sh | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100755 ffbuild/install_print.sh

diff --git a/ffbuild/common.mak b/ffbuild/common.mak
index e59a9eedef..e9041a2bc1 100644
--- a/ffbuild/common.mak
+++ b/ffbuild/common.mak
@@ -27,7 +27,7 @@ M      = @$(call ECHO,$(TAG),$@);
 $(foreach VAR,$(BRIEF), \
     $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
 $(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
-$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_PATH)/%=%)); $(INSTALL))
+$(eval INSTALL = @$(SRC_PATH)/ffbuild/install_print.sh $(SRC_PATH) $(INSTALL))
 endif
 
 # Prepend to a recursively expanded variable without making it simply expanded.
diff --git a/ffbuild/install_print.sh b/ffbuild/install_print.sh
new file mode 100755
index 0000000000..e5b610163a
--- /dev/null
+++ b/ffbuild/install_print.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# Pretty-print the files copied by a single install invocation as
+# "source -> destination" and then run the actual install command.
+#
+# Usage: install_print.sh SRC_PATH INSTALL_PROG [INSTALL_OPTIONS...] SRC... 
DEST
+
+src_path=$1
+prog=$2
+shift 2
+
+for dest do :; done
+
+skip=0
+for arg do
+    if [ "$skip" = 1 ]; then
+        skip=0
+        continue
+    fi
+    case $arg in
+        -m|-o|-g|-t)
+            skip=1
+            continue
+            ;;
+        -*)
+            continue
+            ;;
+    esac
+    [ "$arg" = "$dest" ] && continue
+    printf 'INSTALL\t%s -> %s\n' "${arg#"$src_path"/}" "$dest"
+done
+
+exec "$prog" "$@"
-- 
2.52.0

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

Reply via email to