[gnome-builder] build: add PLUGIN_CFLAGS PLUGIN_LDFLAGS and PLUGIN_VALAFLAGS



commit 9e4cf3a4722851db631547490360c1b49f9501bc
Author: Christian Hergert <chergert redhat com>
Date:   Fri Mar 18 11:40:18 2016 -0700

    build: add PLUGIN_CFLAGS PLUGIN_LDFLAGS and PLUGIN_VALAFLAGS
    
    Add various variable helpers for plugins so that we don't duplicate all
    that effort. Many of them were inconsistent already, and this should help
    prevent that going forward.

 configure.ac                              |   38 +++++++++++++++++++++++++++++
 plugins/autotools/Makefile.am             |   13 +--------
 plugins/build-tools/Makefile.am           |   16 +----------
 plugins/c-pack/Makefile.am                |   13 +--------
 plugins/clang/Makefile.am                 |   21 ++-------------
 plugins/command-bar/Makefile.am           |   20 +-------------
 plugins/comment-code/Makefile.am          |   15 +----------
 plugins/create-project/Makefile.am        |   16 +----------
 plugins/ctags/Makefile.am                 |   14 +---------
 plugins/devhelp/Makefile.am               |   17 +-----------
 plugins/file-search/Makefile.am           |   18 ++-----------
 plugins/gcc/Makefile.am                   |   13 +--------
 plugins/gettext/Makefile.am               |   19 +-------------
 plugins/git/Makefile.am                   |   19 +-------------
 plugins/gnome-code-assistance/Makefile.am |   13 +--------
 plugins/html-completion/Makefile.am       |   15 +----------
 plugins/mingw/Makefile.am                 |   13 +--------
 plugins/project-tree/Makefile.am          |   19 ++------------
 plugins/python-pack/Makefile.am           |   13 +--------
 plugins/support/Makefile.am               |   16 +----------
 plugins/symbol-tree/Makefile.am           |   15 +----------
 plugins/sysmon/Makefile.am                |   19 ++------------
 plugins/terminal/Makefile.am              |   19 ++------------
 plugins/vala-pack/Makefile.am             |   22 +++-------------
 plugins/xdg-app/Makefile.am               |   17 +-----------
 plugins/xml-pack/Makefile.am              |   15 +----------
 26 files changed, 95 insertions(+), 353 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 2fad4aa..04f6bcb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -392,6 +392,44 @@ AC_MSG_RESULT([$enable_profiling])
 
 
 dnl ***********************************************************************
