[gedit-plugins] Non recursive make



commit 8949e6d6da85a26076064f20b4cf756dc7e6ea5d
Author: Jesse van den Kieboom <jessevdk gmail com>
Date:   Sat Jan 11 16:48:34 2014 +0100

    Non recursive make

 Makefile.am                                      |    9 +-
 configure.ac                                     |  273 +++++-----------------
 plugins/Makefile.am                              |   59 ++++-
 plugins/bookmarks/Makefile.am                    |   72 +++----
 plugins/bracketcompletion/Makefile.am            |   21 +--
 plugins/charmap/Makefile.am                      |   25 +--
 plugins/charmap/charmap/Makefile.am              |   11 -
 plugins/codecomment/Makefile.am                  |   22 +--
 plugins/colorpicker/Makefile.am                  |   24 +--
 plugins/colorschemer/Makefile.am                 |   36 ++--
 plugins/colorschemer/{schemer => }/schemer.ui    |    0
 plugins/commander/Makefile.am                    |   69 ++++--
 plugins/commander/commander/Makefile.am          |   17 --
 plugins/commander/commander/commands/Makefile.am |   16 --
 plugins/commander/modules/Makefile.am            |   21 --
 plugins/commander/modules/find/Makefile.am       |   10 -
 plugins/dashboard/Makefile.am                    |   25 +--
 plugins/dashboard/dashboard/Makefile.am          |   10 -
 plugins/drawspaces/Makefile.am                   |   71 +++---
 plugins/git/Makefile.am                          |   32 +--
 plugins/git/git/Makefile.am                      |   11 -
 plugins/joinlines/Makefile.am                    |   22 +--
 plugins/multiedit/Makefile.am                    |   31 +--
 plugins/multiedit/multiedit/Makefile.am          |   10 -
 plugins/smartspaces/Makefile.am                  |   26 +--
 plugins/synctex/Makefile.am                      |   26 +--
 plugins/synctex/synctex/Makefile.am              |   12 -
 plugins/terminal/Makefile.am                     |   31 +--
 plugins/textsize/Makefile.am                     |   31 +--
 plugins/textsize/textsize/Makefile.am            |   10 -
 plugins/wordcompletion/Makefile.am               |   68 +++---
 po/POTFILES.in                                   |    2 +-
 32 files changed, 378 insertions(+), 725 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 71a0f52..5f69e07 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = help plugins po
+SUBDIRS = help po
 
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
@@ -10,6 +10,9 @@ EXTRA_DIST =                  \
        intltool-merge.in       \
        intltool-update.in
 
+CLEANFILES =
+BUILT_SOURCES =
+
 DISTCLEANFILES =               \
        intltool-extract        \
        intltool-merge          \
@@ -36,7 +39,9 @@ MAINTAINERCLEANFILES =                \
        m4/lt~obsolete.m4       \
        `find "$(srcdir)" -type f -name Makefile.in -print`
 
-DISTCHECK_CONFIGURE_FLAGS = --with-plugins=really-all
+DISTCHECK_CONFIGURE_FLAGS = --enable-verify-all
+
+include plugins/Makefile.am
 
 CHANGELOG_START = GEDIT_PLUGINS_2_26_1
 
diff --git a/configure.ac b/configure.ac
index 5c9c458..3789e70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,10 +15,9 @@ AC_INIT([gedit-plugins],
 AC_CONFIG_HEADERS([config.h])
 AC_CONFIG_SRCDIR([plugins])
 AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_AUX_DIR([build-aux])
 AC_PREFIX_PROGRAM([gedit])
 
-AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip])
+AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip subdir-objects -Wno-portability])
 AM_MAINTAINER_MODE([enable])
 
 AM_SILENT_RULES([yes])
@@ -82,221 +81,91 @@ GLIB_GSETTINGS
 # Plugins
 # ================================================================
 
-#FIXME
-GEDIT_HAS_PYTHON=1
-#/FIXME
+AC_ARG_ENABLE([verify-all],
+              AC_HELP_STRING([--enable-verify-all], [verify that all plugins are enabled]),
+              [enable_verify_all=$enableval],
+              [enable_verify_all="no"])
 
-AC_MSG_CHECKING([which plugins to build])
+# C plugins that don't need special dependencies
+C_PLUGINS="bookmarks drawspaces wordcompletion"
 
