From dff957eb1b5f0c45e552affede99b3585bbcca00 Mon Sep 17 00:00:00 2001
From: Andres Freund <andres@anarazel.de>
Date: Sat, 7 Dec 2024 14:33:29 -0500
Subject: [PATCH v1 1/6] meson: Narrow dependencies for 'install-quiet' target

Previously test dependencies, which are not actually installed, were
unnecessarily built.

Author:
Reviewed-by:
Discussion: https://postgr.es/m/
Backpatch:
---
 meson.build | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index e5ce437a5c7..87ba82b27b0 100644
--- a/meson.build
+++ b/meson.build
@@ -3185,24 +3185,30 @@ if libintl.found() and meson.version().version_compare('>=0.60')
 endif
 
 
-all_built = [
+# all targets that 'meson install' needs
+installed_targets = [
   backend_targets,
   bin_targets,
   libpq_st,
   pl_targets,
   contrib_targets,
   nls_mo_targets,
-  testprep_targets,
   ecpg_targets,
 ]
 
+# all targets that require building code
+all_built = [
+  installed_targets,
+  testprep_targets,
+]
+
 # Meson's default install target is quite verbose. Provide one that is quiet.
 install_quiet = custom_target('install-quiet',
   output: 'install-quiet',
   build_always_stale: true,
   build_by_default: false,
   command: [meson_bin, meson_args, 'install', '--quiet', '--no-rebuild'],
-  depends: all_built,
+  depends: installed_targets,
 )
 
 # Target to install files used for tests, which aren't installed by default
-- 
2.45.2.746.g06e570c0df.dirty

