Community
Participate
Working Groups
I am coming around to focus on the builder object as the extensibility mechanism to customize the build process. Currently, the CommonBuilder has an invokeBuilder method which then calls either the internal builder or an invokeMake method. I'd like to add a attribute on builder in the build definition to allow extenders to provide their own implementation of invokeMake. The main benefit is to allow us to dynamically change the command based on toolchain settings and the environment. And to potentially sequence commands, like calling out to CMake and then invoking make or nmake. To make things simple, the existing invokeMake functionality would be made available to allow builders to invoke external commands as is done now.
BTW, this is essentially taking things up a level in the stack from the existing command launcher. The command launcher is fine for simple changes, but I need access to the configuration data and need the ability to run multiple commands as mentioned.
Seems like a good idea to me. For RDT I had to create RemoteMakefileBuilder so that I could basically change what invokeMake() was doing. If this capability had existed at the time, I might not have needed to do that.
Created attachment 176517 [details] Proposed patch Here's the patch I'm currently working on. It introduces a IBuildRunner as an attribute if IBuilder. I also pulled out the invokeMake and invokeInternalBuilder to ExternalBuildRunner and InternalBuildRunner. The theory is that vendors can extend ExternalBuildRunner to override or extend the implementation of the make builder. That'll be my next step and may drive some restructuring inside ExternalBuildRunner. Feedback appreciated.
Committing this now with a few minor alterations. I have an extension on the commercial side to exercise this for now. Will add an open one when I get around to doing CMake. I reserve the right to make further API changes as we give the extension a workout. Expecially in the ExternalBuildRunner which will like need changes as we expand into external makefile gen tools like CMake (my commercial extension is pretty simple right now). So please let me know if you start using it so I can give you a heads up.
*** cdt cvs genie on behalf of dschaefer *** Bug 322458 - Implemented extension to allow the CommonBuilder.invokeBuilder method to be overriden. [+] IBuildRunner.java http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IBuildRunner.java?root=Tools_Project&revision=1.1&view=markup [*] IBuilder.java 1.19 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/IBuilder.java?root=Tools_Project&r1=1.18&r2=1.19 [+] InternalBuildRunner.java http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/InternalBuildRunner.java?root=Tools_Project&revision=1.1&view=markup [+] ExternalBuildRunner.java http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ExternalBuildRunner.java?root=Tools_Project&revision=1.1&view=markup [*] buildDefinitions.exsd 1.45 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core/schema/buildDefinitions.exsd?root=Tools_Project&r1=1.44&r2=1.45 [*] CommonBuilder.java 1.49 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/CommonBuilder.java?root=Tools_Project&r1=1.48&r2=1.49 [*] Builder.java 1.47 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java?root=Tools_Project&r1=1.46&r2=1.47