-ALL_PLUGINS="bookmarks drawspaces wordcompletion"
-USEFUL_PLUGINS="bookmarks drawspaces wordcompletion"
-DEFAULT_PLUGINS="bookmarks drawspaces wordcompletion"
-
-PYTHON_ALL_PLUGINS="bracketcompletion charmap codecomment colorpicker colorschemer commander dashboard git 
joinlines multiedit textsize smartspaces terminal synctex"
-PYTHON_USEFUL_PLUGINS="bracketcompletion charmap codecomment colorpicker colorschemer commander dashboard 
git joinlines multiedit textsize smartspaces terminal synctex"
-PYTHON_DEFAULT_PLUGINS="bracketcompletion charmap codecomment colorpicker colorschemer commander dashboard 
git joinlines multiedit textsize smartspaces terminal synctex"
-
-DIST_PLUGINS="$ALL_PLUGINS $PYTHON_ALL_PLUGINS"
-
-if test $GEDIT_HAS_PYTHON
-then
-       ALL_PLUGINS="$ALL_PLUGINS $PYTHON_ALL_PLUGINS"
-       USEFUL_PLUGINS="$USEFUL_PLUGINS $PYTHON_USEFUL_PLUGINS"
-       DEFAULT_PLUGINS="$DEFAULT_PLUGINS $PYTHON_DEFAULT_PLUGINS"
-else
-       AC_MSG_WARN([gedit compiled without python support, plugins $PYTHON_ALL_PLUGINS will not be 
available])
-fi
-
-# due to an autoconf bug, commas in the first arg to
-# AS_HELP_STRING() cause problems.
-#
-# AS_HELP_STRING(--with-plugins=ext1,ext2,...,build the specified plugins)
-AC_ARG_WITH([plugins],
-[  --with-plugins=plugin1,plugin2,...
-                         build the specified plugins. Available:
-                         bracketcompletion, charmap, codecomment,
-                         colorpicker, drawspaces, git, joinlines, multiedit,
-                         textsize, smartspaces,
-                         terminal, wordcompletion, as well as the aliases
-                         default, all, and really-all],
-                         [plugins=$with_plugins],
-                         [plugins="default"])
-
-if test "x$with_plugins" = xyes
-then
-       plugins="default"
-fi
-
-need_python=no
-explicit_plugins=
-PLUGINS=
-IFS="${IFS=    }"; geditpl_save_ifs="$IFS"; IFS=","
-for pl in $plugins
-do
-       if echo "$ALL_PLUGINS" | egrep "(^| )$pl(\$| )" > /dev/null
-       then
-               PLUGINS="$PLUGINS $pl"
-               explicit_plugins="$explicit_plugins $pl"
-       elif test "x$pl" = "xdefault"
-       then
-               PLUGINS="$PLUGINS $DEFAULT_PLUGINS"
-       elif test "x$pl" = "xall"
-       then
-               PLUGINS="$PLUGINS $USEFUL_PLUGINS"
-       elif test "x$pl" = "xreally-all"
-       then
-               PLUGINS="$PLUGINS $ALL_PLUGINS"
-       else
-               AC_MSG_ERROR([the specified plugin $pl does not exist])
-       fi
-       
-       if echo "$PYTHON_ALL_PLUGINS" | egrep "(^| )$pl(\$| )" > /dev/null
-       then
-               need_python=yes
-       fi
-done
-IFS="$geditpl_save_ifs"
-
-AC_MSG_RESULT([$PLUGINS])
+# Python plugins that don't need special dependencies, besides python
+PY_PLUGINS="bracketcompletion charmap codecomment colorpicker colorschemer commander dashboard joinlines 
multiedit smartspaces textsize"
 
+PLUGINS="$C_PLUGINS"
+disabled_plugins=""
 
 # ================================================================
 # Python
 # ================================================================
-
 AC_MSG_CHECKING([whether Python support is requested])
 AC_ARG_ENABLE([python],
-             AS_HELP_STRING([--enable-python], [Enable python support]),
-             [enable_python=$enableval],
-             [enable_python="yes"])
-
-AM_CONDITIONAL([ENABLE_PYTHON],[test "x$enable_python" = "xyes"])
+              AS_HELP_STRING([--enable-python], [Enable python support]),
+              [enable_python=$enableval],
+              [enable_python="yes"])
 
-disabled_plugins=
-# ================================================================
-# Plugin specific checks
-# ================================================================
-check_plugin_defined() {
-       for p in $2
-       do
-               if test "$p" = "$1"
-               then
-                       return 1
-               fi
-       done
-       return 0
-}
-
-plugin_defined() {
-       check_plugin_defined "$1" "$PLUGINS"
-       return $?
-}
-
-plugin_defined_explicit() {
-       check_plugin_defined "$1" "$explicit_plugins"
-       return $?
-}
-
-undef_plugin() {
-       if test -z "$disabled_plugins"
-       then
-               disabled_plugins="$1 ($2)"
-       else
-               disabled_plugins="$disabled_plugins, $1 ($2)"
-       fi
-       
-       PLUGINS=$(echo "$PLUGINS" | sed -e "s/[[^a-zA-Z0-9_]]$1[[ \t\r\n\f]]\{1,\}/ /" -e 
"s/[[^a-zA-Z0-9_]]$1$//" -e "s/^$1[[ \t\r\n\f]]\{1,\}//")
-}
+AM_CONDITIONAL([ENABLE_PYTHON], [test "x$enable_python" = "xyes"])
 
 # ================================================================
 # disable all python plugins if there is no python support
 # ================================================================
-if test "x$enable_python" = "xno"
+if test "x$enable_python" = "xyes"
 then
-       for pl in $PYTHON_ALL_PLUGINS
-       do
-               undef_plugin "$pl" "no python support"
-       done
-fi
+       PLUGINS="$PLUGINS $PY_PLUGINS"
 
-# ================================================================
-# Synctex (dbus-python)
-# ================================================================
-plugin_defined synctex
-if test "$?" = 1
-then
+       # ================================================================
+       # Synctex (dbus-python)
+       # ================================================================
        DBUSPYTHON_REQUIRED=0.82
        PKG_CHECK_MODULES([DBUSPYTHON],
                [dbus-python >= $DBUSPYTHON_REQUIRED],
-               [have_synctex=yes],[have_synctex=no])
+               [have_synctex=yes],
+               [have_synctex=no])
 
        AC_SUBST([DBUS_PYTHON_CFLAGS])
        AC_SUBST([DBUS_PYTHON_LIBS])
 
-       if test "x$have_synctex" = "xno"; then
-               plugin_defined_explicit synctex
-               if test "$?" = 1
-               then
-                       AC_MSG_ERROR([dbus-python could not be found, needed for synctex plugin])
-               else
-                       AC_MSG_WARN([dbus-python could not be found, synctex plugin will be disabled])
-                       undef_plugin synctex "dbus-python not found"
-               fi
+       if test "x$have_synctex" = "xyes"; then
+               PLUGINS="$PLUGINS synctex"
+       else
+               disabled_plugins="$disabled_plugins synctex (dbus-python not found)"
        fi
-fi
 
-# ================================================================
-# Terminal (vte)
-# ================================================================
-plugin_defined terminal
-
-if test "$?" = 1
-then
-    AC_CHECK_LIB([vte2_90], [vte_terminal_new], [have_vte=yes], [have_vte=no])
-
-       if test "x$have_vte" = "xno"; then
-               plugin_defined_explicit terminal
-               if test "$?" = 1
-               then
-                       AC_MSG_ERROR([vte could not be found, needed for terminal plugin])
-               else
-                       AC_MSG_WARN([vte could not be found, terminal plugin will be disabled])
-                       undef_plugin terminal "vte not found"
-               fi
+       # ================================================================
+       # Terminal (vte)
+       # ================================================================
+       if `$PYTHON -c "import gi; gi.require_version('Vte', '2.90')" 2>/dev/null`;
+       then
+               have_vte=yes
+               PLUGINS="$PLUGINS terminal"
+       else
+               have_vte=no
+               disabled_plugins="$disabled_plugins terminal (vte not found)"
        fi