+dnl Setup common cflags and ldflags for plugins
+dnl ***********************************************************************
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_builddir)/contrib/egg"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_builddir)/libide"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_srcdir)/contrib/egg"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_srcdir)/contrib/gd"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_srcdir)/contrib/nautilus"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_srcdir)/contrib/rg"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_srcdir)/contrib/search"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_srcdir)/contrib/xml"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_srcdir)/libide"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_srcdir)/libide/editor"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_srcdir)/libide/genesis"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_srcdir)/libide/greeter"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_srcdir)/libide/preferences"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS -I\$(top_srcdir)/libide/util"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS $LIBIDE_CFLAGS"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS $DEBUG_CFLAGS"
+PLUGIN_CFLAGS="$PLUGIN_CFLAGS $OPTIMIZE_LDFLAGS"
+AC_SUBST(PLUGIN_CFLAGS)
+
+PLUGIN_LDFLAGS="$PLUGIN_LDFLAGS $OPTIMIZE_LDFLAGS"
+PLUGIN_LDFLAGS="$PLUGIN_LDFLAGS -avoid-version"
+PLUGIN_LDFLAGS="$PLUGIN_LDFLAGS -export-regex peas_register_types"
+PLUGIN_LDFLAGS="$PLUGIN_LDFLAGS -module"
+AC_SUBST(PLUGIN_LDFLAGS)
+
+PLUGIN_VALAFLAGS="$PLUGIN_VALAFLAGS --target-glib=2.44"
+PLUGIN_VALAFLAGS="$PLUGIN_VALAFLAGS --thread"
+PLUGIN_VALAFLAGS="$PLUGIN_VALAFLAGS --vapidir \$(top_builddir)/libide"
+PLUGIN_VALAFLAGS="$PLUGIN_VALAFLAGS --vapidir \$(top_builddir)/contrib/egg"
+PLUGIN_VALAFLAGS="$PLUGIN_VALAFLAGS --vapidir \$(top_builddir)/contrib/tmpl"
+PLUGIN_VALAFLAGS="$PLUGIN_VALAFLAGS --pkg libide-1.0"
+PLUGIN_VALAFLAGS="$PLUGIN_VALAFLAGS --pkg libpeas-1.0"
+AC_SUBST(PLUGIN_VALAFLAGS)
+
+
+dnl ***********************************************************************
 dnl Process .in Files
 dnl ***********************************************************************
 AC_CONFIG_FILES([
diff --git a/plugins/autotools/Makefile.am b/plugins/autotools/Makefile.am
index 9e880a3..195a390 100644
--- a/plugins/autotools/Makefile.am
+++ b/plugins/autotools/Makefile.am
@@ -20,17 +20,8 @@ libautotools_plugin_la_SOURCES = \
        ide-makecache-target.h \
        $(NULL)
 
-libautotools_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       -I$(top_srcdir)/contrib/egg \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       $(NULL)
-
-libautotools_plugin_la_LDFLAGS = \
-       -avoid-version \
-       -module \
-       $(NULL)
+libautotools_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libautotools_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 include $(top_srcdir)/plugins/Makefile.plugin
 
diff --git a/plugins/build-tools/Makefile.am b/plugins/build-tools/Makefile.am
index a5c0e51..7ccbfbd 100644
--- a/plugins/build-tools/Makefile.am
+++ b/plugins/build-tools/Makefile.am
@@ -33,20 +33,8 @@ nodist_libbuild_tools_plugin_la_SOURCES = \
        gbp-build-resources.c \
        gbp-build-resources.h
 
-libbuild_tools_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(OPTIMIZE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/contrib/egg \
-       $(NULL)
-
-libbuild_tools_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       -export-regex peas_register_types \
-       $(NULL)
+libbuild_tools_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libbuild_tools_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 glib_resources_c = gbp-build-resources.c
 glib_resources_h = gbp-build-resources.h
diff --git a/plugins/c-pack/Makefile.am b/plugins/c-pack/Makefile.am
index bacc8f6..77f672f 100644
--- a/plugins/c-pack/Makefile.am
+++ b/plugins/c-pack/Makefile.am
@@ -16,17 +16,8 @@ libc_pack_plugin_la_SOURCES = \
        ide-c-format-provider.h \
        $(NULL)
 
-libc_pack_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       $(NULL)
-
-libc_pack_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       $(NULL)
+libc_pack_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libc_pack_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 include $(top_srcdir)/plugins/Makefile.plugin
 
diff --git a/plugins/clang/Makefile.am b/plugins/clang/Makefile.am
index d1095c9..cd20fa7 100644
--- a/plugins/clang/Makefile.am
+++ b/plugins/clang/Makefile.am
@@ -32,24 +32,9 @@ libclang_plugin_la_SOURCES = \
        clang-plugin.c \
        $(NULL)
 
-libclang_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(CLANG_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/contrib/egg \
-       $(NULL)
-
-libclang_plugin_la_LIBADD = \
-       -lclang \
-       $(NULL)
-
-libclang_plugin_la_LDFLAGS = \
-       $(CLANG_LDFLAGS) \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       $(NULL)
+libclang_plugin_la_CFLAGS = $(PLUGIN_CFLAGS) $(CLANG_CFLAGS)
+libclang_plugin_la_LIBADD = -lclang
+libclang_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(CLANG_LDFLAGS)
 
 include $(top_srcdir)/plugins/Makefile.plugin
 
diff --git a/plugins/command-bar/Makefile.am b/plugins/command-bar/Makefile.am
index 571c607..f3f426c 100644
--- a/plugins/command-bar/Makefile.am
+++ b/plugins/command-bar/Makefile.am
@@ -34,24 +34,8 @@ libcommand_bar_la_SOURCES = \
        gb-vim.h \
        $(NULL)
 
-libcommand_bar_la_CFLAGS = \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/libide/editor \
-       -I$(top_srcdir)/libide/util \
-       -I$(top_srcdir)/contrib/egg \
-       -I$(top_srcdir)/contrib/gd \
-       -I$(top_srcdir)/contrib/nautilus \
-       $(LIBIDE_CFLAGS) \
-       $(DEBUG_CFLAGS) \
-       $(OPTIMIZE_CFLAGS) \
-       $(NULL)
-
-libcommand_bar_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       $(NULL)
+libcommand_bar_la_CFLAGS = $(PLUGIN_CFLAGS)
+libcommand_bar_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 glib_resources_c = gb-command-bar-resources.c
 glib_resources_h = gb-command-bar-resources.h
diff --git a/plugins/comment-code/Makefile.am b/plugins/comment-code/Makefile.am
index 6bbfac5..616b811 100644
--- a/plugins/comment-code/Makefile.am
+++ b/plugins/comment-code/Makefile.am
@@ -19,19 +19,8 @@ nodist_libcomment_code_plugin_la_SOURCES = \
        gbp-comment-code-resources.c \
        gbp-comment-code-resources.h
 
-libcomment_code_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(OPTIMIZE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       $(NULL)
-
-libcomment_code_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       -export-regex peas_register_types \
-       $(NULL)
+libcomment_code_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libcomment_code_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 glib_resources_c = gbp-comment-code-resources.c
 glib_resources_h = gbp-comment-code-resources.h
diff --git a/plugins/create-project/Makefile.am b/plugins/create-project/Makefile.am
index 630cf56..93689c7 100644
--- a/plugins/create-project/Makefile.am
+++ b/plugins/create-project/Makefile.am
@@ -19,20 +19,8 @@ nodist_libcreate_project_plugin_la_SOURCES = \
        gbp-create-project-resources.c \
        gbp-create-project-resources.h
 
-libcreate_project_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(OPTIMIZE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/contrib/egg \
-       $(NULL)
-
-libcreate_project_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       -export-regex peas_register_types \
-       $(NULL)
+libcreate_project_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libcreate_project_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 glib_resources_c = gbp-create-project-resources.c
 glib_resources_h = gbp-create-project-resources.h
diff --git a/plugins/ctags/Makefile.am b/plugins/ctags/Makefile.am
index e6ffaf7..2436c7d 100644
--- a/plugins/ctags/Makefile.am
+++ b/plugins/ctags/Makefile.am
@@ -25,18 +25,8 @@ libctags_plugin_la_SOURCES = \
        ctags-plugin.c \
        $(NULL)
 
-libctags_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       -I$(top_srcdir)/contrib/egg \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/libide/util \
-       $(NULL)
-
-libctags_plugin_la_LDFLAGS = \
-       -avoid-version \
-       -module \
-       $(NULL)
+libctags_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libctags_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 include $(top_srcdir)/plugins/Makefile.plugin
 
diff --git a/plugins/devhelp/Makefile.am b/plugins/devhelp/Makefile.am
index 4705b12..4025fdd 100644
--- a/plugins/devhelp/Makefile.am
+++ b/plugins/devhelp/Makefile.am
@@ -29,22 +29,9 @@ nodist_libdevhelp_plugin_la_SOURCES = \
        gbp-devhelp-resources.c \
        gbp-devhelp-resources.h
 
-libdevhelp_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(DEVHELP_CFLAGS) \
-       $(OPTIMIZE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       $(NULL)
-
+libdevhelp_plugin_la_CFLAGS = $(PLUGIN_CFLAGS) $(DEVHELP_CFLAGS)
 libdevhelp_plugin_la_LIBADD = $(DEVHELP_LIBS)
-
-libdevhelp_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       -export-regex peas_register_types \
-       $(NULL)
+libdevhelp_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 glib_resources_c = gbp-devhelp-resources.c
 glib_resources_h = gbp-devhelp-resources.h
diff --git a/plugins/file-search/Makefile.am b/plugins/file-search/Makefile.am
index 070f516..f9fa27b 100644
--- a/plugins/file-search/Makefile.am
+++ b/plugins/file-search/Makefile.am
@@ -13,21 +13,9 @@ libfile_search_la_SOURCES = \
        gb-file-search-index.h \
        $(NULL)
 
-libfile_search_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/contrib/search \
-       $(NULL)
-
-libfile_search_la_LIBADD = \
-       $(top_builddir)/contrib/search/libsearch.la \
-       $(NULL)
-
-libfile_search_la_LDFLAGS = \
-       -module \
-       -avoid-version \
-       $(NULL)
+libfile_search_la_CFLAGS = $(PLUGIN_CFLAGS)
+libfile_search_la_LIBADD = $(top_builddir)/contrib/search/libsearch.la
+libfile_search_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 -include $(top_srcdir)/git.mk
 
diff --git a/plugins/gcc/Makefile.am b/plugins/gcc/Makefile.am
index c1fccfe..b772044 100644
--- a/plugins/gcc/Makefile.am
+++ b/plugins/gcc/Makefile.am
@@ -11,17 +11,8 @@ libgcc_plugin_la_SOURCES = \
        gbp-gcc-build-result-addin.h \
        gbp-gcc-plugin.c
 
-libgcc_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       -I$(top_srcdir)/contrib/egg \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide
-
-libgcc_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -export-regex peas_register_types \
-       -module
+libgcc_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libgcc_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 include $(top_srcdir)/plugins/Makefile.plugin
 
diff --git a/plugins/gettext/Makefile.am b/plugins/gettext/Makefile.am
index 02bed26..3b83e91 100644
--- a/plugins/gettext/Makefile.am
+++ b/plugins/gettext/Makefile.am
@@ -12,23 +12,8 @@ libgettext_plugin_la_SOURCES = \
        gettext-plugin.c \
        $(NULL)
 
-libgettext_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(GETTEXT_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/contrib/egg \
-       $(NULL)
-
-libgettext_plugin_la_LIBADD = \
-       $(NULL)
-
-libgettext_plugin_la_LDFLAGS = \
-       $(GETTEXT_LDFLAGS) \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       $(NULL)
+libgettext_plugin_la_CFLAGS = $(PLUGIN_CFLAGS) $(GETTEXT_CFLAGS)
+libgettext_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 include $(top_srcdir)/plugins/Makefile.plugin
 
diff --git a/plugins/git/Makefile.am b/plugins/git/Makefile.am
index ecb515f..3c609f6 100644
--- a/plugins/git/Makefile.am
+++ b/plugins/git/Makefile.am
@@ -29,24 +29,9 @@ nodist_libgit_plugin_la_SOURCES = \
        ide-git-resources.c \
        ide-git-resources.h
 
-libgit_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(GIT_CFLAGS) \
-       $(OPTIMIZE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/contrib/egg \
-       $(NULL)
-
+libgit_plugin_la_CFLAGS = $(PLUGIN_CFLAGS) $(GIT_CFLAGS)
 libgit_plugin_la_LIBADD = $(GIT_LIBS)
-
-libgit_plugin_la_LDFLAGS = \
-       $(GIT_LIBS) \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       -export-regex peas_register_types \
-       $(NULL)
+libgit_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 glib_resources_c = ide-git-resources.c
 glib_resources_h = ide-git-resources.h
diff --git a/plugins/gnome-code-assistance/Makefile.am b/plugins/gnome-code-assistance/Makefile.am
index 4ba4a69..3935d6d 100644
--- a/plugins/gnome-code-assistance/Makefile.am
+++ b/plugins/gnome-code-assistance/Makefile.am
@@ -20,17 +20,8 @@ libgnome_code_assistance_plugin_la_SOURCES = \
        ide-gca-service.h \
        $(NULL)
 
-libgnome_code_assistance_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       $(NULL)
-
-libgnome_code_assistance_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       $(NULL)
+libgnome_code_assistance_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libgnome_code_assistance_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 gsettings_SCHEMAS = org.gnome.builder.gnome-code-assistance.gschema.xml
 
diff --git a/plugins/html-completion/Makefile.am b/plugins/html-completion/Makefile.am
index 3705250..1937cf5 100644
--- a/plugins/html-completion/Makefile.am
+++ b/plugins/html-completion/Makefile.am
@@ -11,19 +11,8 @@ libhtml_completion_plugin_la_SOURCES = \
        ide-html-completion-provider.h \
        $(NULL)
 
-libhtml_completion_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(OPTIMIZE_CFLAGS) \
-       -I$(top_srcdir)/contrib/search \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       $(NULL)
-
-libhtml_completion_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       $(NULL)
+libhtml_completion_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libhtml_completion_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 include $(top_srcdir)/plugins/Makefile.plugin
 
diff --git a/plugins/mingw/Makefile.am b/plugins/mingw/Makefile.am
index 4d78aa3..cacdb83 100644
--- a/plugins/mingw/Makefile.am
+++ b/plugins/mingw/Makefile.am
@@ -14,17 +14,8 @@ libmingw_plugin_la_SOURCES = \
        ide-mingw-device-provider.h \
        $(NULL)
 
-libmingw_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       $(NULL)
-
-libmingw_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       $(NULL)
+libmingw_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libmingw_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 include $(top_srcdir)/plugins/Makefile.plugin
 
diff --git a/plugins/project-tree/Makefile.am b/plugins/project-tree/Makefile.am
index b473700..202576a 100644
--- a/plugins/project-tree/Makefile.am
+++ b/plugins/project-tree/Makefile.am
@@ -34,28 +34,15 @@ nodist_libproject_tree_plugin_la_SOURCES = \
        gb-project-tree-resources.c \
        gb-project-tree-resources.h
 
-libproject_tree_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(OPTIMIZE_CFLAGS) \
-       $(DEBUG_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       $(NULL)
-
-libproject_tree_plugin_la_LIBADD =
-
+libproject_tree_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libproject_tree_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 if ENABLE_TERMINAL_PLUGIN
-libproject_tree_plugin_la_LIBADD += $(TERMINAL_LIBS)
+libproject_tree_plugin_la_LIBADD = $(TERMINAL_LIBS)
 libproject_tree_plugin_la_CFLAGS += \
        $(TERMINAL_CFLAGS) \
        -DHAVE_VTE
 endif
 
-libproject_tree_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       $(NULL)
 
 glib_resources_c = gb-project-tree-resources.c
 glib_resources_h = gb-project-tree-resources.h
diff --git a/plugins/python-pack/Makefile.am b/plugins/python-pack/Makefile.am
index 7ce0dda..40f1793 100644
--- a/plugins/python-pack/Makefile.am
+++ b/plugins/python-pack/Makefile.am
@@ -14,17 +14,8 @@ libpython_pack_plugin_la_SOURCES = \
        python-pack-plugin.c \
        $(NULL)
 
-libpython_pack_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       $(NULL)
-
-libpython_pack_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       $(NULL)
+libpython_pack_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libpython_pack_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 include $(top_srcdir)/plugins/Makefile.plugin
 
diff --git a/plugins/support/Makefile.am b/plugins/support/Makefile.am
index 7c9b0ec..b44730b 100644
--- a/plugins/support/Makefile.am
+++ b/plugins/support/Makefile.am
@@ -21,20 +21,8 @@ nodist_libsupport_plugin_la_SOURCES = \
        ide-support-resources.c \
        ide-support-resources.h
 
-libsupport_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(OPTIMIZE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/contrib/egg \
-       $(NULL)
-
-libsupport_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       -export-regex peas_register_types \
-       $(NULL)
+libsupport_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libsupport_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 glib_resources_c = ide-support-resources.c
 glib_resources_h = ide-support-resources.h
diff --git a/plugins/symbol-tree/Makefile.am b/plugins/symbol-tree/Makefile.am
index 6155560..992be03 100644
--- a/plugins/symbol-tree/Makefile.am
+++ b/plugins/symbol-tree/Makefile.am
@@ -22,19 +22,8 @@ nodist_libsymbol_tree_la_SOURCES = \
        symbol-tree-resources.c \
        symbol-tree-resources.h
 
-libsymbol_tree_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(OPTIMIZE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/contrib/egg \
-       $(NULL)
-
-libsymbol_tree_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       $(NULL)
+libsymbol_tree_la_CFLAGS = $(PLUGIN_CFLAGS)
+libsymbol_tree_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 glib_resources_c = symbol-tree-resources.c
 glib_resources_h = symbol-tree-resources.h
diff --git a/plugins/sysmon/Makefile.am b/plugins/sysmon/Makefile.am
index d3f0f54..8dcbe5c 100644
--- a/plugins/sysmon/Makefile.am
+++ b/plugins/sysmon/Makefile.am
@@ -21,22 +21,9 @@ nodist_libsysmon_la_SOURCES = \
        gb-sysmon-resources.h \
        $(NULL)
 
-libsysmon_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/contrib/egg \
-       -I$(top_srcdir)/contrib/rg \
-       $(NULL)
-
-libsysmon_la_LIBADD = \
-       $(top_builddir)/contrib/rg/librg.la \
-       $(NULL)
-
-libsysmon_la_LDFLAGS = \
-       -avoid-version \
-       -module \
-       $(NULL)
+libsysmon_la_CFLAGS = $(PLUGIN_CFLAGS)
+libsysmon_la_LIBADD = $(top_builddir)/contrib/rg/librg.la
+libsysmon_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 glib_resources_c = gb-sysmon-resources.c
 glib_resources_h = gb-sysmon-resources.h
diff --git a/plugins/terminal/Makefile.am b/plugins/terminal/Makefile.am
index f164254..5b84287 100644
--- a/plugins/terminal/Makefile.am
+++ b/plugins/terminal/Makefile.am
@@ -30,22 +30,9 @@ nodist_libterminal_la_SOURCES = \
        gb-terminal-resources.h \
        $(NULL)
 
-libterminal_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(TERMINAL_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/contrib/egg \
-       $(NULL)
-
-libterminal_la_LIBADD = \
-       $(TERMINAL_LIBS) \
-       $(NULL)
-
-libterminal_la_LDFLAGS = \
-       -avoid-version \
-       -module \
-       $(NULL)
+libterminal_la_CFLAGS = $(PLUGIN_CFLAGS) $(TERMINAL_CFLAGS)
+libterminal_la_LIBADD = $(TERMINAL_LIBS)
+libterminal_la_LDFLAGS = $(PLUGIN_CFLAGS)
 
 glib_resources_c = gb-terminal-resources.c
 glib_resources_h = gb-terminal-resources.h
diff --git a/plugins/vala-pack/Makefile.am b/plugins/vala-pack/Makefile.am
index 5da31ca..005b35e 100644
--- a/plugins/vala-pack/Makefile.am
+++ b/plugins/vala-pack/Makefile.am
@@ -64,14 +64,8 @@ nodist_libvala_pack_plugin_la_SOURCES = \
 CLEANFILES = $(BUILT_SOURCES) $(nodist_libvala_pack_plugin_la_SOURCES)
 
 libvala_pack_plugin_la_VALAFLAGS = \
-       --target-glib=2.44 \
-       --thread \
-       --vapidir $(top_builddir)/libide \
-       --vapidir $(top_builddir)/contrib/egg \
-       --vapidir $(top_builddir)/contrib/tmpl \
+       $(PLUGIN_VALAFLAGS) \
        --pkg gtksourceview-3.0 \
-       --pkg libide-1.0 \
-       --pkg libpeas-1.0 \
        --pkg libvala-$(VALA_VERSION) \
        --pkg posix \
        --pkg template-glib-1.0 \
@@ -85,12 +79,8 @@ libvala_pack_plugin_la_CFLAGS = \
        -DPACKAGE_DATADIR=\""$(datadir)/gnome-builder"\" \
        -DG_LOG_DOMAIN=\"vala-pack-plugin\" \
        -DGETTEXT_PACKAGE=\"gnome-builder\" \
-       $(LIBIDE_CFLAGS) \
+       $(PLUGIN_CFLAGS) \
        $(VALA_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/contrib/egg \
-       -I$(top_srcdir)/contrib/tmpl \
        -Wno-deprecated-declarations \
        -Wno-discarded-qualifiers \
        -Wno-implicit-function-declaration \
@@ -100,12 +90,8 @@ libvala_pack_plugin_la_CFLAGS = \
        -Wno-unused-function \
        $(NULL)
 
-libvala_pack_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       $(VALA_LIBS) \
-       -avoid-version \
-       -module \
-       $(NULL)
+libvala_pack_plugin_la_LIBADD = $(VALA_LIBS)
+libvala_pack_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 include $(top_srcdir)/plugins/Makefile.plugin
 
diff --git a/plugins/xdg-app/Makefile.am b/plugins/xdg-app/Makefile.am
index dadda63..67a3ba8 100644
--- a/plugins/xdg-app/Makefile.am
+++ b/plugins/xdg-app/Makefile.am
@@ -17,22 +17,9 @@ libxdg_app_plugin_la_SOURCES = \
        gbp-xdg-plugin.c \
        $(NULL)
 
-libxdg_app_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       $(XDG_APP_CFLAGS) \
-       $(OPTIMIZE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       $(NULL)
-
+libxdg_app_plugin_la_CFLAGS = $(PLUGIN_CFLAGS) $(XDG_APP_CFLAGS)
 libxdg_app_plugin_la_LIBADD = $(XDG_APP_LIBS)
-
-libxdg_app_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       -export-regex peas_register_types \
-       $(NULL)
+libxdg_app_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 include $(top_srcdir)/plugins/Makefile.plugin
 
diff --git a/plugins/xml-pack/Makefile.am b/plugins/xml-pack/Makefile.am
index 398f0e7..c700f64 100644
--- a/plugins/xml-pack/Makefile.am
+++ b/plugins/xml-pack/Makefile.am
@@ -16,19 +16,8 @@ libxml_pack_plugin_la_SOURCES = \
        xml-pack-plugin.c \
        $(NULL)
 
-libxml_pack_plugin_la_CFLAGS = \
-       $(LIBIDE_CFLAGS) \
-       -I$(top_srcdir)/libide \
-       -I$(top_builddir)/libide \
-       -I$(top_srcdir)/contrib/egg \
-       -I$(top_srcdir)/contrib/xml \
-       $(NULL)
-
-libxml_pack_plugin_la_LDFLAGS = \
-       $(OPTIMIZE_LDFLAGS) \
-       -avoid-version \
-       -module \
-       $(NULL)
+libxml_pack_plugin_la_CFLAGS = $(PLUGIN_CFLAGS)
+libxml_pack_plugin_la_LDFLAGS = $(PLUGIN_LDFLAGS)
 
 include $(top_srcdir)/plugins/Makefile.plugin
 


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