GNU Automake
is a programming tool
that produces portable makefiles
for use by the make
program, used in compiling software. It is made by the Free Software Foundation as one of GNU
programs, and is part of the GNU build system
. The makefiles produced follow the GNU Coding Standards
.
It is written in the Perl
programming language
and must be used with GNU autoconf
. Automake contains the following commands:
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 can be quite hard to deal with because it is not entirely backwards compatible
. For example, a project created with automake 1.4 will not necessarily work with automake 1.9.
Approach
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).
From this information, Automake generates a makefile that allows the user to:
- compile the program;
- clean (i.e., remove the files resulting from the compilation);
- install the program in standard directories;
- uninstall the program from where it was installed;
- create a source distribution archive (commonly called a tarball
);
- test that this archive is self-sufficient, and in particular that
the program can be compiled in a directory other than the one where the
sources are deployed.
Dependency generation
Automake also takes care of automatically generating[
1]
the dependency
information, 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.[
2]
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.
Libtool
Automake can also help with the compilation of libraries by automatically generating makefiles that will invoke GNU Libtool
.
The programmer is thus exempted from having to know how to call Libtool
directly, and the project benefits from the use of a portable library
creation tool.
More...
分享到:
相关推荐
《automake-1.15.1:构建自动化工具在hi3861开发环境中的应用》 在软件开发过程中,构建自动化工具扮演着至关重要的角色,它们能够简化编译、链接和其他构建过程,提高效率并减少人为错误。automake便是这样一款...
`automake-1.16.1.tar.xz` 是一个包含 `automake-1.16.1` 版本源代码的压缩文件。`automake` 是一个自动化工具,广泛用于开源软件项目,尤其是那些遵循 GNU 编译器集合(GCC)和GNU 编译系统(GNU Build System)...
GNU Automake 是一个自动化工具,主要用于生成符合GNU Makefile标准的`Makefile.in`文件,这些文件随后会被`configure`脚本转化为适用于不同平台的`Makefile`。Automake简化了构建过程,允许开发者专注于编写源代码...
`automake-1.16.tar.gz` 是一个包含了 `automake` 工具的源代码包,主要用于自动化构建过程中的Makefile生成。在Linux和类Unix系统中,`automake` 是一个不可或缺的工具,它与`autoconf`、`libtool`等一起工作,帮助...
标题中的"automake-1.16.1.tar.gz"是一个开源自动化构建系统Automake的源码包,版本为1.16.1。Automake是GNU项目的一部分,主要用于简化Unix/Linux环境中软件项目的构建过程,它能自动生成Makefile.in文件,这个文件...
《GNU Autoconf、Automake 和 Libtool》是针对开源软件开发者的必备指南,由Vaughan V. Gary、Ben Elliston、Tom Tromey和Ian Lance Taylor等专家共同编写,旨在帮助开发者掌握这些关键工具,提升开发效率和应用程序...
在MinGW中,autoconf和automake是两个非常重要的自动化构建工具,它们帮助开发者创建可移植的、符合GNU标准的软件项目。 **autoconf** autoconf是一个自动配置脚本生成器,它能够生成一个名为`configure`的脚本,这...
`automake` 是一个广泛使用的开源工具,主要用于创建遵循 GNU 编译标准的 Makefile 文件。这个模板提供了使用 `automake` 创建自定义 Makefile 的基础结构,使开发者能够快速适应并应用于自己的项目。 `automake` ...
`autoconf` 和 `automake` 是两个常用的开源工具,它们可以帮助开发者自动生成跨平台的 `makefile`,从而简化构建过程。本文将详细介绍如何利用这两个工具为包含多个源文件的项目生成 `makefile`。 首先,我们来看...
《automake-1.8在Ubuntu中的应用与详解》 automake是一款自动化工具,它为Unix-like操作系统提供了创建源代码Makefile.in文件的框架。automake是GNU项目的一部分,广泛应用于开源软件的构建过程,特别是在Linux系统...
依次执行命令:aclocal,libtoolize -f -c,autoconf,automake --add-missing,./configure,make。 3、cd */project/swap 依次执行命令:aclocal,autoconf,automake --add-missing,./configure,make。 4、cd *...
**Automake官方PPT教程详解** Automake是GNU项目中的一部分,它是一个自动化工具,用于构建遵循GNU标准软件构建系统的项目。这个官方教程是学习Automake的宝贵资源,特别是对于那些刚接触开源项目构建的新手而言。...
`automake` 和 `autoconf` 是两个这样的工具,它们使得源代码能够跨平台编译并配置,为开发者提供了极大的便利。这两个工具主要在Unix-like系统(如Linux和macOS)上广泛使用,但在Windows环境下也可以通过 Cygwin ...
- Automake是一个从Makefile模板生成标准GNU Makefile的工具,它是GNU构建系统的一部分,通常与Autoconf一起使用。使用Automake可以方便地创建跨平台、可移植的软件包。 2. 开源项目与软件工程: - 文件标题表明...
**automake和autoconf简介** automake和autoconf是开源软件开发中广泛使用的工具,主要用于构建源代码包,确保它们可以在不同的操作系统和编译环境中正确编译和安装。这两个工具是GNU项目的一部分,旨在帮助开发者...
标题中的"automake-1.14.1.tar.gz"是一个开源软件构建工具Automake的源码包,版本为1.14.1。Automake是GNU项目的一部分,主要用于自动化Unix/Linux系统上的软件构建过程,它能够生成Makefile.in文件,这些文件在...
ubuntu20.04离线dpkg安装automake
**automake和autoconf简介** `automake`和`autoconf`是GNU项目中的两个工具,它们主要用于构建源代码管理的自动化过程,特别是在Unix-like系统上。这些工具为开发者提供了跨平台的编译和安装环境,确保软件在不同的...
### automake工具链使用详解 #### 一、Makefile与automake的重要性 Makefile是一种用于自动化构建过程的脚本文件,它可以智能地管理项目中的多个文件,并根据文件间的依赖关系来决定哪些文件需要重新编译。这对于...
`automake` 是一个自动化构建系统,用于生成符合 GNU 编程规范的 Makefile.in 文件。这个工具使得软件开发者能够更方便地管理源代码文件、编译规则以及配置过程,从而简化了软件构建流程。标题提到的 "automake-1.4-...