[gnome-builder/wip/gtk4-port] plugins/make: port make plugin to C



commit 6adf9905d73f8d4d2bd353e7a728564bf7096dfa
Author: Christian Hergert <chergert redhat com>
Date:   Thu May 26 15:02:21 2022 -0700

    plugins/make: port make plugin to C
    
    This drops the templates currently, but will come back after we get the
    project creation into better shape using the template input object (as
    that will affect meson-templates too).

 src/plugins/make/gbp-make-build-system-discovery.c |  48 ++++++
 src/plugins/make/gbp-make-build-system-discovery.h |  32 ++++
 src/plugins/make/gbp-make-build-system.c           | 180 +++++++++++++++++++++
 src/plugins/make/gbp-make-build-system.h           |  32 ++++
 src/plugins/make/gbp-make-build-target-provider.c  | 127 +++++++++++++++
 src/plugins/make/gbp-make-build-target-provider.h  |  32 ++++
 src/plugins/make/gbp-make-build-target.c           | 137 ++++++++++++++++
 src/plugins/make/gbp-make-build-target.h           |  34 ++++
 src/plugins/make/gbp-make-pipeline-addin.c         | 161 ++++++++++++++++++
 src/plugins/make/gbp-make-pipeline-addin.h         |  32 ++++
 src/plugins/make/gbp-make-run-command-provider.c   | 128 +++++++++++++++
 src/plugins/make/gbp-make-run-command-provider.h   |  32 ++++
 src/plugins/make/gbp-make-template-provider.c      |  51 ++++++
 src/plugins/make/gbp-make-template-provider.h      |  32 ++++
 src/plugins/make/gbp-make-template.h               |  36 +++++
 src/plugins/make/make-plugin.c                     |  60 +++++++
 src/plugins/make/make.gresource.xml                |   3 +-
 src/plugins/make/make.plugin                       |  14 +-
 src/plugins/make/meson.build                       |  29 ++--
 19 files changed, 1177 insertions(+), 23 deletions(-)
