-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Less recursive Autotools #164
base: master
Are you sure you want to change the base?
Conversation
This reverts commit c2d4a39.
As we all know recursive make is evil http://aegis.sourceforge.net/auug97.pdf so less recursion is good :) As for the details, tl;dr and don't know enuf autotools anyway :) |
You are saying:
This does not have to be that way at all, although I do not see that as a problem since plugins are supposed to be simple enough. Your changes are good from what I managed to see (big changes are always hard to review). But I would change that stuff even further. Non-recursive build at all (e.g. only one Makefile). Depending on the Automake version you want to target, you could make it easy to split each plugin in its own project (with a minimal The idea is to include You can see a working infrastructure in my j4status and j4status-plugins projects. (You need to |
Indeed, it could be split in several
While it would probably be nice, I don't see this as the most important step. Also, the complexity added by each
While I like the idea in theory, I'm not so fond of having either the Also, how easy would it be to build and install a particular plugin? I think that it should be real easy because I would think most developers don't necessarily want to bother building anything but their plugin, while not wanting to bother about --disable-[plugin] (or even they might want to still have some other plugins built and installed because they use them). The current support of simply running Anyway, those are just concerns I have, but I'm not at all against a real single-Makefile solution, rather the contrary. |
Your PR seems fine as-is, considering what it aims to do. To go a bit further on the full non-recursive approach: It is quite easy to allow one to do a simple all:
make -C .. plugin/plugin.la
clean:
make -C .. clean Also, making a plugin a self-contained project would require a really basic The relative path in subdir |
OK, thanks for giving it a look :)
Indeed, building the plugin is easy as we have a special target, but what about specific installation and clean? Those are indeed less important (though clean might be nice not to have to rebuild everything after) but might still be wanted.
Well, wouldn't we need to still basically copy the root BTW, the "less" recursive approach in this PR probably won't help much regarding parallelism, as it still uses one subdir per plugin (unless there is a way to tell Make that it can recurse in several directories at once as ours are completely separated -- are they?), so if more parallelism is something we want to aim here, full non-recursiveness might be needed. |
On 14-10-16 02:19 AM, Quentin Glidic wrote:
It would be super useful to allow "standalone"-ish Autotools to be used Is there any way to make it where you could support completely git clone <geany-plugins repo>
cd geany-plugins
git clone <plugin's repo> myplugin
./configure && make # all of GP and myplugin
and to have GP's build system detect that you just added a plugin It's kind of like LLVM/Clang's build system where you can add different Maybe I'm dreaming :) |
At least I cannot say that I dislike the git submodule idea ... autotools I cannot add much, as it's still some cryptic globish to me. |
#277 implements an IMO superior solution to less recursive automake (using %reldir% as mentioned here before, e.g. in #164 (comment)) |
@b4n are you still working on this? |
@kugel- Not now, but I wish. Actually I'm not working on much Geany/GP stuff these days :( |
@b4n What we are going to do with this WiP-PR? |
_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 when a subdir object is in a directory that also builds objects. This is problematic for us in the case of geanyprj and geanyvc usage.
Now, there are three options:
subdir-objects
, and deal with it the day it becomes unavoidable (maybe hoping the aforementioned bug gets fixed by then).#include "../src/utils.c"
in geanyprj and geanyvc unit tests -- not the worst thing ever in a unit test, but not the best either.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" pattern some people advertize.
Pros I can think of:
subdir-objects
-- but that's not so important.Cons:
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?