请输入您要查询的百科知识:

 

词条 Automake
释义

  1. Process

  2. Design

  3. See also

  4. Notes

  5. References

  6. External links

{{Multiple issues|{{Lead too short|date=March 2013}}{{More citations needed|date=December 2016}}
}}{{Infobox software
| name = Automake
| logo = Heckert GNU white.svg
| logo size = 150px
| developer = GNU Project
| released = {{Start date and age|1996|05|28}}
| latest release version = 1.16.1
| latest release date = {{release date and age|2018|3|11}}[1]
| operating system = Cross-platform
| genre = Programming tool
| status = Active
| license = GNU General Public License
| website = {{Official URL}}
}}

In software development, GNU Automake is a programming tool to automate parts of the compilation process. It eases usual 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.ins 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.[2]

The Free Software Foundation maintains automake 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+,[3] as well as non-GNU software such as XCircuit.[4]

Process

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,[5] 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.[6] In such a case, if a source file gains a new dependency (e.g. if the programmer adds a new #include directive in a C source file), then a discrepancy is introduced between the real dependencies and those that are used by the compilation system. The programmer should then regenerate the dependencies, but runs the risk of forgetting to do so.

In the general case, automake generates dependencies via the bundled depcomp script, which will invoke the compiler appropriately or fall back to makedepend. If the compiler is a sufficiently recent version of gcc, however, automake will inline the dependency generation code to call gcc directly.

Design

Automake is written in Perl and must be used with GNU Autoconf.[2] 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, 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.[7] This can require complex projects to include multiple versions.

See also

{{Portal|Free and open-source software}}
  • Configure (computing)
  • Make (software)

Notes

1. ^{{cite mailing list|first=Mathieu|last=Lirzin|title=GNU Automake 1.16.1 released|publisher=GNU Project|date=11 March 2018|url=https://lists.gnu.org/archive/html/automake/2018-03/msg00019.html|accessdate=12 March 2018}}
2. ^{{cite web|url=https://www.gnu.org/software/automake/manual/automake.html|title=Automake|website=GNU|publisher=Free Software Foundation|date=2018-02-25|accessdate=2018-02-26}}
3. ^[https://developer.gnome.org/gtk3/unstable/gtk-building.html GTK+ libraries]
4. ^XCircuit documentation
5. ^{{cite book|section=Automatic Dependency Tracking |section-url=https://www.gnu.org/software/automake/manual/html_node/Dependency-Tracking.html| title=Automake Manual |website=GNU.org |publisher=Free Software Foundation}}
6. ^{{cite web|url=https://www.gnu.org/software/automake/history/automake-history.html#Dependency-Tracking-Evolution|title=Automake History|website=GNU.org}}
7. ^Automake "broken"?

References

{{refbegin}}
  • {{cite book|first1=Gary V.|last1=Vaughan|first2=Ben|last2=Elliston|first3=Tom|last3=Tromey|title=Gnu Autoconf, Automake, and Libtool|publisher=Sams|isbn=1-57870-190-2}}
{{refend}}

External links

  • {{Official website}}
  • Online version of The Goat Book aka Autobook
  • Combined manual for Automake and Autoconf
  • Autotoolset home page
{{GNU}}{{Perl}}

6 : Build automation|Compiling tools|Cross-platform free software|Free software programmed in Perl|GNU Project software|Software using the GPL license

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/17 9:17:47