{"action":"created","issue":{"url":"https://api.github.com/repos/geany/geany-plugins/issues/164","labels_url":"https://api.github.com/repos/geany/geany-plugins/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/geany/geany-plugins/issues/164/comments","events_url":"https://api.github.com/repos/geany/geany-plugins/issues/164/events","html_url":"https://github.com/geany/geany-plugins/pull/164","id":45936144,"number":164,"title":"Less recursive Autotools","user":{"login":"b4n","id":793526,"avatar_url":"https://avatars.githubusercontent.com/u/793526?v=3","gravatar_id":"","url":"https://api.github.com/users/b4n","html_url":"https://github.com/b4n","followers_url":"https://api.github.com/users/b4n/followers","following_url":"https://api.github.com/users/b4n/following{/other_user}","gists_url":"https://api.github.com/users/b4n/gists{/gist_id}","starred_url":"https://api.github.com/users/b4n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b4n/subscriptions","organizations_url":"https://api.github.com/users/b4n/orgs","repos_url":"https://api.github.com/users/b4n/repos","events_url":"https://api.github.com/users/b4n/events{/privacy}","received_events_url":"https://api.github.com/users/b4n/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-10-16T00:34:12Z","updated_at":"2015-07-29T21:17:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/geany/geany-plugins/pulls/164","html_url":"https://github.com/geany/geany-plugins/pull/164","diff_url":"https://github.com/geany/geany-plugins/pull/164.diff","patch_url":"https://github.com/geany/geany-plugins/pull/164.patch"},"body":"***Do NOT merge this*** yet.  This at least doesn't port all plugins.\r\n\r\n----\r\n\r\nI 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).\r\n\r\nThe 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.\r\n\r\nNow, there are three options:\r\n\r\n1. don't use `subdir-objects`, and deal with it the day it becomes unavoidable (maybe hoping the aforementioned bug gets fixed by then).\r\n2. 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.\r\n3. build all the objects in a particular directory from the same Makefile -- in practice, make things less recursive.\r\n\r\nThis 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.\r\n\r\nPros I can think of:\r\n* Works around the aforementioned Automake bug so allows us to use `subdir-objects` -- but that's not so important.\r\n* Less recursion is supposed to be a little faster.\r\n* 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.\r\n\r\nCons:\r\n* All rules for a particular plugin (source, data, docs, …) are in the same place: more bloated and not split by aspect.\r\n\r\nOf 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.\r\n\r\nEnough 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?"},"comment":{"url":"https://api.github.com/repos/geany/geany-plugins/issues/comments/126097974","html_url":"https://github.com/geany/geany-plugins/pull/164#issuecomment-126097974","issue_url":"https://api.github.com/repos/geany/geany-plugins/issues/164","id":126097974,"user":{"login":"kugel-","id":564520,"avatar_url":"https://avatars.githubusercontent.com/u/564520?v=3","gravatar_id":"","url":"https://api.github.com/users/kugel-","html_url":"https://github.com/kugel-","followers_url":"https://api.github.com/users/kugel-/followers","following_url":"https://api.github.com/users/kugel-/following{/other_user}","gists_url":"https://api.github.com/users/kugel-/gists{/gist_id}","starred_url":"https://api.github.com/users/kugel-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kugel-/subscriptions","organizations_url":"https://api.github.com/users/kugel-/orgs","repos_url":"https://api.github.com/users/kugel-/repos","events_url":"https://api.github.com/users/kugel-/events{/privacy}","received_events_url":"https://api.github.com/users/kugel-/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T21:17:17Z","updated_at":"2015-07-29T21:17:17Z","body":"https://github.com/geany/geany-plugins/pull/277 implements an IMO superior solution to less recursive automake (using %reldir% as mentioned here before, e.g. in https://github.com/geany/geany-plugins/pull/164#issuecomment-59335147)"}}