-fi
 
-# ================================================================
-# Git (libgit2-glib)
-# ================================================================
-plugin_defined git
-if test "$?" = 1
-then
+       # ================================================================
+       # Git (libgit2-glib)
+       # ================================================================
        LIBGIT2_GLIB_REQUIRED=0.0.6
        PKG_CHECK_MODULES([GIT2_GLIB],
                [libgit2-glib-1.0 >= $LIBGIT2_GLIB_REQUIRED],
-               [have_git2=yes],[have_git2=no])
-
-       if test "x$have_git2" = "xno"; then
-               plugin_defined_explicit git
-               if test "$?" = 1
-               then
-                       AC_MSG_ERROR([libgit2-glib could not be found, needed for git plugin])
-               else
-                       AC_MSG_WARN([libgit2-glib could not be found, git plugin will be disabled])
-                       undef_plugin git "libgit2-glib not found"
-               fi
+               [have_git2=yes],
+               [have_git2=no])
+
+       if test "x$have_git2" = "xyes"; then
+               PLUGINS="$PLUGINS git"
+       else
+               disabled_plugins="$disabled_plugins git"
        fi
+else
+       disabled_plugins="$disabled_plugins $PY_PLUGINS synctex vte git (python not found)"
 fi
 
-if test -z "$disabled_plugins"
-then
-       disabled_plugins="none"
-fi
+AM_CONDITIONAL([ENABLE_SYNCTEX], test "x$have_synctex" = "xyes")
+AM_CONDITIONAL([ENABLE_TERMINAL], test "x$have_vte" = "xyes")
+AM_CONDITIONAL([ENABLE_GIT], test "x$have_git2" = "xyes")
 
-PLUGINS=$(echo $PLUGINS | tr ' ' '\n' | sort | uniq | tr '\n' ' ')
-AC_SUBST([DIST_PLUGINS])
-AC_SUBST([BUILD_PLUGINS],[$PLUGINS])
+AC_SUBST(PLUGINS)
 
 # ================================================================
 # Misc
@@ -337,57 +206,32 @@ AC_SUBST(GEDIT_PLUGINS_LIBS_DIR)
 GEDIT_PLUGINS_DATA_DIR="$datadir/gedit/plugins"
 AC_SUBST(GEDIT_PLUGINS_DATA_DIR)
 
+if test "x$enable_verify_all" != "xno" && test ! -z "$disabled_plugins"; then
+AC_MSG_ERROR([some plugins are not being built: $disabled_plugins])
+fi
+
 AC_CONFIG_FILES([
 Makefile
 help/Makefile
 plugins/gpdefs.py
-plugins/Makefile
 plugins/bookmarks/bookmarks.plugin.desktop.in
-plugins/bookmarks/Makefile
 plugins/bracketcompletion/bracketcompletion.plugin.desktop.in
-plugins/bracketcompletion/Makefile
 plugins/charmap/charmap.plugin.desktop.in
-plugins/charmap/Makefile
-plugins/charmap/charmap/Makefile
 plugins/codecomment/codecomment.plugin.desktop.in
-plugins/codecomment/Makefile
 plugins/colorpicker/colorpicker.plugin.desktop.in
-plugins/colorpicker/Makefile
-plugins/colorschemer/schemer/Makefile
 plugins/colorschemer/colorschemer.plugin.desktop.in
-plugins/colorschemer/Makefile
-plugins/commander/commander/commands/Makefile
 plugins/commander/commander.plugin.desktop.in
-plugins/commander/commander/Makefile
-plugins/commander/Makefile
-plugins/commander/modules/find/Makefile
-plugins/commander/modules/Makefile
-plugins/dashboard/dashboard/Makefile
 plugins/dashboard/dashboard.plugin.desktop.in
-plugins/dashboard/Makefile
 plugins/drawspaces/drawspaces.plugin.desktop.in
-plugins/drawspaces/Makefile
 plugins/drawspaces/org.gnome.gedit.plugins.drawspaces.gschema.xml.in
 plugins/git/git.plugin.desktop.in
-plugins/git/git/Makefile
-plugins/git/Makefile
 plugins/joinlines/joinlines.plugin.desktop.in
-plugins/joinlines/Makefile
-plugins/multiedit/Makefile
 plugins/multiedit/multiedit.plugin.desktop.in
-plugins/multiedit/multiedit/Makefile
-plugins/smartspaces/Makefile
 plugins/smartspaces/smartspaces.plugin.desktop.in
-plugins/synctex/Makefile
 plugins/synctex/synctex.plugin.desktop.in
-plugins/synctex/synctex/Makefile
-plugins/terminal/Makefile
 plugins/terminal/org.gnome.gedit.plugins.terminal.gschema.xml.in
 plugins/terminal/terminal.plugin.desktop.in
-plugins/textsize/Makefile
 plugins/textsize/textsize.plugin.desktop.in
-plugins/textsize/textsize/Makefile
-plugins/wordcompletion/Makefile
 plugins/wordcompletion/org.gnome.gedit.plugins.wordcompletion.gschema.xml.in
 plugins/wordcompletion/wordcompletion.plugin.desktop.in
 po/Makefile.in])
@@ -402,8 +246,9 @@ Configuration:
        Compiler:               ${CC}
        Prefix:                 ${prefix}
        Python Plugins Support: $enable_python
-       Plugins:                $PLUGINS
-       
+       Plugins:
+         $PLUGINS
+
        Disabled plugins:       $disabled_plugins
 
 Note: you have to install these plugins into the same prefix as your gedit
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index bfea49c..88fcb1a 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -1,14 +1,53 @@
-SUBDIRS = $(BUILD_PLUGINS)
-DIST_SUBDIRS = $(DIST_PLUGINS)
+plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
 
