Latest News
2008-01-28
Autotools release 0.9.6 for CDT 4.0.1 is available on the Sourceware Eclipse update site: http://sourceware.org/eclipse/update See below for update instructions. This release adds changes to enable support under Windows MingW/MSys and/or Cygwin. The OS restriction that didn't allow Windows has been changed. In addition, the makefile generator has been changed to use "sh" to run configuration scripts. For MSys and Cygwin users, this requires that the path is set up properly to find sh.exe. In addition, some fixes have been made to invoke the specific Autotools tools so they are only enabled for Autotools projects. Older projects will experience problems activating these menu items in the Project menu and should be reconverted to an Autotools project. A new project nature has been added which is why the older projects are not recognized. Content assist has also been improved to support the C Library routines. The release is part of the eclipse-cdt F8 rawhide release eclipse-cdt-4.0.1-4. The source tarball for the release can be downloaded from: eclipse-cdt-fetched-src-autotools-0_9_6.tar.gz.2007-10-24
Autotools release 0.9.5.1 for CDT 4.0.1 is available on the Sourceware Eclipse update site: http://sourceware.org/eclipse/update See below for update instructions. The release adds a work-around for the scaling issue with large projects and the use of the Autotools scanner. It also fixes Bugzilla 330701 which is a problem caused by the "clean build" operation deleting the build directory. The source tarball for the release can be downloaded from: eclipse-cdt-fetched-src-autotools-0_9_5_1.tar.gz.2007-10-04
Autotools release 0.9.5 for CDT 4.0.1 is available on the Sourceware Eclipse update site: http://sourceware.org/eclipse/update See below for update instructions. The release can also be found in the eclipse-cdt F8 rawhide release eclipse-cdt-4.0.1-1. The source tarball for the release can be downloaded from: eclipse-cdt-fetched-src-autotools-0_9_5.tar.gz.2007-08-17
Autotools release 0.9.2 for CDT 4.0.0 is available on the Sourceware Eclipse update site: http://sourceware.org/eclipse/update See below for update instructions. The release can also be found in the eclipse-cdt F8 rawhide release eclipse-cdt-4.0.0-4. The source tarball for the release can be downloaded from: eclipse-cdt-fetched-src-autotools-0_9_2.tar.gz. Autotools release 0.1.1 for CDT 3_x is also available. The release is part of the eclipse-cdt-3.1.2-7.fc7 rpm package for F7. The source tarball for the autotools plugin can be downloaded from: eclipse-cdt-autotools-3_x-0.1.1.tar.gz. Release updates include a bug fix for an SWT exception and the addition of autogen.sh options in the Project preferences.2007-07-31
Autotools release 0.9.1 for CDT 4.0.0 is available on the Sourceware Eclipse update site: http://sourceware.org/eclipse/update To install the update, go to: Help -> Software Updates -> Find and install... There, click on "Search for new features to install" and hit next If you don't already have the Sourceware Eclipse site set up, hit "New Remote Site..." and put in the URL given above. Check off the new site you added and then hit "Finish" Choose to install autotools and hit Finish. Note that Autotools 0.9.1 requires that CDT 4.0.0 is already installed. Also note that there is currently a bug open whereby created executables from an Autotools build do not show up in the Binaries folder. This is due to some hard-wiring of the build directory in the CDT and a fix is required. The executables are created fine. To run or debug the build executables, one has to use the "Run..." or "Debug..." dialogs and point to them directly. The source tarball for the release can be downloaded from: eclipse-cdt-autotools-0.9.1.tar.gz.2007-07-11
Autotools release 0.0.9 for CDT 3_x is available. A number of CDT 4.0 autoconf and automake editor features have been backported including editor preferences, external file support, and folding. The release 0.0.9 source is built as part of Fedora eclipse-cdt-3.1.2-5 for F7. The source tarball for the release can be downloaded from: eclipse-cdt-autotools-0.0.9.tar.gz.2007-04-10
The Autotools project has now branched and CDT 4.0 support has been added. A new branch: autotools-cdt-3_x has been created to contain the version of the Autotools plugin for CDT 3.x. As of now, CVS HEAD for Autotools will contain the version of the code required for CDT 4.0 support, starting with M6.2007-03-02
Autotools release 0.0.8.1 is now available. This release obsoletes 0.0.8. Additional bug fixes include:- Exponential performance fix for first refresh during build
- Fix for Build Special Target regression
- Fix for Autoconf editor to revert file to original state
- Fix to properly obey project creation null indexer setting
2007-02-22
Autotools release 0.0.8 is now available. This release contains a much-improved Autoconf editor which includes syntax parsing and an outline view. This version also rebases to sit upon CDT 3.1.2. The source tarball for the release can be downloaded from: eclipse-cdt-autotools-0.0.8.tar.gz. The 0.0.8 release is built as part of Fedora eclipse-cdt-3.1.2-1 which is currently available for FC6 via the Fedora updates-testing repository and/or in F7 rawhide.2007-01-29
Autotools release 0.0.7 is now available. The 0.0.7 release is part of eclipse-cdt-3.1.1-8 which is available for both FC6 and FC7. This release contains some important bug fixes in addition to the functionality additions of eclipse-cdt-3.1.1-7. For example, doing a project clean now performs a "make clean" and building the project no longer extraneously cleans the target.2007-01-24
As of this entry, eclipse-cdt-3.1.1-7.fc7 has been released for FC7 and eclipse-cdt-3.1.1-6.fc6 for FC6. Both are available via yum and contain the Autotools plug-in. Features added to the Autotools plug-in since the last news entry below include:- Autoconf editor with macro hover/context/completion support
- Automake editor with hover support
- Tool invocation (e.g. invoking autoconf, automake)
- Support for Makefile.cvs, *autogen.sh scripts
- Check for configuration failure
- True include path support for opening header files
2006-09-06
As of today, the CVS repository for com.redhat.eclipse.cdt.autotools now contains the directory: cdtpatches. This directory contains the source patches needed to be applied to upstream CDT so that the Autotools plug-in will work. A README is supplied in the directory with details. The patches are not needed if the FC6 or RHDS 3 eclipse-cdt packages have been installed.2006-08-29
The Autotools plug-in is now built into the Fedora FC6 eclipse-cdt package. Using yum, you can install/update eclipse-cdt on your FC6 platform. Latest version: eclipse-cdt-3.1.0-1jpp_13fc
The Autotools plug-in is also now shipping as part of a technology preview in the Red Hat Developer Suite (RHDS) product shipping on the latest RHEL4 update.
About the Autotools Plugin
The CVS C/C++ Autotools plug-in is designed to handle the building and maintenance of existing C/C++ Open Source projects that use Autotools (e.g. gdb, newlib, binutils). The project is very much in its infancy and has grown from an attempt to build the newlib Open Source project under the CDT. Newlib is maintained by myself (Jeff Johnston). Without the Autotools plug-in, the attempt to build ran into a number of road-blocks due to the fact newlib doesn't comply to a number of assumptions made by the CDT. For example, after checking out newlib into the CDT, one will notice there is no Makefile in the top source directory of newlib: it is actually generated at configuration time, prior to the build. This is the normal case for projects using Autotools. To add to the problem, newlib should not be built in the source directory so a separate build directory is needed. While it would be straightforward to manually add a CDT builder to run the configuration step, the CDT still won't be able to find the Makefile where it expects to. Working around these and other problems has evolved into the Autotools plug-in project.
Basic Design
The plug-in is itself an extension of a CDT Managed Make Project plus some added CDT Std Make Project features. The decision to extend a Managed Make Project was made because it has a ManagedBuildInfo extension which allows specification of a Makefile-generator. The generator matches well with Autotool configuration which generates the Makefiles for the project.
Although the Makefile generator was a natural fit, an Autotools Project is actually much more like a CDT Std Make Project once the Makefile is generated. For example, a Managed Make Project is in charge of the Makefile and therefore makes assumption about its contents. It has no way of knowing the myriad of targets that an Open Source Project may provide to the end-user (e.g. make install-target-newlib). The Std Make Project is very flexible in this regard and provides a set of dialogs for specifying and building arbitrary targets. The dialogs, unfortunately, are tied intimately with the Std Make Project internal code so it was necessary to stodify (steal/modify) the code to work with the Autotools plug-in.
To perform proper configuration, the Autotools plug-in needs to provide a method for the end-user to specify configure options. This is currently done via additional Project Preferences. Again, the Managed Make Project extensions proved ideal as configuration could be treated as a tool with optional parameters. These options are automatically added to the C/C++ Build Options page of the Project Preferences. In addition to configure options, the build directory and include path were added as optional parameters. The include path is necessary for the C/C++ indexer to find header files that are part of the Open Source Project itself. System headers are picked up for free through a default scanner provided by the Managed Make Project and specifified by the ManagedBuildInfo extension.
Current Features
- Configuration of project before build
- Check for configuration failure with problem view support
- Separate consoles for project configuration and project build
- Arbitrary *autogen.sh script support
- Makefile.cvs support
- Dynamic include path and defined symbol support
- Configuration option specification (Project Preferences)
- Build directory specification
- Gnu tools help pages
- Hover help for C Library functions
- Arbitrary Make Target specification
- Automake editor (from KDE Autotools Plugin)
- Autoconf editor with macro hover/context help
- Autotool invocation support (e.g. invoking autoconf)
Using the Plug-in Source
The sources for the Autotools plugin can be found at the sourceware.org CVS repository. You can view the CVS repository on the web through webcvs.
To checkout the source under Eclipse, perform:
File -> New -> Project -> CVS -> Checkout Projects from CVS
Note: To run the Autotools plugin source one needs to checkout the
source into an Eclipse 3.3 workspace that has already
installed the latest eclipse-cdt package or one must
check-out the appropriate CDT source code (currently 4.0-RC3) and
apply the CDT patches found in the com.redhat.eclipse.cdt.autotools/cdtpatches
directory (details can be found in cdtpatches/README). These patches
are already applied in the FC6 and RHDS 3 eclipse-cdt packages.
Hint:
Paste :pserver:anonymous@sources.redhat.com:/cvs/eclipse
into the Host field of the cvs dialog and Eclipse will parse it for
you and fill in the other fields.
Use an existing module
Find autotools and expand it. Do not checkout autotools itself. In there you will find:
Select these for check-out and finish.com.redhat.eclipse.cdt.autotoolscom.redhat.eclipse.cdt.autotools.featurecom.redhat.eclipse.cdt.autotools.testscom.redhat.eclipse.cdt.autotools-docs
At this point, you can do one of two things:
- Export the plug-ins
Right-click on plugin.xml and select Export...->Plug-in Development->Deployable plug-ins and fragments. Place the resultant jars into your Eclipse plugins directory and then restart Eclipse. This should enable the Autotools plugins. For the Autotools feature, select Export...->Plug=in Development->Deployable features and place in the appropriate Eclipse features directory. Note: it is assumed you have the latest CDT 4.0 plugins already installed.
- Run a second Eclipse instance
Start a new Eclipse Application from your current workspace containing the Autotools CVS code. Ensure that you have you have enabled plugins in the workspace to be used. From the child Eclipse workbench you can now create an Autotools project.
Creating An Autotools Project
To check out an existing Open Source project as an Autotools project, there are two alternatives. The first is to import the source as an Autotools project:
File -> Import... -> Checkout Projects From CVS/SVN
Under the "Check Out As" page specify you want to select:
Check out as a project configured using the New Project Wizard
From the New Project Wizard, select Managed Make Project (either C or C++).
The Managed Make Project Wizard will ask you to identify the Project
Type of the Managed Make Project. Select "Autotools".
The second method of using the Autotools Plugin is to first check out a CVS project, then convert it using a special Conversion Wizard. After check-out, select:
File -> New -> Other -> C -> Convert To C/C++ Autotools Project
This will bring up the Autotools Conversion Wizard which is
fairly straightforward.
Once the Autotools Project is created, go to Project -> Properties and there under C/C++ Build -> Tool Settings you can set the desired configuration options. A set of common options are provided and a special catch-all option called "Other" is provided to specify any other command line configuration option (or options) needed (e.g. --enable-extras --with-money).
Future Plans
Besides soliciting and adding new functionality, future plans include discussions with the CDT maintainers. Already, discussions have occurred with regards to the new Project Model and how the Autotools plug-in will fit in. When the new Project Model has solidified, the Autotools plug-in will be rewritten.
Long-term, the goal is to have C/C++ developers enjoy some of the benefits already granted to Java users of Eclipse. For example, coding errors are diagnosed on the fly when editing Java files under the IDE. This saves a lot of time vs the C/C++ model where: code is edited, then there is waiting for compilation, and finally parsing is performed on compiler error messages. With some buy-in from gcc maintainers (a number of which work at Red Hat), it is hoped that at least common C/C++ typos could be spotted while editing, thereby making the CDT experience that much more productive. Catching mistakes like missing semi-colons, undefined variables, and suggesting fixes would be great time-savers. An alternative approach would be to look at enhancing the C/C++ indexers.
For development details, see the Autotools development wiki-page: here.
This plug-in is being developed by Jeff Johnston.