---
diff --git a/src/plugins/make/gbp-make-build-system-discovery.c 
b/src/plugins/make/gbp-make-build-system-discovery.c
new file mode 100644
index 000000000..21434e9e5
--- /dev/null
+++ b/src/plugins/make/gbp-make-build-system-discovery.c
@@ -0,0 +1,48 @@
+/* gbp-make-build-system-discovery.c
+ *
+ * Copyright 2017 Matthew Leeds <mleeds redhat com>
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-make-build-system-discovery"
+
+#include "config.h"
+
+#include "gbp-make-build-system-discovery.h"
+
+struct _GbpMakeBuildSystemDiscovery
+{
+  IdeSimpleBuildSystemDiscovery parent_instance;
+};
+
+G_DEFINE_FINAL_TYPE (GbpMakeBuildSystemDiscovery, gbp_make_build_system_discovery, 
IDE_TYPE_SIMPLE_BUILD_SYSTEM_DISCOVERY)
+
+static void
+gbp_make_build_system_discovery_class_init (GbpMakeBuildSystemDiscoveryClass *klass)
+{
+}
+
+static void
+gbp_make_build_system_discovery_init (GbpMakeBuildSystemDiscovery *self)
+{
+  g_object_set (self,
+                "glob", "+(GNUmakefile|makefile|Makefile)",
+                "hint", "make",
+                "priority", 1000,
+                NULL);
+}
diff --git a/src/plugins/make/gbp-make-build-system-discovery.h 
b/src/plugins/make/gbp-make-build-system-discovery.h
new file mode 100644
index 000000000..02e0dfdc6
--- /dev/null
+++ b/src/plugins/make/gbp-make-build-system-discovery.h
@@ -0,0 +1,32 @@
+/* gbp-make-build-system-discovery.h
+ *
+ * Copyright 2017 Matthew Leeds <mleeds redhat com>
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-foundry.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_MAKE_BUILD_SYSTEM_DISCOVERY (gbp_make_build_system_discovery_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpMakeBuildSystemDiscovery, gbp_make_build_system_discovery, GBP, 
MAKE_BUILD_SYSTEM_DISCOVERY, IdeSimpleBuildSystemDiscovery)
+
+G_END_DECLS
diff --git a/src/plugins/make/gbp-make-build-system.c b/src/plugins/make/gbp-make-build-system.c
new file mode 100644
index 000000000..23f9ce5ac
--- /dev/null
+++ b/src/plugins/make/gbp-make-build-system.c
@@ -0,0 +1,180 @@
+/* gbp-make-build-system.c
+ *
+ * Copyright 2017 Matthew Leeds <mleeds redhat com>
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-make-build-system"
+
+#include "config.h"
+
+#include <libide-foundry.h>
+
+#include "gbp-make-build-system.h"
+
+struct _GbpMakeBuildSystem
+{
+  IdeObject  parent_instance;
+  GFile     *project_file;
+  GFile     *make_dir;
+};
+
+enum {
+  PROP_0,
+  PROP_PROJECT_FILE,
+  N_PROPS
+};
+
+static char *
+gbp_make_build_system_get_id (IdeBuildSystem *build_system)
+{
+  return g_strdup ("make");
+}
+
+static char *
+gbp_make_build_system_get_display_name (IdeBuildSystem *build_system)
+{
+  return g_strdup ("Make");
+}
+
+static int
+gbp_make_build_system_get_priority (IdeBuildSystem *build_system)
+{
+  return 0;
+}
+
+static char *
+gbp_make_build_system_get_builddir (IdeBuildSystem *build_system,
+                                    IdePipeline    *pipeline)
+{
+  GbpMakeBuildSystem *self = (GbpMakeBuildSystem *)build_system;
+
+  g_assert (GBP_IS_MAKE_BUILD_SYSTEM (self));
+  g_assert (IDE_IS_PIPELINE (pipeline));
+  g_assert (G_IS_FILE (self->make_dir));
+
+  return g_file_get_path (self->make_dir);
+}
+
+static void
+build_system_iface_init (IdeBuildSystemInterface *iface)
+{
+  iface->get_id = gbp_make_build_system_get_id;
+  iface->get_display_name = gbp_make_build_system_get_display_name;
+  iface->get_priority = gbp_make_build_system_get_priority;
+  iface->get_builddir = gbp_make_build_system_get_builddir;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpMakeBuildSystem, gbp_make_build_system, IDE_TYPE_OBJECT,
+                               G_IMPLEMENT_INTERFACE (IDE_TYPE_BUILD_SYSTEM, build_system_iface_init))
+
+static GParamSpec *properties [N_PROPS];
+
+static void
+gbp_make_build_system_set_project_file (GbpMakeBuildSystem *self,
+                                        GFile              *file)
+{
+  g_assert (GBP_IS_MAKE_BUILD_SYSTEM (self));
+  g_assert (!file || G_IS_FILE (file));
+
+  if (g_set_object (&self->project_file, file))
+    {
+      g_clear_object (&self->make_dir);
+
+      if (file != NULL)
+        {
+          if (g_file_query_file_type (file, 0, NULL) != G_FILE_TYPE_DIRECTORY)
+            self->make_dir = g_file_get_parent (file);
+          else
+            self->make_dir = g_object_ref (file);
+        }
+    }
+}
+
+static void
+gbp_make_build_system_dispose (GObject *object)
+{
+  GbpMakeBuildSystem *self = (GbpMakeBuildSystem *)object;
+
+  g_clear_object (&self->project_file);
+  g_clear_object (&self->make_dir);
+
+  G_OBJECT_CLASS (gbp_make_build_system_parent_class)->dispose (object);
+}
+
+static void
+gbp_make_build_system_get_property (GObject    *object,
+                                     guint       prop_id,
+                                     GValue     *value,
+                                     GParamSpec *pspec)
+{
+  GbpMakeBuildSystem *self = GBP_MAKE_BUILD_SYSTEM (object);
+
+  switch (prop_id)
+    {
+    case PROP_PROJECT_FILE:
+      g_value_set_object (value, self->project_file);
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+gbp_make_build_system_set_property (GObject      *object,
+                                     guint         prop_id,
+                                     const GValue *value,
+                                     GParamSpec   *pspec)
+{
+  GbpMakeBuildSystem *self = GBP_MAKE_BUILD_SYSTEM (object);
+
+  switch (prop_id)
+    {
+    case PROP_PROJECT_FILE:
+      gbp_make_build_system_set_project_file (self, g_value_get_object (value));
+      break;
+
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+    }
+}
+
+static void
+gbp_make_build_system_class_init (GbpMakeBuildSystemClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->dispose = gbp_make_build_system_dispose;
+  object_class->get_property = gbp_make_build_system_get_property;
+  object_class->set_property = gbp_make_build_system_set_property;
+
+  properties [PROP_PROJECT_FILE] =
+    g_param_spec_object ("project-file",
+                         "Project File",
+                         "The project file (Make.toml)",
+                         G_TYPE_FILE,
+                         (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+  g_object_class_install_properties (object_class, N_PROPS, properties);
+}
+
+static void
+gbp_make_build_system_init (GbpMakeBuildSystem *self)
+{
+}
diff --git a/src/plugins/make/gbp-make-build-system.h b/src/plugins/make/gbp-make-build-system.h
new file mode 100644
index 000000000..d27201ab5
--- /dev/null
+++ b/src/plugins/make/gbp-make-build-system.h
@@ -0,0 +1,32 @@
+/* gbp-make-build-system.h
+ *
+ * Copyright 2017 Matthew Leeds <mleeds redhat com>
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-core.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_MAKE_BUILD_SYSTEM (gbp_make_build_system_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpMakeBuildSystem, gbp_make_build_system, GBP, MAKE_BUILD_SYSTEM, IdeObject)
+
+G_END_DECLS
diff --git a/src/plugins/make/gbp-make-build-target-provider.c 
b/src/plugins/make/gbp-make-build-target-provider.c
new file mode 100644
index 000000000..cd008f076
--- /dev/null
+++ b/src/plugins/make/gbp-make-build-target-provider.c
@@ -0,0 +1,127 @@
+/* gbp-make-build-target-provider.c
+ *
+ * Copyright 2019 Alex Mitchell
+ * Copyright 2016-2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-make-build-target-provider"
+
+#include "config.h"
+
+#include <glib/gi18n.h>
+
+#include <libide-foundry.h>
+#include <libide-threading.h>
+
+#include "gbp-make-build-system.h"
+#include "gbp-make-build-target.h"
+#include "gbp-make-build-target-provider.h"
+
+struct _GbpMakeBuildTargetProvider
+{
+  IdeObject parent_instance;
+};
+
+static const char *expected_make_targets[] = {
+  "", "all", "install", "run",
+};
+
+static void
+gbp_make_build_target_provider_get_targets_async (IdeBuildTargetProvider *provider,
+                                                  GCancellable           *cancellable,
+                                                  GAsyncReadyCallback     callback,
+                                                  gpointer                user_data)
+{
+  GbpMakeBuildTargetProvider *self = (GbpMakeBuildTargetProvider *)provider;
+  g_autoptr(GPtrArray) targets = NULL;
+  g_autoptr(IdeTask) task = NULL;
+  g_autoptr(GError) error = NULL;
+  IdeBuildSystem *build_system;
+  IdeContext *context;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_MAKE_BUILD_TARGET_PROVIDER (self));
+  g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
+
+  task = ide_task_new (self, cancellable, callback, user_data);
+  ide_task_set_source_tag (task, gbp_make_build_target_provider_get_targets_async);
+
+  context = ide_object_get_context (IDE_OBJECT (self));
+  build_system = ide_build_system_from_context (context);
+
+  if (!GBP_IS_MAKE_BUILD_SYSTEM (build_system))
+    {
+      ide_task_return_new_error (task,
+                                 G_IO_ERROR,
+                                 G_IO_ERROR_NOT_SUPPORTED,
+                                 "Not a make build system");
+      IDE_EXIT;
+    }
+
+  /* TODO: It would be nice to actually extract all the make targets from the
+   * Makefile. We can possibly do various "print" targets we inject into the
+   * Makefile like we do in autotools to get this.
+   */
+  targets = g_ptr_array_new_with_free_func (g_object_unref);
+  for (guint i = 0; i < G_N_ELEMENTS (expected_make_targets); i++)
+    g_ptr_array_add (targets, gbp_make_build_target_new (expected_make_targets[i]));
+  ide_task_return_pointer (task, g_steal_pointer (&targets), g_ptr_array_unref);
+
+  IDE_EXIT;
+}
+
+static GPtrArray *
+gbp_make_build_target_provider_get_targets_finish (IdeBuildTargetProvider  *provider,
+                                                  GAsyncResult            *result,
+                                                  GError                 **error)
+{
+  GPtrArray *ret;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_MAKE_BUILD_TARGET_PROVIDER (provider));
+  g_assert (IDE_IS_TASK (result));
+
+  ret = ide_task_propagate_pointer (IDE_TASK (result), error);
+
+  /* transfer full semantics */
+  IDE_PTR_ARRAY_CLEAR_FREE_FUNC (ret);
+
+  IDE_RETURN (ret);
+}
+
+static void
+build_target_provider_iface_init (IdeBuildTargetProviderInterface *iface)
+{
+  iface->get_targets_async = gbp_make_build_target_provider_get_targets_async;
+  iface->get_targets_finish = gbp_make_build_target_provider_get_targets_finish;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpMakeBuildTargetProvider, gbp_make_build_target_provider, IDE_TYPE_OBJECT,
+                               G_IMPLEMENT_INTERFACE (IDE_TYPE_BUILD_TARGET_PROVIDER, 
build_target_provider_iface_init))
+
+static void
+gbp_make_build_target_provider_class_init (GbpMakeBuildTargetProviderClass *klass)
+{
+}
+
+static void
+gbp_make_build_target_provider_init (GbpMakeBuildTargetProvider *self)
+{
+}
diff --git a/src/plugins/make/gbp-make-build-target-provider.h 
b/src/plugins/make/gbp-make-build-target-provider.h
new file mode 100644
index 000000000..58b386660
--- /dev/null
+++ b/src/plugins/make/gbp-make-build-target-provider.h
@@ -0,0 +1,32 @@
+/* gbp-make-build-target-provider.h
+ *
+ * Copyright 2019 Alex Mitchell
+ * Copyright 2016-2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-core.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_MAKE_BUILD_TARGET_PROVIDER (gbp_make_build_target_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpMakeBuildTargetProvider, gbp_make_build_target_provider, GBP, 
MAKE_BUILD_TARGET_PROVIDER, IdeObject)
+
+G_END_DECLS
diff --git a/src/plugins/make/gbp-make-build-target.c b/src/plugins/make/gbp-make-build-target.c
new file mode 100644
index 000000000..e417e229f
--- /dev/null
+++ b/src/plugins/make/gbp-make-build-target.c
@@ -0,0 +1,137 @@
+/* gbp-make-build-target.c
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-make-build-target"
+
+#include "config.h"
+
+#include <glib/gi18n.h>
+
+#include <libide-foundry.h>
+
+#include "gbp-make-build-target.h"
+
+struct _GbpMakeBuildTarget
+{
+  IdeObject parent_instance;
+  char *name;
+};
+
+static GFile *
+gbp_make_build_target_get_install_directory (IdeBuildTarget *build_target)
+{
+  return NULL;
+}
+
+static char **
+gbp_make_build_target_get_argv (IdeBuildTarget *build_target)
+{
+  return NULL;
+}
+
+static char *
+gbp_make_build_target_get_display_name (IdeBuildTarget *build_target)
+{
+  GbpMakeBuildTarget *self = (GbpMakeBuildTarget *)build_target;
+
+  if (ide_str_empty0 (self->name))
+    return g_strdup (_("Default Make Target"));
+
+  return g_strdup (self->name);
+}
+
+static char *
+gbp_make_build_target_get_name (IdeBuildTarget *build_target)
+{
+  GbpMakeBuildTarget *self = (GbpMakeBuildTarget *)build_target;
+
+  return g_strdup_printf ("make:%s", self->name ? self->name : "");
+}
+
+static IdeArtifactKind
+gbp_make_build_target_get_kind (IdeBuildTarget *build_target)
+{
+  return IDE_ARTIFACT_KIND_NONE;
+}
+
+static int
+gbp_make_build_target_get_priority (IdeBuildTarget *build_target)
+{
+  return 0;
+}
+
+static void
+build_target_iface_init (IdeBuildTargetInterface *iface)
+{
+  iface->get_argv = gbp_make_build_target_get_argv;
+  iface->get_display_name = gbp_make_build_target_get_display_name;
+  iface->get_install_directory = gbp_make_build_target_get_install_directory;
+  iface->get_kind = gbp_make_build_target_get_kind;
+  iface->get_name = gbp_make_build_target_get_name;
+  iface->get_priority = gbp_make_build_target_get_priority;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpMakeBuildTarget, gbp_make_build_target, IDE_TYPE_OBJECT,
+                               G_IMPLEMENT_INTERFACE (IDE_TYPE_BUILD_TARGET, build_target_iface_init))
+
+static void
+gbp_make_build_target_finalize (GObject *object)
+{
+  GbpMakeBuildTarget *self = (GbpMakeBuildTarget *)object;
+
+  g_clear_pointer (&self->name, g_free);
+
+  G_OBJECT_CLASS (gbp_make_build_target_parent_class)->finalize (object);
+}
+
+static void
+gbp_make_build_target_class_init (GbpMakeBuildTargetClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = gbp_make_build_target_finalize;
+}
+
+static void
+gbp_make_build_target_init (GbpMakeBuildTarget *self)
+{
+}
+
+GbpMakeBuildTarget *
+gbp_make_build_target_new (const char *name)
+{
+  GbpMakeBuildTarget *self;
+
+  if (ide_str_empty0 (name))
+    name = NULL;
+
+  self = g_object_new (GBP_TYPE_MAKE_BUILD_TARGET, NULL);
+  self->name = g_strdup (name);
+
+  return self;
+}
+
+const char *
+gbp_make_build_target_get_make_target (GbpMakeBuildTarget *self)
+{
+  g_return_val_if_fail (GBP_IS_MAKE_BUILD_TARGET (self), NULL);
+
+  return self->name;
+}
diff --git a/src/plugins/make/gbp-make-build-target.h b/src/plugins/make/gbp-make-build-target.h
new file mode 100644
index 000000000..4522343fd
--- /dev/null
+++ b/src/plugins/make/gbp-make-build-target.h
@@ -0,0 +1,34 @@
+/* gbp-make-build-target.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-core.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_MAKE_BUILD_TARGET (gbp_make_build_target_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpMakeBuildTarget, gbp_make_build_target, GBP, MAKE_BUILD_TARGET, IdeObject)
+
+GbpMakeBuildTarget *gbp_make_build_target_new             (const char         *name);
+const char         *gbp_make_build_target_get_make_target (GbpMakeBuildTarget *self);
+
+G_END_DECLS
diff --git a/src/plugins/make/gbp-make-pipeline-addin.c b/src/plugins/make/gbp-make-pipeline-addin.c
new file mode 100644
index 000000000..0be62974f
--- /dev/null
+++ b/src/plugins/make/gbp-make-pipeline-addin.c
@@ -0,0 +1,161 @@
+/* gbp-make-pipeline-addin.c
+ *
+ * Copyright 2017 Matthew Leeds <mleeds redhat com>
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-make-pipeline-addin"
+
+#include "config.h"
+
+#include <glib/gi18n.h>
+
+#include <libide-foundry.h>
+
+#include "gbp-make-build-system.h"
+#include "gbp-make-build-target.h"
+#include "gbp-make-pipeline-addin.h"
+
+struct _GbpMakePipelineAddin
+{
+  IdeObject parent_instance;
+};
+
+static void
+query_cb (IdePipelineStage *stage,
+          IdePipeline      *pipeline,
+          GPtrArray        *targets,
+          GCancellable     *cancellable,
+          gpointer          user_data)
+{
+  g_autoptr(IdeSubprocessLauncher) build_launcher = NULL;
+  const char *make;
+  IdeConfig *config;
+  int j;
+
+  g_assert (IDE_IS_PIPELINE_STAGE_LAUNCHER (stage));
+  g_assert (IDE_IS_PIPELINE (pipeline));
+  g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
+
+  config = ide_pipeline_get_config (pipeline);
+  if (!(make = ide_config_getenv (config, "MAKE")))
+    make = "make";
+
+  build_launcher = ide_pipeline_create_launcher (pipeline, NULL);
+  ide_subprocess_launcher_push_argv (build_launcher, make);
+
+  if ((j = ide_config_get_parallelism (config)) > 0)
+    ide_subprocess_launcher_push_argv_format (build_launcher, "-j%d", j);
+
+  if (targets != NULL && targets->len > 0)
+    {
+      for (guint i = 0; i < targets->len; i++)
+        {
+          IdeBuildTarget *build_target = g_ptr_array_index (targets, i);
+          const char *make_target;
+
+          if (!GBP_IS_MAKE_BUILD_TARGET (build_target))
+            continue;
+
+          if ((make_target = gbp_make_build_target_get_make_target (GBP_MAKE_BUILD_TARGET (build_target))))
+            ide_subprocess_launcher_push_argv (build_launcher, make_target);
+        }
+    }
+
+  ide_subprocess_launcher_push_args (build_launcher,
+                                     ide_config_get_args_for_phase (config, IDE_PIPELINE_PHASE_BUILD));
+
+  /* Always defer to make to check if build is needed */
+  ide_pipeline_stage_launcher_set_launcher (IDE_PIPELINE_STAGE_LAUNCHER (stage), build_launcher);
+  ide_pipeline_stage_set_completed (stage, FALSE);
+}
+
+static void
+gbp_make_pipeline_addin_load (IdePipelineAddin *addin,
+                              IdePipeline      *pipeline)
+{
+  g_autoptr(IdeSubprocessLauncher) clean_launcher = NULL;
+  g_autoptr(IdeSubprocessLauncher) install_launcher = NULL;
+  g_autoptr(IdePipelineStage) build_stage = NULL;
+  g_autoptr(IdePipelineStage) install_stage = NULL;
+  IdeBuildSystem *build_system;
+  const char *make;
+  IdeContext *context;
+  IdeConfig *config;
+  guint id;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_MAKE_PIPELINE_ADDIN (addin));
+  g_assert (IDE_IS_PIPELINE (pipeline));
+
+  context = ide_object_get_context (IDE_OBJECT (addin));
+  build_system = ide_build_system_from_context (context);
+
+  if (!GBP_IS_MAKE_BUILD_SYSTEM (build_system))
+    IDE_EXIT;
+
+  config = ide_pipeline_get_config (pipeline);
+  if (!(make = ide_config_getenv (config, "MAKE")))
+    make = "make";
+
+  g_assert (IDE_IS_CONFIG (config));
+  g_assert (make != NULL);
+
+  clean_launcher = ide_pipeline_create_launcher (pipeline, NULL);
+  ide_subprocess_launcher_push_args (clean_launcher, IDE_STRV_INIT (make, "clean"));
+
+  build_stage = ide_pipeline_stage_launcher_new (context, NULL);
+  ide_pipeline_stage_set_name (build_stage, _("Building project"));
+  ide_pipeline_stage_launcher_set_clean_launcher (IDE_PIPELINE_STAGE_LAUNCHER (build_stage), clean_launcher);
+  g_signal_connect (build_stage, "query", G_CALLBACK (query_cb), NULL);
+  id = ide_pipeline_attach (pipeline, IDE_PIPELINE_PHASE_BUILD, 0, build_stage);
+  ide_pipeline_addin_track (addin, id);
+
+  install_launcher = ide_pipeline_create_launcher (pipeline, NULL);
+  ide_subprocess_launcher_push_args (install_launcher, IDE_STRV_INIT (make, "install"));
+  ide_subprocess_launcher_push_args (install_launcher,
+                                     ide_config_get_args_for_phase (config, IDE_PIPELINE_PHASE_INSTALL));
+
+  install_stage = ide_pipeline_stage_launcher_new (context, install_launcher);
+  ide_pipeline_stage_set_name (install_stage, _("Installing project"));
+  g_signal_connect (install_stage, "query", G_CALLBACK (query_cb), NULL);
+  id = ide_pipeline_attach (pipeline, IDE_PIPELINE_PHASE_INSTALL, 0, install_stage);
+  ide_pipeline_addin_track (addin, id);
+
+  IDE_EXIT;
+}
+
+static void
+pipeline_addin_iface_init (IdePipelineAddinInterface *iface)
+{
+  iface->load = gbp_make_pipeline_addin_load;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpMakePipelineAddin, gbp_make_pipeline_addin, IDE_TYPE_OBJECT,
+                               G_IMPLEMENT_INTERFACE (IDE_TYPE_PIPELINE_ADDIN, pipeline_addin_iface_init))
+
+static void
+gbp_make_pipeline_addin_class_init (GbpMakePipelineAddinClass *klass)
+{
+}
+
+static void
+gbp_make_pipeline_addin_init (GbpMakePipelineAddin *self)
+{
+}
diff --git a/src/plugins/make/gbp-make-pipeline-addin.h b/src/plugins/make/gbp-make-pipeline-addin.h
new file mode 100644
index 000000000..88b0a47eb
--- /dev/null
+++ b/src/plugins/make/gbp-make-pipeline-addin.h
@@ -0,0 +1,32 @@
+/* gbp-make-pipeline-addin.h
+ *
+ * Copyright 2017 Matthew Leeds <mleeds redhat com>
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-core.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_MAKE_PIPELINE_ADDIN (gbp_make_pipeline_addin_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpMakePipelineAddin, gbp_make_pipeline_addin, GBP, MAKE_PIPELINE_ADDIN, IdeObject)
+
+G_END_DECLS
diff --git a/src/plugins/make/gbp-make-run-command-provider.c 
b/src/plugins/make/gbp-make-run-command-provider.c
new file mode 100644
index 000000000..924970c25
--- /dev/null
+++ b/src/plugins/make/gbp-make-run-command-provider.c
@@ -0,0 +1,128 @@
+/* gbp-make-run-command-provider.c
+ *
+ * Copyright 2017 Matthew Leeds <mleeds redhat com>
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-make-run-command-provider"
+
+#include "config.h"
+
+#include <glib/gi18n.h>
+
+#include <libide-foundry.h>
+#include <libide-threading.h>
+
+#include "gbp-make-build-system.h"
+#include "gbp-make-run-command-provider.h"
+
+struct _GbpMakeRunCommandProvider
+{
+  IdeObject parent_instance;
+};
+
+static void
+gbp_make_run_command_provider_list_commands_async (IdeRunCommandProvider *provider,
+                                                   GCancellable          *cancellable,
+                                                   GAsyncReadyCallback    callback,
+                                                   gpointer               user_data)
+{
+  GbpMakeRunCommandProvider *self = (GbpMakeRunCommandProvider *)provider;
+  g_autoptr(IdeRunCommand) run_command = NULL;
+  g_autoptr(GListStore) store = NULL;
+  g_autoptr(IdeTask) task = NULL;
+  IdeConfigManager *config_manager;
+  IdeBuildSystem *build_system;
+  IdeContext *context;
+  const char *make;
+  IdeConfig *config;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_MAKE_RUN_COMMAND_PROVIDER (self));
+  g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
+
+  task = ide_task_new (self, cancellable, callback, user_data);
+  ide_task_set_source_tag (task, gbp_make_run_command_provider_list_commands_async);
+
+  context = ide_object_get_context (IDE_OBJECT (self));
+  build_system = ide_build_system_from_context (context);
+  config_manager = ide_config_manager_from_context (context);
+  config = ide_config_manager_get_current (config_manager);
+
+  if (!GBP_IS_MAKE_BUILD_SYSTEM (build_system))
+    {
+      ide_task_return_new_error (task,
+                                 G_IO_ERROR,
+                                 G_IO_ERROR_NOT_SUPPORTED,
+                                 "Not a make build system");
+      IDE_EXIT;
+    }
+
+  if (!(make = ide_config_getenv (config, "MAKE")))
+    make = "make";
+
+  run_command = ide_run_command_new ();
+  ide_run_command_set_id (run_command, "make:run");
+  ide_run_command_set_priority (run_command, -500);
+  ide_run_command_set_display_name (run_command, _("Make Run"));
+  ide_run_command_set_argv (run_command, IDE_STRV_INIT (make, "run"));
+
+  store = g_list_store_new (IDE_TYPE_RUN_COMMAND);
+  g_list_store_append (store, run_command);
+  ide_task_return_pointer (task, g_steal_pointer (&store), g_object_unref);
+
+  IDE_EXIT;
+}
+
+static GListModel *
+gbp_make_run_command_provider_list_commands_finish (IdeRunCommandProvider  *provider,
+                                                    GAsyncResult           *result,
+                                                    GError                **error)
+{
+  GListModel *ret;
+
+  IDE_ENTRY;
+
+  g_assert (GBP_IS_MAKE_RUN_COMMAND_PROVIDER (provider));
+  g_assert (IDE_IS_TASK (result));
+
+  ret = ide_task_propagate_pointer (IDE_TASK (result), error);
+
+  IDE_RETURN (ret);
+}
+
+static void
+run_command_provider_iface_init (IdeRunCommandProviderInterface *iface)
+{
+  iface->list_commands_async = gbp_make_run_command_provider_list_commands_async;
+  iface->list_commands_finish = gbp_make_run_command_provider_list_commands_finish;
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpMakeRunCommandProvider, gbp_make_run_command_provider, IDE_TYPE_OBJECT,
+                               G_IMPLEMENT_INTERFACE (IDE_TYPE_RUN_COMMAND_PROVIDER, 
run_command_provider_iface_init))
+
+static void
+gbp_make_run_command_provider_class_init (GbpMakeRunCommandProviderClass *klass)
+{
+}
+
+static void
+gbp_make_run_command_provider_init (GbpMakeRunCommandProvider *self)
+{
+}
diff --git a/src/plugins/make/gbp-make-run-command-provider.h 
b/src/plugins/make/gbp-make-run-command-provider.h
new file mode 100644
index 000000000..20131024d
--- /dev/null
+++ b/src/plugins/make/gbp-make-run-command-provider.h
@@ -0,0 +1,32 @@
+/* gbp-make-run-command-provider.h
+ *
+ * Copyright 2017 Matthew Leeds <mleeds redhat com>
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <libide-core.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_MAKE_RUN_COMMAND_PROVIDER (gbp_make_run_command_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpMakeRunCommandProvider, gbp_make_run_command_provider, GBP, 
MAKE_RUN_COMMAND_PROVIDER, IdeObject)
+
+G_END_DECLS
diff --git a/src/plugins/make/gbp-make-template-provider.c b/src/plugins/make/gbp-make-template-provider.c
new file mode 100644
index 000000000..60c0c21bf
--- /dev/null
+++ b/src/plugins/make/gbp-make-template-provider.c
@@ -0,0 +1,51 @@
+/* gbp-make-template-provider.c
+ *
+ * Copyright 2017 Matthew Leeds <mleeds redhat com>
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "gbp-make-template-provider"
+
+#include "config.h"
+
+#include <libide-projects.h>
+
+#include "gbp-make-template-provider.h"
+
+struct _GbpMakeTemplateProvider
+{
+  GObject parent_instance;
+};
+
+static void
+template_provider_iface_init (IdeTemplateProviderInterface *iface)
+{
+}
+
+G_DEFINE_FINAL_TYPE_WITH_CODE (GbpMakeTemplateProvider, gbp_make_template_provider, G_TYPE_OBJECT,
+                               G_IMPLEMENT_INTERFACE (IDE_TYPE_TEMPLATE_PROVIDER, 
template_provider_iface_init))
+
+static void
+gbp_make_template_provider_class_init (GbpMakeTemplateProviderClass *klass)
+{
+}
+
+static void
+gbp_make_template_provider_init (GbpMakeTemplateProvider *self)
+{
+}
diff --git a/src/plugins/make/gbp-make-template-provider.h b/src/plugins/make/gbp-make-template-provider.h
new file mode 100644
index 000000000..04fa6c511
--- /dev/null
+++ b/src/plugins/make/gbp-make-template-provider.h
@@ -0,0 +1,32 @@
+/* gbp-make-template-provider.h
+ *
+ * Copyright 2017 Matthew Leeds <mleeds redhat com>
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_MAKE_TEMPLATE_PROVIDER (gbp_make_template_provider_get_type())
+
+G_DECLARE_FINAL_TYPE (GbpMakeTemplateProvider, gbp_make_template_provider, GBP, MAKE_TEMPLATE_PROVIDER, 
GObject)
+
+G_END_DECLS
diff --git a/src/plugins/make/gbp-make-template.h b/src/plugins/make/gbp-make-template.h
new file mode 100644
index 000000000..64ec3ff80
--- /dev/null
+++ b/src/plugins/make/gbp-make-template.h
@@ -0,0 +1,36 @@
+/* gbp-make-template.h
+ *
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#pragma once
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define GBP_TYPE_MAKE_TEMPLATE (gbp_make_template_get_type())
+
+G_DECLARE_DERIVABLE_TYPE (GbpMakeTemplate, gbp_make_template, GBP, MAKE_TEMPLATE, GObject)
+
+struct _GbpMakeTemplateClass
+{
+  GObjectClass parent_class;
+};
+
+G_END_DECLS
diff --git a/src/plugins/make/make-plugin.c b/src/plugins/make/make-plugin.c
new file mode 100644
index 000000000..3a73f19da
--- /dev/null
+++ b/src/plugins/make/make-plugin.c
@@ -0,0 +1,60 @@
+/* make-plugin.c
+ *
+ * Copyright 2017 Matthew Leeds <mleeds redhat com>
+ * Copyright 2022 Christian Hergert <chergert redhat com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+#define G_LOG_DOMAIN "make-plugin"
+
+#include "config.h"
+
+#include <libpeas/peas.h>
+
+#include <libide-editor.h>
+#include <libide-gui.h>
+#include <libide-tree.h>
+
+#include "gbp-make-build-system.h"
+#include "gbp-make-build-system-discovery.h"
+#include "gbp-make-build-target-provider.h"
+#include "gbp-make-pipeline-addin.h"
+#include "gbp-make-run-command-provider.h"
+#include "gbp-make-template-provider.h"
+
+_IDE_EXTERN void
+_gbp_make_register_types (PeasObjectModule *module)
+{
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_BUILD_SYSTEM,
+                                              GBP_TYPE_MAKE_BUILD_SYSTEM);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_BUILD_SYSTEM_DISCOVERY,
+                                              GBP_TYPE_MAKE_BUILD_SYSTEM_DISCOVERY);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_BUILD_TARGET_PROVIDER,
+                                              GBP_TYPE_MAKE_BUILD_TARGET_PROVIDER);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_PIPELINE_ADDIN,
+                                              GBP_TYPE_MAKE_PIPELINE_ADDIN);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_RUN_COMMAND_PROVIDER,
+                                              GBP_TYPE_MAKE_RUN_COMMAND_PROVIDER);
+  peas_object_module_register_extension_type (module,
+                                              IDE_TYPE_TEMPLATE_PROVIDER,
+                                              GBP_TYPE_MAKE_TEMPLATE_PROVIDER);
+}
diff --git a/src/plugins/make/make.gresource.xml b/src/plugins/make/make.gresource.xml
index 3b4574cbc..ea1d38eb0 100644
--- a/src/plugins/make/make.gresource.xml
+++ b/src/plugins/make/make.gresource.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
-  <gresource prefix="/plugins/make_plugin">
+  <gresource prefix="/plugins/make">
+    <file>make.plugin</file>
     <file compressed="true">resources/Makefile</file>
     <file compressed="true">resources/main.c</file>
     <file compressed="true">resources/main.cpp</file>
diff --git a/src/plugins/make/make.plugin b/src/plugins/make/make.plugin
index b3a28fa97..e1057bbe6 100644
--- a/src/plugins/make/make.plugin
+++ b/src/plugins/make/make.plugin
@@ -1,14 +1,12 @@
 [Plugin]
-Authors=Matthew Leeds <mleeds redhat com>
+Authors=Matthew Leeds <mleeds redhat com>, Christian Hergert <chergert redhat com>
 Builtin=true
-Copyright=Copyright © 2017 Matthew Leeds
-Description=Provides support for Makefile projects without autotools
-Loader=python3
-Module=make_plugin
-Name=Make
+Copyright=Copyright © 2017 Matthew Leeds, Copyright © 2022 Christian Hergert
+Description=Provides basic integration for Makefile projects
+Embedded=_gbp_make_register_types
+Module=make
+Name=Make Build System
 X-Category=buildsystems
-X-Has-Resources=true
 X-Project-File-Filter-Name=Makefile Project
 X-Project-File-Filter-Pattern=Makefile
 X-Project-File-Filter-Content-Type=text/x-makefile
-X-Builder-ABI=@PACKAGE_ABI@
diff --git a/src/plugins/make/meson.build b/src/plugins/make/meson.build
index f52cf32d7..352bbb2c9 100644
--- a/src/plugins/make/meson.build
+++ b/src/plugins/make/meson.build
@@ -1,21 +1,22 @@
 if get_option('plugin_make')
 
-make_resources = gnome.compile_resources(
-  'make_plugin',
+plugins_sources += files([
+  'make-plugin.c',
+  'gbp-make-build-system-discovery.c',
+  'gbp-make-build-system.c',
+  'gbp-make-build-target.c',
+  'gbp-make-build-target-provider.c',
+  'gbp-make-pipeline-addin.c',
+  'gbp-make-run-command-provider.c',
+  'gbp-make-template-provider.c',
+])
+
+plugin_make_resources = gnome.compile_resources(
+  'make-resources',
   'make.gresource.xml',
-  gresource_bundle: true,
-           install: true,
-       install_dir: plugindir,
+  c_name: 'gbp_make',
 )
 
-install_data('make_plugin.py', install_dir: plugindir)
-
-configure_file(
-          input: 'make.plugin',
-         output: 'make.plugin',
-  configuration: config_h,
-        install: true,
-    install_dir: plugindir,
-)
+plugins_sources += plugin_make_resources
 
 endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]