-plugindir = $(libdir)/gedit/plugins
-plugin_PYTHON =        \
-       gpdefs.py
+if ENABLE_PYTHON
+plugin_PYTHON = plugins/gpdefs.py
+endif
 
-DISTCLEANFILES = \
-       gpdefs.py
+plugin_LTLIBRARIES =
+plugin_in_files =
+dist_plugin_in_files =
+gsettings_SCHEMAS =
+dist_gsettings_SCHEMAS =
 
-EXTRA_DIST = \
-       gpdefs.py.in
+include plugins/bookmarks/Makefile.am
+include plugins/bracketcompletion/Makefile.am
+include plugins/charmap/Makefile.am
+include plugins/codecomment/Makefile.am
+include plugins/colorpicker/Makefile.am
+include plugins/colorschemer/Makefile.am
+include plugins/commander/Makefile.am
+include plugins/dashboard/Makefile.am
+include plugins/drawspaces/Makefile.am
+include plugins/git/Makefile.am
+include plugins/joinlines/Makefile.am
+include plugins/multiedit/Makefile.am
+include plugins/smartspaces/Makefile.am
+include plugins/synctex/Makefile.am
+include plugins/terminal/Makefile.am
+include plugins/textsize/Makefile.am
+include plugins/wordcompletion/Makefile.am
 
--include $(top_srcdir)/git.mk
+ INTLTOOL_XML_NOMERGE_RULE@
+ GSETTINGS_RULES@
+
+%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+
+GENERATED_PLUGIN_FILES = $(plugin_in_files:.plugin.desktop.in=.plugin)
+
+plugin_DATA = $(GENERATED_PLUGIN_FILES)
+
+DISTCLEANFILES +=                      \
+       plugins/gpdefs.py               \
+       $(GENERATED_PLUGIN_FILES)
+
+CLEANFILES +=                          \
+       $(GENERATED_PLUGIN_FILES)       \
+       $(gsettings_SCHEMAS)
+
+EXTRA_DIST +=                                                          \
+       plugins/gpdefs.py.in                                            \
+       $(plugin_in_files)                                              \
+       $(dist_plugin_in_files)                                         \
+       $(gsettings_SCHEMAS:%.gschema.xml=%.gschema.xml.in.in)          \
+       $(dist_gsettings_SCHEMAS:%.gschema.xml=%.gschema.xml.in.in)
diff --git a/plugins/bookmarks/Makefile.am b/plugins/bookmarks/Makefile.am
index d668a49..7e80a89 100644
--- a/plugins/bookmarks/Makefile.am
+++ b/plugins/bookmarks/Makefile.am
@@ -1,46 +1,32 @@
-# Advanced Editing plugin
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
+plugin_LTLIBRARIES += plugins/bookmarks/libbookmarks.la
 
-INCLUDES = \
-       -I$(top_srcdir)                                 \
-       $(GEDIT_CFLAGS)                                 \
-       $(WARN_CFLAGS)                                  \
-       $(DISABLE_DEPRECATED_CFLAGS)
-
-plugin_LTLIBRARIES = libbookmarks.la
-
-libbookmarks_la_SOURCES = \
-       gedit-bookmarks-plugin.h                                \
-       gedit-bookmarks-plugin.c                                \
-       gedit-bookmarks-app-activatable.h                       \
-       gedit-bookmarks-app-activatable.c                       \
-       messages/gedit-bookmarks-message-add.c                  \
-       messages/gedit-bookmarks-message-add.h                  \
-       messages/gedit-bookmarks-message-goto-next.c            \
-       messages/gedit-bookmarks-message-goto-next.h            \
-       messages/gedit-bookmarks-message-goto-previous.c        \
-       messages/gedit-bookmarks-message-goto-previous.h        \
-       messages/gedit-bookmarks-message-remove.c               \
-       messages/gedit-bookmarks-message-remove.h               \
-       messages/gedit-bookmarks-message-toggle.c               \
-       messages/gedit-bookmarks-message-toggle.h               \
-       messages/messages.h
-
-libbookmarks_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
-libbookmarks_la_LIBADD = $(GEDIT_LIBS)
-
-# Plugin Info
-plugin_in_files = bookmarks.plugin.desktop.in
+plugins_bookmarks_libbookmarks_la_CPPFLAGS =                   \
+       -I$(top_srcdir)                                         \
+       -I$(top_srcdir)/plugins/bookmarks
 
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-BUILDFILES = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-plugin_DATA = $(BUILDFILES)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(BUILDFILES) 
-DISTCLEANFILES = $(BUILDFILES)
+plugins_bookmarks_libbookmarks_la_CFLAGS =                     \
+       $(GEDIT_CFLAGS)                                         \
+       $(WARN_CFLAGS)                                          \
+       $(DISABLE_DEPRECATED_CFLAGS)
 
