596f510 meson: call find_program() once and reuse the variable everywhere

Authored and Committed by zbyszek 3 years ago
    meson: call find_program() once and reuse the variable everywhere
    
    Meson 0.58 has gotten quite bad with emitting a message every time
    a quoted command is used:
    Program /home/zbyszek/src/systemd-work/tools/meson-make-symlink.sh found: YES (/home/zbyszek/src/systemd-work/tools/meson-make-symlink.sh)
    Program sh found: YES (/usr/bin/sh)
    Program sh found: YES (/usr/bin/sh)
    Program sh found: YES (/usr/bin/sh)
    Program sh found: YES (/usr/bin/sh)
    Program sh found: YES (/usr/bin/sh)
    Program sh found: YES (/usr/bin/sh)
    Program xsltproc found: YES (/usr/bin/xsltproc)
    Configuring custom-entities.ent using configuration
    Message: Skipping bootctl.1 because ENABLE_EFI is false
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Message: Skipping journal-remote.conf.5 because HAVE_MICROHTTPD is false
    Message: Skipping journal-upload.conf.5 because HAVE_MICROHTTPD is false
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Message: Skipping loader.conf.5 because ENABLE_EFI is false
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    Program ln found: YES (/usr/bin/ln)
    ...
    
    Let's suffer one message only for each command. Hopefully we can silence
    even this when https://github.com/mesonbuild/meson/issues/8642 is
    resolved.
    
        
file modified
+1 -2
file modified
+1 -2
file modified
+4 -5
file modified
+22 -18
file modified
+3 -3
file modified
+1 -1
file modified
+1 -1
file modified
+4 -7
file modified
+3 -4
file modified
+1 -2