Automake

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Template:Short description {{#invoke:Infobox|infobox}}Template:Template other {{#invoke:Check for unknown parameters|check|unknown=Template:Main other|preview=Page using Template:Infobox software with unknown parameter "_VALUE_"|ignoreblank=y| AsOf | author | background | bodystyle | caption | collapsetext | collapsible | developer | discontinued | engine | engines | genre | included with | language | language count | language footnote | latest preview date | latest preview version | latest release date | latest release version | latest_preview_date | latest_preview_version | latest_release_date | latest_release_version | licence | license | logo | logo alt | logo caption | logo class | logo size | logo title | logo upright | logo_alt | logo_caption | logo_class | logo_size | logo_title | logo_upright | middleware | module | name | operating system | operating_system | other_names | platform | programming language | programming_language | qid | released | replaced_by | replaces | repo | screenshot | screenshot alt | screenshot class | screenshot size | screenshot title | screenshot upright | screenshot_alt | screenshot_class | screenshot_size | screenshot_upright | service_name | size | standard | title | ver layout | website }}Template:Main other

GNU Automake is a software development tool to automate parts of the compilation process. It eases common compilation problems. For example, it points to needed dependencies.

It automatically generates one or more Makefile.in from files called Makefile.am. Each Makefile.am contains, among other things, useful variable definitions for the compiled software, such as compiler and linker flags, dependencies and their versions, etc. The generated "Makefile.in"s are portable and compliant with the Makefile conventions in the GNU Coding Standards, and may be used by configure scripts to generate a working Makefile.<ref name="GNU manual">{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

The Free Software Foundation maintains Template:Samp as one of the GNU programs, and as part of the GNU build system. It is used to build several GNU applications and libraries, such as GTK,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> as well as non-GNU software such as XCircuit.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

Process

File:Autoconf-automake-process.svg
Flow diagram of autoconf and automake

Automake aims to allow the programmer to write a makefile in a higher-level language, rather than having to write the whole makefile manually. In simple cases, it suffices to give:

  • A line that declares the name of the program to build
  • A list of source files
  • A list of command-line options to be passed to the compiler (for example, in which directories header files will be found)
  • A list of command-line options to be passed to the linker (which libraries the program needs and in what directories they are to be found)

Automake also takes care of automatically generating the dependency information,<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref> so that when a source file is modified, the next invocation of the make command will know which source files need to be recompiled. If the compiler allows it, Automake tries to make the dependency system dynamic: whenever a source file is compiled, that file's dependencies are updated by asking the compiler to regenerate the file's dependency list. In other words, dependency tracking is a side effect of the compilation process.

This attempts to avoid the problem with some static dependency systems, where the dependencies are detected only once when the programmer starts working on the project.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

Design

Automake is written in Perl and must be used with GNU Autoconf.<ref name="GNU manual" /> Automake contains the following commands:

  • aclocal
  • automake

aclocal, however, is a general-purpose program that can be useful to autoconf users. The GNU Compiler Collection (GCC), for example, uses aclocal even though its makefile is hand written.

Like Autoconf, Automake is not entirely backward compatible. For example, a project created with automake 1.13 will not necessarily work with automake 1.14.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

See also

Template:Portal

References

Template:Reflist

Sources

Template:Refbegin

Template:Refend

Template:GNU Template:Perl