project.conf

## Name

project.conf — Project definition files for configure

## Project configuration

A project definition file should be found in every project directory managed by configure. These files must be named `project.conf`.

### File format

A definition file is organized in sections, each containing a number of variables. Section names are written on their own line, between square brackets (e.g. "[section]"). Variables are given on their own line too, like this:

> `variable=value`

Configuration files may be commented, comment lines being prepended with a hash sign "#".

Variables can be defined directly without specifying a particular section first; they belong then to the default section, which is simply considered to have an empty name.

### Important variables

The most significant variables recognized are mentioned below.

In the default section:

- `subdirs`: subdirectories to look for too

- `cppflags_force`: CPPFLAGS to force globally

- `cppflags`: optional global CPPFLAGS

- `cflags_force`: CFLAGS to force globally

- `cflags`: optional global CFLAGS

- `ldflags_force`: LDFLAGS to force globally

- `ldflags`: optional global LDFLAGS

- `targets`: targets to handle in the Makefile

- `dist`: additional files to include in a source archive

In subsequent sections, respectively named after the target they define:

- `type` (mandatory): type of the target (eg binary, library, object, ...)

- `cppflags`: additional CPPFLAGS for this target

- `cflags`: additional CFLAGS for this target

- `ldflags`: additional LDFLAGS for this target

- `sources`: source files to compile

- `depends`: a list of files (or other targets) that this target depends on

- `install`: the destination path for installation

- `phony`: determines if the target defined should always be built, regardless of the presence of a file of a same name (possible values: 0, 1)

- `enabled`: set to 0 to not build this target by default

## Target definitions

### Target types

The following target types are currently supported:

- binary: produces binary files, linked from every object file produced with their source files.

- library: produces a static and a shared version of the target, linked from every object file produced with their source files, and respectively appending ".a" and ".so" extensions to the target name; the shared object are also assigned a version number.

- libtool: uses the libtool project to generate libraries, as supported by the project on the underlying platform.

- object: produces a binary object file from the given source.

- plugin: produces a shared version of the target, linked from every object file produced with their source files, and appending the ".so" extension to the target name.

- script: runs the given script, expecting the target file to be generated from the sources defined.

### Script targets

Scripts should be provided by the software project itself, as configure does not provide a convenient set of pre-installed standard scripts. A few sample scripts are, however, distributed along with the source code of the configure project, and introduced here.

These scripts are primarily meant to allow further integration of the build process, as defined by the Makefiles generated, with the requirements of a software project beyond that of compiling code. configure provides support through these scripts for:

- AppBroker: integration with the DeforaOS distributed computing framework (see `appbroker.sh`)

- DocBook: markup language for technical documentation, based on either SGML or XML (see `docbook.sh`)

- GCOV: code coverage analysis and profiling tool, part of the GNU Compiler Collection suite (see `coverage.sh`)

- Gettext: internationalization (i18n) and localization (l10n) framework, notably allowing software to be easily translated to other languages (see `gettext.sh`)

- Gtk-doc: generates API documentation from comments within software projects, in the format expected by the DevHelp API browser (see `gtkdoc.sh`)

- pkg-config: unified interface to define compilation and linking rules to installed software (see `pkgconfig.sh`)

- syntax checkers: convenience scripts for a number of programming languages and markup formats are provided, such as C (see `clint.sh`), HTML (see `htmllint.sh`), PHP (see `phplint.sh`), Python PEP-8 (see `pylint.sh`), POSIX shell scripts (see `shlint.sh`), or XML (see `xmllint.sh`)

#### Writing scripts

It is naturally possible to write scripts for integration with configure.

## See also

configure(1), make(1)