--include $(top_srcdir)/git.mk
+plugins_bookmarks_libbookmarks_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
+plugins_bookmarks_libbookmarks_la_LIBADD = $(GEDIT_LIBS)
+
+plugins_bookmarks_libbookmarks_la_SOURCES =                                    \
+       plugins/bookmarks/gedit-bookmarks-plugin.h                              \
+       plugins/bookmarks/gedit-bookmarks-plugin.c                              \
+       plugins/bookmarks/gedit-bookmarks-app-activatable.h                     \
+       plugins/bookmarks/gedit-bookmarks-app-activatable.c                     \
+       plugins/bookmarks/messages/gedit-bookmarks-message-add.c                \
+       plugins/bookmarks/messages/gedit-bookmarks-message-add.h                \
+       plugins/bookmarks/messages/gedit-bookmarks-message-goto-next.c          \
+       plugins/bookmarks/messages/gedit-bookmarks-message-goto-next.h          \
+       plugins/bookmarks/messages/gedit-bookmarks-message-goto-previous.c      \
+       plugins/bookmarks/messages/gedit-bookmarks-message-goto-previous.h      \
+       plugins/bookmarks/messages/gedit-bookmarks-message-remove.c             \
+       plugins/bookmarks/messages/gedit-bookmarks-message-remove.h             \
+       plugins/bookmarks/messages/gedit-bookmarks-message-toggle.c             \
+       plugins/bookmarks/messages/gedit-bookmarks-message-toggle.h             \
+       plugins/bookmarks/messages/messages.h
+
+plugin_in_files += plugins/bookmarks/bookmarks.plugin.desktop.in
diff --git a/plugins/bracketcompletion/Makefile.am b/plugins/bracketcompletion/Makefile.am
index dc40e04..c23000a 100644
--- a/plugins/bracketcompletion/Makefile.am
+++ b/plugins/bracketcompletion/Makefile.am
@@ -1,15 +1,6 @@
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-plugin_PYTHON = \
-       bracketcompletion.py
-
-plugin_in_files = bracketcompletion.plugin.desktop.in
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
+if ENABLE_PYTHON
+plugin_PYTHON += plugins/bracketcompletion/bracketcompletion.py
+plugin_in_files += plugins/bracketcompletion/bracketcompletion.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/bracketcompletion/bracketcompletion.plugin.desktop.in
+endif
diff --git a/plugins/charmap/Makefile.am b/plugins/charmap/Makefile.am
index af8f951..b33180f 100644
--- a/plugins/charmap/Makefile.am
+++ b/plugins/charmap/Makefile.am
@@ -1,15 +1,10 @@
-# Charmap Plugin
-SUBDIRS = charmap
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-
-plugin_in_files = charmap.plugin.desktop.in
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
+if ENABLE_PYTHON
+plugins_charmapdir = $(plugindir)/charmap
+plugins_charmap_PYTHON =                       \
+       plugins/charmap/charmap/__init__.py     \
+       plugins/charmap/charmap/panel.py
+
+plugin_in_files += plugins/charmap/charmap.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/charmap/charmap.plugin.desktop.in
+endif
diff --git a/plugins/codecomment/Makefile.am b/plugins/codecomment/Makefile.am
index 59030a1..41bc183 100644
--- a/plugins/codecomment/Makefile.am
+++ b/plugins/codecomment/Makefile.am
@@ -1,16 +1,6 @@
-# Code Comment Plugin
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-plugin_PYTHON = \
-       codecomment.py
-
-plugin_in_files = codecomment.plugin.desktop.in
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
+if ENABLE_PYTHON
+plugin_PYTHON += plugins/codecomment/codecomment.py
+plugin_in_files += plugins/codecomment/codecomment.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/codecomment/codecomment.plugin.desktop.in
+endif
diff --git a/plugins/colorpicker/Makefile.am b/plugins/colorpicker/Makefile.am
index f040719..bf4d43f 100644
--- a/plugins/colorpicker/Makefile.am
+++ b/plugins/colorpicker/Makefile.am
@@ -1,16 +1,8 @@
-# Modelines Plugin
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-plugin_PYTHON = \
-       colorpicker.py
-
-plugin_in_files = colorpicker.plugin.desktop.in
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
+if ENABLE_PYTHON
+plugin_PYTHON +=                               \
+       plugins/colorpicker/colorpicker.py
+
+plugin_in_files += plugins/colorpicker/colorpicker.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/colorpicker/colorpicker.plugin.desktop.in
+endif
diff --git a/plugins/colorschemer/Makefile.am b/plugins/colorschemer/Makefile.am
index 2202a2a..2ec7db3 100644
--- a/plugins/colorschemer/Makefile.am
+++ b/plugins/colorschemer/Makefile.am
@@ -1,22 +1,14 @@
-# colorschemer
-
-SUBDIRS = schemer
-
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-
-plugin_in_files = colorschemer.plugin.desktop.in
-
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po)
-       $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
-
-
+if ENABLE_PYTHON
+plugins_schemerdir = $(plugindir)/schemer
+plugins_schemer_PYTHON =                               \
+       plugins/colorschemer/schemer/__init__.py        \
+       plugins/colorschemer/schemer/languages.py       \
+       plugins/colorschemer/schemer/schemer.py
+
+plugins_schemer_uidir = $(GEDIT_PLUGINS_DATA_DIR)/colorschemer/ui
+dist_plugins_schemer_ui_DATA = plugins/colorschemer/schemer.ui
+
+plugin_in_files += plugins/colorschemer/colorschemer.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/colorschemer/colorschemer.plugin.desktop.in
+endif
diff --git a/plugins/colorschemer/schemer/schemer.ui b/plugins/colorschemer/schemer.ui
similarity index 100%
rename from plugins/colorschemer/schemer/schemer.ui
rename to plugins/colorschemer/schemer.ui
diff --git a/plugins/commander/Makefile.am b/plugins/commander/Makefile.am
index 198877b..61728ad 100644
--- a/plugins/commander/Makefile.am
+++ b/plugins/commander/Makefile.am
@@ -1,20 +1,49 @@
-# Commander
-
-SUBDIRS = commander modules
-
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-
-plugin_in_files = commander.plugin.desktop.in
-
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po)
-       $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
+if ENABLE_PYTHON
+plugins_commanderdir = $(plugindir)/commander
+plugins_commander_PYTHON =                                     \
+       plugins/commander/commander/__init__.py                 \
+       plugins/commander/commander/entry.py                    \
+       plugins/commander/commander/history.py                  \
+       plugins/commander/commander/info.py                     \
+       plugins/commander/commander/modules.py                  \
+       plugins/commander/commander/transparentwindow.py        \
+       plugins/commander/commander/utils.py                    \
+       plugins/commander/commander/windowactivatable.py
+
+plugins_commander_commandsdir = $(plugindir)/commander/commands
+plugins_commander_commands_PYTHON =                                    \
+       plugins/commander/commander/commands/__init__.py                \
+       plugins/commander/commander/commands/accel_group.py             \
+       plugins/commander/commander/commands/completion.py              \
+       plugins/commander/commander/commands/exceptions.py              \
+       plugins/commander/commander/commands/method.py                  \
+       plugins/commander/commander/commands/module.py                  \
+       plugins/commander/commander/commands/metamodule.py              \
+       plugins/commander/commander/commands/result.py                  \
+       plugins/commander/commander/commands/rollbackimporter.py
+
+plugins_commander_modulesdir = $(GEDIT_PLUGINS_DATA_DIR)/commander/modules
+plugins_commander_modules_PYTHON =                     \
+       plugins/commander/modules/align.py              \
+       plugins/commander/modules/bookmark.py           \
+       plugins/commander/modules/doc.py                \
+       plugins/commander/modules/edit.py               \
+       plugins/commander/modules/format.py             \
+       plugins/commander/modules/goto.py               \
+       plugins/commander/modules/grep.py               \
+       plugins/commander/modules/help.py               \
+       plugins/commander/modules/move.py               \
+       plugins/commander/modules/reload.py             \
+       plugins/commander/modules/set.py                \
+       plugins/commander/modules/shell.py
+
+plugins_commander_modules_finddir = $(GEDIT_PLUGINS_DATA_DIR)/commander/modules/find
+plugins_commander_modules_find_PYTHON =                        \
+       plugins/commander/modules/find/__init__.py      \
+       plugins/commander/modules/find/finder.py        \
+       plugins/commander/modules/find/regex.py
+
+plugin_in_files += plugins/commander/commander.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/commander/commander.plugin.desktop.in
+endif
diff --git a/plugins/dashboard/Makefile.am b/plugins/dashboard/Makefile.am
index 2abc1c1..6b5ddab 100644
--- a/plugins/dashboard/Makefile.am
+++ b/plugins/dashboard/Makefile.am
@@ -1,14 +1,11 @@
-# Dashboard
-SUBDIRS = dashboard
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-plugin_in_files = dashboard.plugin.desktop.in
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
+if ENABLE_PYTHON
+plugins_dashboarddir = $(plugindir)/dashboard
+plugins_dashboard_PYTHON =                             \
+       plugins/dashboard/dashboard/__init__.py         \
+       plugins/dashboard/dashboard/dashboard.py        \
+       plugins/dashboard/dashboard/utils.py
+
+plugin_in_files += plugins/dashboard/dashboard.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/dashboard/dashboard.plugin.desktop.in
+endif
diff --git a/plugins/drawspaces/Makefile.am b/plugins/drawspaces/Makefile.am
index 1e22c8d..f1ccee7 100644
--- a/plugins/drawspaces/Makefile.am
+++ b/plugins/drawspaces/Makefile.am
@@ -1,48 +1,41 @@
-# Drawspaces plugin
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
+plugin_LTLIBRARIES += plugins/drawspaces/libdrawspaces.la
 
