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 these tasks to manage
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 generated, 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:
-
Top Level directory with no source files
-
Programs directory in the next level - one can have multiple targets
as any directory in this level will be treated as a Program target
-
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
depending on how he/she is able to control the generating, modifying
and updating of the configuration files. In this release, the tool
is providing a simple update mechanism and it will get more sophisticated
in later releases taking more responsibility in managing project 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:
-
Make sure that your project structure is organized as the recommended project
structure defined earlier
-
From the C/C++ Projects view, right
mouse click on the project directory
-
Select Autoconf -> Configure - this action will generate and update
all the configuration files and generate the configure script then it will
run configure for you
Please note that if source code files do exist in your top level directory,
a popup dialog will appear and you need to let the tool know what type
of target you are going to build. There are three targets that you can
build and these are program, static library and shared library.
-
Alternatively, you can generate configure and then run configure using
two distinct actions instead of the configure action which encapsulate
the following two actions
-
From the C/C++ Projects view, right
mouse click on the project directory
-
Select Autoconf -> Advanced -> Generate Configure - this action
will generate and update all the configuration files and generate configure
for you
-
Select Autoconf -> Advanced -> Run Configure
-
Build the project using the Build Project action
-
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
-
From the C/C++ Projects view, right
mouse click on the project directory
-
Select Autoconf -> Advanced -> Run Configure - this action
will run the configure script using the existing configuration files.
-
Alternatively you can use Autoconf -> Configure and you can control whether
or not to update the configuration files - not recommended to do update
in this scenario.
Implicit Updating Configuration files
If any of the configuration files has been updated , configure will not
be up to date and regenerating configure is needed. so invoking configure
from the autoconf menu or generate configure and run configure from the
autoconf -> Advanced menu will perform an update.
-
From the C/C++ Projects view, right
mouse click on the project directory
-
Select Autoconf -> Configure, this action will regenerate the configure
script and then run it.
-
Select Autoconf -> Advanced -> Generate Configure if you wish only to generate
configure - an update will be performed if needed OR
-
Select Autoconf -> Advanced -> 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 .
In order to perform the previous actions, you need to do the following:
-
From the C/C++ Projects view, right
mouse click on the project directory
-
Select Autoconf -> Advanced -> and then you will have three options
to choose from
-
Select Create/Update all automake files to update all configuration
files
-
Select update configure.in if you wish to update the top level configure.in
-
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 :
-
From the C/C++ Projects view, right
mouse click on the project directory
-
Select Autoconf -> Advanced -> and then you will have five create
actions
-
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
-
Selecting Create Programs Makefile.am will generate the Programs Makefile
.am and if there was an existing Makefile.am, it will be renamed *.old
-
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
-
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
-
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
-
From the C/C++ Projects view, right
mouse click on the project directory
-
Select Autoconf -> distclean
-
Select Autoconf -> maintainer clean
-
Select Autoconf -> make-install
|