1
0
Fork 0

[meson] explicit check for run_command

This commit is contained in:
Witold Filipczyk 2022-11-25 17:53:36 +01:00
parent 081d95395f
commit 5eb6abc03a
1 changed files with 4 additions and 4 deletions

View File

@ -3,8 +3,8 @@ srcs=[]
srcdir = meson.source_root()
txt = run_command('git', '--git-dir=' + srcdir + '/.git', 'rev-parse', 'HEAD').stdout().strip()
dirty = run_command(srcdir + '/git-dirty.sh').stdout().strip()
txt = run_command('git', '--git-dir=' + srcdir + '/.git', 'rev-parse', 'HEAD', check:false).stdout().strip()
dirty = run_command(srcdir + '/git-dirty.sh', check:false).stdout().strip()
add_global_arguments('-DBUILD_ID="' + txt + dirty + '"', language : 'c')
conf_data = configuration_data()
@ -431,13 +431,13 @@ endif
if conf_data.get('CONFIG_SCRIPTING_PERL')
perl_libs = ''
perl_l = run_command('perl', '-MExtUtils::Embed', '-e', 'ldopts')
perl_l = run_command('perl', '-MExtUtils::Embed', '-e', 'ldopts', check:true)
if perl_l.returncode() == 0
perl_libs = perl_l.stdout().strip().split()
endif
perl_cflags = ''
perl_c = run_command('perl', '-MExtUtils::Embed', '-e', 'ccopts')
perl_c = run_command('perl', '-MExtUtils::Embed', '-e', 'ccopts', check:true)
if perl_c.returncode() == 0
perl_cflags = perl_c.stdout().strip().split()
endif