[gnome-builder/wip/gtk4-port] plugins/meson: simplify "meson" binary name detection
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] plugins/meson: simplify "meson" binary name detection
- Date: Fri, 24 Jun 2022 23:53:05 +0000 (UTC)
commit d3e16609be310ffe6ac8ef89796e5be357697b72
Author: Christian Hergert <chergert redhat com>
Date: Fri Jun 24 16:51:44 2022 -0700
plugins/meson: simplify "meson" binary name detection
src/plugins/meson/gbp-meson-build-system.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/src/plugins/meson/gbp-meson-build-system.c b/src/plugins/meson/gbp-meson-build-system.c
index 3f850b206..df26e691b 100644
--- a/src/plugins/meson/gbp-meson-build-system.c
+++ b/src/plugins/meson/gbp-meson-build-system.c
@@ -1017,16 +1017,12 @@ char *
gbp_meson_build_system_locate_meson (GbpMesonBuildSystem *self,
IdePipeline *pipeline)
{
- IdeConfig *config = NULL;
+ IdeConfig *config;
g_return_val_if_fail (!self || GBP_IS_MESON_BUILD_SYSTEM (self), NULL);
g_return_val_if_fail (!pipeline || IDE_IS_PIPELINE (pipeline), NULL);
- if (pipeline != NULL && config == NULL)
- config = ide_pipeline_get_config (pipeline);
-
- /* First check MESON=path override in IdeConfig */
- if (config != NULL)
+ if ((config = ide_pipeline_get_config (pipeline)))
{
const char *envvar = ide_config_getenv (config, "MESON");
@@ -1034,14 +1030,6 @@ gbp_meson_build_system_locate_meson (GbpMesonBuildSystem *self,
return g_strdup (envvar);
}
- /* Next see if the pipeline or one of it's extensions has Meson */
- if (pipeline != NULL)
- {
- if (ide_pipeline_contains_program_in_path (pipeline, "meson", NULL))
- return g_strdup ("meson");
- }
-
- /* Fallback to "meson" and hope for the best */
return g_strdup ("meson");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]