meson: Reorganize looking for programs

While this change doesn't look like it would improve things and
actually introduces a tiny bit of duplication, it's necessary in
order to prepares the stage for further changes.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Andrea Bolognani 2021-03-24 09:36:19 +01:00
parent 6a023e943e
commit 5254532e3a
1 changed files with 6 additions and 4 deletions

View File

@ -10,12 +10,14 @@ syntax_check_conf.set('flake8_path', flake8_path)
syntax_check_conf.set('runutf8', ' '.join(runutf8))
syntax_check_conf.set('PYTHON3', python3_prog.path())
grep_prog = find_program('grep')
if host_machine.system() == 'freebsd'
make_prog = find_program('gmake')
else
make_prog = find_program('make')
endif
if host_machine.system() == 'freebsd'
grep_prog = find_program('grep')
grep_cmd = run_command(grep_prog, '--version')
if grep_cmd.stdout().startswith('grep (BSD grep')
grep_prog = find_program('/usr/local/bin/grep', required: false)
@ -28,7 +30,7 @@ if host_machine.system() == 'freebsd'
endif
endif
else
make_prog = find_program('make')
grep_prog = find_program('grep')
endif
syntax_check_conf.set('GREP', grep_prog.path())