Skip to content

Commit ff534ac

Browse files
committed
Meson build: Make quiet installations possible
* tools/handle-built-files.py: Don't print names of installed files if environment variable MESON_INSTALL_QUIET is set. It is set by "meson install --quiet" in Meson 0.54.0 and newer.
1 parent ce4f49b commit ff534ac

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/handle-built-files.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,16 @@ def install_built_h_files():
4545
built_h_dir = sys.argv[2]
4646
install_dir_root = os.path.join(os.getenv('MESON_INSTALL_DESTDIR_PREFIX'), sys.argv[3])
4747

48+
quiet = bool(os.getenv('MESON_INSTALL_QUIET'))
4849
for file in sys.argv[4:]:
4950
path_h = os.path.join(built_h_dir, file)
5051
rel_dir = os.path.dirname(file)
5152
if rel_dir:
5253
install_dir = os.path.join(install_dir_root, rel_dir)
5354
else:
5455
install_dir = install_dir_root
55-
print('Installing ', path_h, ' to ', install_dir)
56+
if not quiet:
57+
print('Installing ', path_h, ' to ', install_dir)
5658

5759
# Create the installation directory, if it does not exist.
5860
os.makedirs(install_dir, exist_ok=True)

0 commit comments

Comments
 (0)