freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master e342f83 1/3: * meson.build: Check the return value of


From: Werner Lemberg
Subject: [freetype2] master e342f83 1/3: * meson.build: Check the return value of `run_command`.
Date: Fri, 17 Dec 2021 04:53:10 -0500 (EST)

branch: master
commit e342f83c0bc1b6de5f05d2b7f2b1c29a1b98eb96
Author: Eli Schwartz <eschwartz@archlinux.org>
Commit: Werner Lemberg <wl@gnu.org>

    * meson.build: Check the return value of `run_command`.
    
    By default, errors are not checked and a command that is somehow broken will
    just capture incorrect output (likely an empty string).  Current development
    versions of meson now raise a warning for this implicit behavior, and advise
    explicitly setting the `check:` keyword argumend to determine whether a
    failing return code should be considered an error.
    
    Since none of the commands in this project are expected to fail, mark them
    as required to succeed.
---
 meson.build | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/meson.build b/meson.build
index 9998848..6ea4bfa 100644
--- a/meson.build
+++ b/meson.build
@@ -27,7 +27,8 @@ project('freetype2', 'c',
   meson_version: '>= 0.55.0',
   default_options: ['default_library=both'],
   version: run_command('builds/meson/extract_freetype_version.py',
-                       'include/freetype/freetype.h').stdout().strip(),
+                       'include/freetype/freetype.h',
+                       check: true).stdout().strip(),
 )
 
 
@@ -41,11 +42,13 @@ python_exe = python.find_installation(required: true)
 ft2_so_version = run_command(python_exe,
   files('builds/meson/extract_libtool_version.py'),
   '--soversion',
-  files('builds/unix/configure.raw')).stdout().strip()
+  files('builds/unix/configure.raw'),
+  check: true).stdout().strip()
 
 ft2_pkgconfig_version = run_command(python_exe,
   files('builds/meson/extract_libtool_version.py'),
-  files('builds/unix/configure.raw')).stdout().strip()
+  files('builds/unix/configure.raw'),
+  check: true).stdout().strip()
 
 ft2_includes = include_directories('include')
 
@@ -70,7 +73,8 @@ ft2_sources = [ftmodule_h]
 ft_main_modules = run_command(python_exe,
   files('builds/meson/parse_modules_cfg.py'),
   '--format=main-modules',
-  files('modules.cfg')).stdout().strip().split()
+  files('modules.cfg'),
+  check: true).stdout().strip().split()
 
 ft2_sources += files([
   'src/base/ftbase.c',
@@ -91,7 +95,8 @@ endforeach
 ft_aux_modules = run_command(python_exe,
   files('builds/meson/parse_modules_cfg.py'),
   '--format=aux-modules',
-  files('modules.cfg')).stdout().strip().split()
+  files('modules.cfg'),
+  check: true).stdout().strip().split()
 
 foreach auxmod: ft_aux_modules
   source = auxmod
@@ -117,7 +122,8 @@ endforeach
 base_extensions = run_command(python_exe,
   files('builds/meson/parse_modules_cfg.py'),
   '--format=base-extensions-list',
-  files('modules.cfg')).stdout().split()
+  files('modules.cfg'),
+  check: true).stdout().split()
 
 foreach ext: base_extensions
   ft2_sources += files('src/base/' + ext)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]