Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Overnight build on managed make projects


There's no need to write anything new. The ant task 'eclipse.incrementalBuild' triggers the creation and execution of the necessary makefiles, if only we can get someone to apply the patch in https://bugs.eclipse.org/bugs/show_bug.cgi?id=208484 so that it doesn't depend on UI elements. Here's a ant macro and a sample target that illustrates how one can set up automated builds.

        <target name="compile">
                <cdt.build project="hello"/>
        </target>

        <macrodef name="cdt.build">
                <attribute name="project"/>
                <sequential>
                        <echo>Building @{project} . . .</echo>
                        <eclipse.incrementalBuild
                                kind    = "incremental"
                                project = "@{project}"
                                builder = "org.eclipse.cdt.managedbuilder.core.genmakebuilder"/>
                        <echo>Refreshing @{project} . . .</echo>
                        <eclipse.refreshLocal resource="@{project}" depth="infinite"/>
                </sequential>
        </macrodef>

-Keith



Thomas Fletcher <thomas@xxxxxxxxxxxxxxxxx>
Sent by: cdt-dev-bounces@xxxxxxxxxxx

2008/05/31 09:55

Please respond to
"CDT General developers list." <cdt-dev@xxxxxxxxxxx>

To
"CDT General developers list." <cdt-dev@xxxxxxxxxxx>
cc
Subject
Re: [cdt-dev] Overnight build on managed make projects





Schaefer, Doug wrote:
> The official stance is that the makefiles generated by managed make are
> not intended to be checked into source control (which is why they are
> marked derived) and are not meant to be shared. The fact that they run
> outside of Eclipse is also not really supported, but as you mention,
> luckily it works.
>
> There is a bug/enhancement request to support building managed build
> projects in this manner. Idealy we would use a headless ecilpse to do
> the build and take advantage of CDT's internal builder and other
> builders where possible, but we have run into some weird dependencies
> with core components on UI components that is currently preventing that.
> I don't have the bug number handy but it shouldn't be too hard to find
> (althought with >1200 open bugs it might be).

If I can dig it up, some months ago I wrote an eclipse --application
plugin extension that effectively ran eclipse to both generate the makefiles
for the local environment as well as optionally kick off and do a build.

Wanted to add in error reporting, console capture etc, but never quite
got around to it.

If there is some interest, I'll dig through my archives and pull it up.

Thomas
--
Thomas Fletcher
Crank Software Inc.
www.cranksoftware.com



Back to the top