]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Reorganize looking for programs
authorAndrea Bolognani <abologna@redhat.com>
Wed, 24 Mar 2021 08:36:19 +0000 (09:36 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Thu, 1 Apr 2021 12:14:25 +0000 (14:14 +0200)
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>
build-aux/meson.build

index 06b7a7c01f364a52395a27536a2727e08bc019eb..c56a3489461363ff321b8865e8cccd1b5b615f7b 100644 (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())