diff mbox series

[v7,14/22] meson: Resolve the entitlement.sh script once for good

Message ID 20220306231753.50277-15-philippe.mathieu.daude@gmail.com (mailing list archive)
State New, archived
Headers show
Series host: Support macOS 12 | expand

Commit Message

Philippe Mathieu-Daudé March 6, 2022, 11:17 p.m. UTC
From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Commit 235b523dba ("meson: Use find_program() to resolve the
entitlement.sh script") didn't correctly fixed the issue, as
the script is still resolved for each target. Move the check
earlier, before processing each target.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Akihiko Odaki March 7, 2022, 4:13 a.m. UTC | #1
Reviewed-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Tested-by: Akihiko Odaki <akihiko.odaki@gmail.com>

On Mon, Mar 7, 2022 at 8:19 AM Philippe Mathieu-Daudé
<philippe.mathieu.daude@gmail.com> wrote:
>
> From: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> Commit 235b523dba ("meson: Use find_program() to resolve the
> entitlement.sh script") didn't correctly fixed the issue, as
> the script is still resolved for each target. Move the check
> earlier, before processing each target.
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  meson.build | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index b6e30d7463..8ca2b7c8c2 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -3063,6 +3063,10 @@ common_all = static_library('common',
>
>  feature_to_c = find_program('scripts/feature_to_c.sh')
>
> +if targetos == 'darwin'
> +  entitlement = find_program('scripts/entitlement.sh')
> +endif
> +
>  emulators = {}
>  foreach target : target_dirs
>    config_target = config_target_mak[target]
> @@ -3220,7 +3224,6 @@ foreach target : target_dirs
>          install_input += meson.current_source_dir() / entitlements
>        endif
>
> -      entitlement = find_program('scripts/entitlement.sh')
>        emulators += {exe['name'] : custom_target(exe['name'],
>                     input: build_input,
>                     output: exe['name'],
> --
> 2.34.1
>
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index b6e30d7463..8ca2b7c8c2 100644
--- a/meson.build
+++ b/meson.build
@@ -3063,6 +3063,10 @@  common_all = static_library('common',
 
 feature_to_c = find_program('scripts/feature_to_c.sh')
 
+if targetos == 'darwin'
+  entitlement = find_program('scripts/entitlement.sh')
+endif
+
 emulators = {}
 foreach target : target_dirs
   config_target = config_target_mak[target]
@@ -3220,7 +3224,6 @@  foreach target : target_dirs
         install_input += meson.current_source_dir() / entitlements
       endif
 
-      entitlement = find_program('scripts/entitlement.sh')
       emulators += {exe['name'] : custom_target(exe['name'],
                    input: build_input,
                    output: exe['name'],