-INCLUDES = \
-       -I$(top_srcdir)                                 \
-       $(GEDIT_CFLAGS)                                 \
-       $(WARN_CFLAGS)                                  \
-       $(DISABLE_DEPRECATED_CFLAGS)
-
-plugin_LTLIBRARIES = libdrawspaces.la
-
-BUILT_SOURCES = \
-       gedit-drawspaces-resources.c
-
-libdrawspaces_la_SOURCES = \
-       gedit-drawspaces-plugin.h                               \
-       gedit-drawspaces-plugin.c                               \
-       $(BUILT_SOURCES)
+plugins_drawspaces_libdrawspaces_la_CPPFLAGS =                 \
+       -I$(top_srcdir)                                         \
+       -I$(top_srcdir)/plugins/drawspaces
 
-libdrawspaces_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
-libdrawspaces_la_LIBADD = $(GEDIT_LIBS)
-
-gedit-drawspaces-resources.c: gedit-drawspaces.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) 
--sourcedir=$(srcdir) --generate-dependencies $(srcdir)/gedit-drawspaces.gresource.xml)
-       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source 
$(srcdir)/gedit-drawspaces.gresource.xml
-
-# Plugin Info
-
-plugin_in_files = drawspaces.plugin.desktop.in
+plugins_drawspaces_libdrawspaces_la_CFLAGS =                   \
+       $(GEDIT_CFLAGS)                                         \
+       $(WARN_CFLAGS)                                          \
+       $(DISABLE_DEPRECATED_CFLAGS)
 
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+plugins_drawspaces_libdrawspaces_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
+plugins_drawspaces_libdrawspaces_la_LIBADD = $(GEDIT_LIBS)
 
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
+plugins_drawspaces_resourcedeps =                                              \
+       plugins/drawspaces/gedit-drawspaces.gresource.xml                       \
+       $(shell $(GLIB_COMPILE_RESOURCES)                                       \
+               --sourcedir=$(srcdir)/plugins/drawspaces                        \
+               --generate-dependencies                                         \
+               $(srcdir)/plugins/drawspaces/gedit-drawspaces.gresource.xml)
 
-gsettings_SCHEMAS = org.gnome.gedit.plugins.drawspaces.gschema.xml
+plugins/drawspaces/gedit-drawspaces-resources.c: $(plugins_drawspaces_resourcedeps)
+       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES)                   \
+               --target=$@                                     \
+               --sourcedir=$(srcdir)/plugins/drawspaces        \
+               --generate-source $<
 
- INTLTOOL_XML_NOMERGE_RULE@
- GSETTINGS_RULES@
+BUILT_SOURCES +=                                               \
+       plugins/drawspaces/gedit-drawspaces-resources.c
 
-EXTRA_DIST = \
-       $(plugin_in_files) \
-       org.gnome.gedit.plugins.drawspaces.gschema.xml.in.in \
-       gedit-drawspaces.gresource.xml \
-       gedit-drawspaces-plugin.ui
+plugins_drawspaces_libdrawspaces_la_SOURCES =                  \
+       plugins/drawspaces/gedit-drawspaces-plugin.h            \
+       plugins/drawspaces/gedit-drawspaces-plugin.c            \
+       $(BUILT_SOURCES)
 
-CLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS)
-DISTCLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS)
+plugin_in_files += plugins/drawspaces/drawspaces.plugin.desktop.in
+gsettings_SCHEMAS += plugins/drawspaces/org.gnome.gedit.plugins.drawspaces.gschema.xml
 
