geany/geany-plugins — pull request #164 by b4n (2014-10-16 00:34:12+00:00)
Title: Less recursive Autotools

***Do NOT merge this*** yet. This at least doesn't port all plugins.

----

I wanted to use the `subdir-objects` Automake option in the GP build system, because some plugins build sources in sub-directories (*debugger*, *scope*, and *geanyvc* and *geanyprj* in their unit tests), and because it seems to be the future of Automake (e.g. someday it'll be impossible not to use it). Also, it's pretty neat (in theory).

The problem is that it has [a bug](http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354) when a subdir object is in a directory that also builds objects. This is problematic for us in the case of [*geanyprj*](/geany/geany-plugins/blob/master/geanyprj/tests/Makefile.am#L5) and [*geanyvc*](/geany/geany-plugins/blob/master/geanyvc/tests/Makefile.am#L5) usage.

Now, there are three options:

1. don't use `subdir-objects`, and deal with it the day it becomes unavoidable (maybe hoping the aforementioned bug gets fixed by then).
2. don't *build* the subdir objects in a directory that already builds objects. This basically mean we have to `#include "../src/utils.c"` in *geanyprj* and *geanyvc* unit tests -- not the worst thing ever in a unit test, but not the best either.
3. build all the objects in a particular directory from the same Makefile -- in practice, make things less recursive.

This PR gives a shot at option 3, and basically merges each plugin's *Makefile.am*-s together in *[plugin]/Makefile.am*. This leans towards the ["non-recursive Automake"](https://autotools.io/automake/nonrecursive.html) pattern some people advertize.

Pros I can think of:
* Works around the aforementioned Automake bug so allows us to use `subdir-objects` -- but that's not so important.
* Less recursion is supposed to be a little faster.
* All rules for a particular plugin (source, data, docs, …) are in the same place: more concise, provides an overview and ease modifications that touch several aspects at once.

Cons:
* All rules for a particular plugin (source, data, docs, …) are in the same place: more bloated and not split my aspect.

Of course, to simply allow us to use `subdir-objects`, only *geanyprj* and *geanyvc* build systems have to be tuned, but consistency over GP is good.

Enough chattering, let's see: what do you guys thing about this? Does what this PR start look like a good path to you or do you think it's a bad idea? @sardemff7 @hyperair @frlan @codebrainz @ntrel @elextr?