Project Management support using GNU autoconf and automake tools

The C/C++ IDE provides support for using GNU automake and autoconf tools.  These tools are used to manage C/C++ projects under UNIX like systems. Using these tools has many advantages. The  first is solving the project portability problems, when software packages are required to run on multi - UNIX like platforms. In addition, these tools takes away the burden of creating and maintaining Makefiles and instead, the user will deal with a much simpler files named Makefile.am.
For more information regarding automake and autoconf, we suggest to visit the GNU web site. 
Support for Project Management, which is provided by the C/C++ IDE, can be defined in two categories.  The first category is automatic generation of configuration files  for projects that are either newly created or imported to the tool without configuration files. The second category is maintaining existing when importing a software package that has already autoconf and automake configuration files. 
Before we dive in and explain how to accomplish that tasks for managing your project, let us explain some of the terminology that will be used in this section


Terminology and Definitions
 

  • Configuration files: Any files that are either input or output  to automake and autoconf  - Makefile.am,  Makefile.in, configure.in , configure and some other auxiliary files. Makefile.am and configure.in can be updated by the user. The tool does not enforce any defined layout for the makefile.am's. Although, when that tool detects that these files are different than the tool has gen erated, no updates will occur
  • Managed Project:  A project that has all the configuration files mentioned above.
  • Unmanaged Project: A project that does not have any configuration files.
  • Project Structure: The way the structure is organized with regard to its directories and their Makefile.am's.
  • Top Level Directory: Usually it is the project directory and it is recommended that this directory does not contain any source files as most of the configuration files will be generated in this directory. 
  • Program Directory: A directory that contains Makefile.am which is a Program target
  • Recommended Project Structure: If you don't want to manage any of the configuration files yourself- Makefile.am and configure.in and their updates-  and let the tool do this task for you, you may organize your project as follows:
    1. Top Level directory with no source files
    2. Programs directory in the next level  - one can have multiple targets as any directory in this level will be treated as a  Program target
    3. all the children of the Programs directory will be initially assumed to be static library targets, but the user has the flexibility to alter this option to a different type target.


    We should emphasize here that this is not enforcing any Project structure ,but rather the tool is designed to give all the flexibility to the developer depended on how he/she is able  to control the generating, modifying and updating of the configuration files.  Also, the tool is providing a simple update mechanism in this release and it will get more sophisticated in later releases taking a bigger share in managing the configuration files.

Automatic Generation for Project Configuration Files

Whether it is a newly created C/C++ project or a project that was imported with no configuration files, that task to generate the support is the as follows:

  1. Make sure that your project structure is organized as the recommended project structure defined earlier
  2. From the C/C++ Projects view, right mouse click on the project directory
  3. Select  Autoconf -> Generate Configure - this action will generate and update all the configuration files and generate configure for you
  • Now if you wish to test your configuration script, do the following
  1. From the C/C++ Projects view, right mouse click on the project directory
  2. Select  Autoconf -> Run Configure
  3. Build the project using the Build Project action
  4. Afar successful build you can execute the target by using the Command Launcher view or  the Run Specifications view


Maintaining Existing Project Configuration Files

When one download open source projects or importing projects to the workspace that are managed by autoconf and automake tools, one scenario is usually to test the package and run  configure. below is the steps need to run an existing configure

  1. From the C/C++ Projects view, right mouse click on the project directory
  2. Select  Autoconf -> Run Configure - this action will generate and update all the configuration files and generate configure for you
Implicit Updating Configuration files
 

If any of the configuration files has been updated , configure will be not up to date and regenerating configure is needed. so invoking generate configure and run configure will perform an update.

  1. From the C/C++ Projects view, right mouse click on the project directory
  2. Select Autoconf -> Generate Configure if you wish only to generate configure - an update will be performed if needed OR
  3. Select Autoconf -> Run Configure and this action will perform an update as well if need
Explicit Updating for Configuration files
 
The tool provide actions for those users who are familiar with autoconf and provide them with the flexibility to make there own preferred updates. Once you need to make updates and take owner ship of the package, the tool provide actions that will help you accomplish that. Also, you need to be aware of the following automatic updates that the tool perform. 
        The C/C++ IDE can only do an update to certain Makefile.am templates and the configure.in template as well. For example an automatic update will occur if each makefile has one designated target per file. Also, the updated Targets are either Programs, Static Libraries Shared Libraries.  Basic variables for each target will get updated for this release. Later, more and more update will be performed. For example, the Program target will have its _SOURCES,_LDADD, SUBDIRS and EXTRA_DIST variables updates. For Static Libraries targets, the C/C++ tool will update LIBRARIES,  _a_SOURCES,  SUBDIRS and EXTRA_DIST will be updated. For shared libraries, the _LTLIBRARIE, _la_SOURCES, SUBDIRS and EXTA_DIST will be updated .
I order to perform the previous actions, you need to  do the following:
  1. From the C/C++ Projects view, right mouse click on the project directory
  2. Select  Autoconf -> Advanced-> and then you will have three options to choose from
  3. Select Create/Update all  automake files to update all configuration files
  4. Select update configure.in if you wish to update the top level configure.in
  5. Select update Makefile.am to update the one Makefile.am that exist in this directory


Modifying the Project Structure

The  C/C++ IDE provides a set of actions that helps the user to easily modify the Makefile.am target . In order to that  you need to :

  1. From the C/C++ Projects view, right mouse click on the project directory
  2. Select  Autoconf -> Advanced-> and then you will have five create actions
  3. Selecting Create TopLevel Makefile.am will generate the top level Makefile .am and if there was an existing Makefile.am, it will be renamed *.old
  4. Selecting Create Programs Makefile.am will generate the Programs Makefile .am and if there was an existing Makefile.am, it will be renamed *.old
  5. Selecting Create Static Lib Makefile.am will generate the static library  Makefile.am and if there was an existing Makefile.am, it will be renamed *.old
  6. Selecting Create Stared Lib Makefile.am will generate the shared library Makefile.am and if there was an existing Makefile.am, it will be renamed *.old
  7. Selecting Create Configure.in will generate the top level configure.in and if there was an existing configure.in, it will be renamed *.old
Running Autoconf Standard targets

You may invoke any of the following three standard autoconf targets from the The tool. These targets are make-install, distclean and maintainer-clean

  1. From the C/C++ Projects view, right mouse click on the project directory
  2. Select Autoconf -> distclean
  3. Select Autoconf -> maintainer clean
  4. Select Autoconf -> make-install
 
 
Contact Us