--include $(top_srcdir)/git.mk
+EXTRA_DIST +=                                                  \
+       plugins/drawspaces/gedit-drawspaces.gresource.xml       \
+       plugins/drawspaces/gedit-drawspaces-plugin.ui
diff --git a/plugins/git/Makefile.am b/plugins/git/Makefile.am
index ac233a0..01540d4 100644
--- a/plugins/git/Makefile.am
+++ b/plugins/git/Makefile.am
@@ -1,20 +1,12 @@
-# Git
-
-SUBDIRS = git
-
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-
-plugin_in_files = git.plugin.desktop.in
-
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po)
-       $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
+if ENABLE_GIT
+plugins_gitdir = $(plugindir)/git
+plugins_git_PYTHON =                           \
+       plugins/git/git/__init__.py             \
+       plugins/git/git/diffrenderer.py         \
+       plugins/git/git/viewactivatable.py      \
+       plugins/git/git/windowactivatable.py
+
+plugin_in_files += plugins/git/git.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/git/git.plugin.desktop.in
+endif
diff --git a/plugins/joinlines/Makefile.am b/plugins/joinlines/Makefile.am
index 8610a2d..5233c2c 100644
--- a/plugins/joinlines/Makefile.am
+++ b/plugins/joinlines/Makefile.am
@@ -1,16 +1,6 @@
-# Modelines Plugin
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-plugin_PYTHON = \
-       joinlines.py
-
-plugin_in_files = joinlines.plugin.desktop.in
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
+if ENABLE_PYTHON
+plugin_PYTHON += plugins/joinlines/joinlines.py
+plugin_in_files += plugins/joinlines/joinlines.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/joinlines/joinlines.plugin.desktop.in
+endif
diff --git a/plugins/multiedit/Makefile.am b/plugins/multiedit/Makefile.am
index d9db376..c453dd6 100644
--- a/plugins/multiedit/Makefile.am
+++ b/plugins/multiedit/Makefile.am
@@ -1,20 +1,11 @@
-# Multi Edit
-
-SUBDIRS = multiedit
-
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-
-plugin_in_files = multiedit.plugin.desktop.in
-
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po)
-       $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
+if ENABLE_PYTHON
+plugins_multieditdir = $(plugindir)/multiedit
+plugins_multiedit_PYTHON =                             \
+       plugins/multiedit/multiedit/__init__.py         \
+       plugins/multiedit/multiedit/documenthelper.py   \
+       plugins/multiedit/multiedit/signals.py
+
+plugin_in_files += plugins/multiedit/multiedit.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/multiedit/multiedit.plugin.desktop.in
+endif
diff --git a/plugins/smartspaces/Makefile.am b/plugins/smartspaces/Makefile.am
index 4bb0dfb..1809e02 100644
--- a/plugins/smartspaces/Makefile.am
+++ b/plugins/smartspaces/Makefile.am
@@ -1,20 +1,6 @@
-# Smart Spaces
-
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-
-plugin_PYTHON = smartspaces.py
-
-plugin_in_files = smartspaces.plugin.desktop.in
-
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po)
-       $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
+if ENABLE_PYTHON
+plugin_PYTHON += plugins/smartspaces/smartspaces.py
+plugin_in_files += plugins/smartspaces/smartspaces.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/smartspaces/smartspaces.plugin.desktop.in
+endif
diff --git a/plugins/synctex/Makefile.am b/plugins/synctex/Makefile.am
index fe25b7a..7692ce1 100644
--- a/plugins/synctex/Makefile.am
+++ b/plugins/synctex/Makefile.am
@@ -1,15 +1,11 @@
-# SyncTeX Plugin
-SUBDIRS = synctex
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-
-plugin_in_files = synctex.plugin.desktop.in
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
+if ENABLE_SYNCTEX
+plugins_synctexdir = $(plugindir)/synctex
+plugins_synctex_PYTHON =                       \
+       plugins/synctex/synctex/__init__.py     \
+       plugins/synctex/synctex/synctex.py      \
+       plugins/synctex/synctex/evince_dbus.py
+
+plugin_in_files += plugins/synctex/synctex.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/synctex/synctex.plugin.desktop.in
+endif
diff --git a/plugins/terminal/Makefile.am b/plugins/terminal/Makefile.am
index d4b3251..56c87da 100644
--- a/plugins/terminal/Makefile.am
+++ b/plugins/terminal/Makefile.am
@@ -1,21 +1,10 @@
-# Terminal Plugin
-
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-plugin_PYTHON = terminal.py
-
-plugin_in_files = terminal.plugin.desktop.in
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-gsettings_SCHEMAS = org.gnome.gedit.plugins.terminal.gschema.xml
-
- INTLTOOL_XML_NOMERGE_RULE@
- GSETTINGS_RULES@
-
-EXTRA_DIST = $(plugin_in_files) org.gnome.gedit.plugins.terminal.gschema.xml.in.in
-
-CLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS)
-DISTCLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS)
-
--include $(top_srcdir)/git.mk
+if ENABLE_TERMINAL
+plugins_terminaldir = $(plugindir)
+plugins_terminal_PYTHON = plugins/terminal/terminal.py
+
+plugin_in_files += plugins/terminal/terminal.plugin.desktop.in
+gsettings_SCHEMAS += plugins/terminal/org.gnome.gedit.plugins.terminal.gschema.xml
+else
+dist_plugin_in_files += plugins/terminal/terminal.plugin.desktop.in
+dist_gsettings_SCHEMAS += plugins/terminal/org.gnome.gedit.plugins.terminal.gschema.xml
+endif
diff --git a/plugins/textsize/Makefile.am b/plugins/textsize/Makefile.am
index 4c1a9fc..ff943a7 100644
--- a/plugins/textsize/Makefile.am
+++ b/plugins/textsize/Makefile.am
@@ -1,20 +1,11 @@
-# Textsize
-
-SUBDIRS = textsize
-
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
-
-plugin_in_files = textsize.plugin.desktop.in
-
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po)
-       $(INTLTOOL_MERGE) $(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
-
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
-
-EXTRA_DIST = $(plugin_in_files)
-
-CLEANFILES = $(plugin_DATA)
-
-DISTCLEANFILES = $(plugin_DATA)
-
--include $(top_srcdir)/git.mk
+if ENABLE_PYTHON
+plugins_textsizedir = $(plugindir)/textsize
+plugins_textsize_PYTHON =                              \
+       plugins/textsize/textsize/__init__.py           \
+       plugins/textsize/textsize/documenthelper.py     \
+       plugins/textsize/textsize/signals.py
+
+plugin_in_files += plugins/textsize/textsize.plugin.desktop.in
+else
+dist_plugin_in_files += plugins/textsize/textsize.plugin.desktop.in
+endif
diff --git a/plugins/wordcompletion/Makefile.am b/plugins/wordcompletion/Makefile.am
index f81b90e..c6d90e1 100644
--- a/plugins/wordcompletion/Makefile.am
+++ b/plugins/wordcompletion/Makefile.am
@@ -1,48 +1,40 @@
-# Word Completion plugin
-plugindir = $(GEDIT_PLUGINS_LIBS_DIR)
+plugin_LTLIBRARIES += plugins/wordcompletion/libwordcompletion.la
 
-INCLUDES = \
-       -I$(top_srcdir)                                 \
-       $(GEDIT_CFLAGS)                                 \
-       $(WARN_CFLAGS)                                  \
-       $(DISABLE_DEPRECATED_CFLAGS)
-
-plugin_LTLIBRARIES = libwordcompletion.la
-
-BUILT_SOURCES = \
-       gedit-word-completion-resources.c
-
-libwordcompletion_la_SOURCES = \
-       gedit-word-completion-plugin.h                          \
-       gedit-word-completion-plugin.c                          \
-       $(BUILT_SOURCES)
+plugins_wordcompletion_libwordcompletion_la_CPPFLAGS =         \
+       -I$(top_srcdir)                                         \
+       -I$(top_srcdir)/plugins/wordcompletion
 
-libwordcompletion_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
-libwordcompletion_la_LIBADD = $(GEDIT_LIBS)
-
-gedit-word-completion-resources.c: gedit-word-completion.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) 
--sourcedir=$(srcdir) --generate-dependencies $(srcdir)/gedit-word-completion.gresource.xml)
-       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source 
$(srcdir)/gedit-word-completion.gresource.xml
-
-# Plugin Info
+plugins_wordcompletion_libwordcompletion_la_CFLAGS =           \
+       $(GEDIT_CFLAGS)                                         \
+       $(WARN_CFLAGS)                                          \
+       $(DISABLE_DEPRECATED_CFLAGS)
 
-plugin_in_files = wordcompletion.plugin.desktop.in
+plugins_wordcompletion_libwordcompletion_la_LDFLAGS = $(PLUGIN_LIBTOOL_FLAGS)
+plugins_wordcompletion_libwordcompletion_la_LIBADD = $(GEDIT_LIBS)
 
-%.plugin: %.plugin.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; $(INTLTOOL_MERGE) 
$(top_srcdir)/po $< $@ -d -u -c $(top_builddir)/po/.intltool-merge-cache
+plugin_in_files += plugins/wordcompletion/wordcompletion.plugin.desktop.in
 
-plugin_DATA = $(plugin_in_files:.plugin.desktop.in=.plugin)
+plugins_wordcompletion_resourcedeps =                                          \
+       plugins/wordcompletion/gedit-word-completion.gresource.xml              \
+       $(shell $(GLIB_COMPILE_RESOURCES)                                       \
+               --sourcedir=$(srcdir)/plugins/wordcompletion                    \
+               --generate-dependencies                                         \
+               $(srcdir)/plugins/wordcompletion/gedit-word-completion.gresource.xml)
 
-gsettings_SCHEMAS = org.gnome.gedit.plugins.wordcompletion.gschema.xml
+plugins/wordcompletion/gedit-word-completion-resources.c: $(plugins_wordcompletion_resourcedeps)
+       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES)                   \
+               --target=$@                                     \
+               --sourcedir=$(srcdir)/plugins/wordcompletion    \
+               --generate-source $<
 
- INTLTOOL_XML_NOMERGE_RULE@
- GSETTINGS_RULES@
+BUILT_SOURCES +=                                               \
+       plugins/wordcompletion/gedit-word-completion-resources.c
 
-EXTRA_DIST = \
-       $(plugin_in_files) \
-       org.gnome.gedit.plugins.wordcompletion.gschema.xml.in.in \
-       gedit-word-completion.gresource.xml \
-       gedit-word-completion-configure.ui
+plugins_wordcompletion_libwordcompletion_la_SOURCES =          \
+       plugins/wordcompletion/gedit-word-completion-plugin.h   \
+       plugins/wordcompletion/gedit-word-completion-plugin.c   \
+       $(BUILT_SOURCES)
 
-CLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS)
-DISTCLEANFILES = $(plugin_DATA) $(gsettings_SCHEMAS)
+gsettings_SCHEMAS += plugins/wordcompletion/org.gnome.gedit.plugins.wordcompletion.gschema.xml
 
--include $(top_srcdir)/git.mk
+EXTRA_DIST += $(plugins_wordcompletion_resourcedeps)
diff --git a/po/POTFILES.in b/po/POTFILES.in
index f0bfbc7..51297e5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -8,7 +8,7 @@ plugins/codecomment/codecomment.py
 plugins/colorpicker/colorpicker.plugin.desktop.in.in
 plugins/colorpicker/colorpicker.py
 plugins/colorschemer/colorschemer.plugin.desktop.in.in
-[type: gettext/glade]plugins/colorschemer/schemer/schemer.ui
+[type: gettext/glade]plugins/colorschemer/schemer.ui
 plugins/commander/commander.plugin.desktop.in.in
 plugins/commander/commander/windowactivatable.py
 plugins/dashboard/dashboard/dashboard.py



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