「Automake」- 安装

访问主页

安装依赖

Automake依赖于Autoconf,所以要先安装要求版本的Autoconf包。

从发行版的源中安装

#!/bin/sh

# CentOS automake 1.5
yum install -y automake15

使用源码编译安装

#!/bin/bash

################################################################################
# Automake-1.13
# Dependencies: Autoconf-2.69+
################################################################################
# ./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.13
./configure --prefix=/usr/local --docdir=/usr/local/share/doc/automake-1.13
make && make install

################################################################################
# Automake-1.15
################################################################################
# 1. 下载源码并进入源码目录

# 2. 准备,编译,安装
./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.15

make && make install

################################################################################
# Automake-1.16
# Dependencies: Autoconf-2.69+
################################################################################
# ./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.16
./configure --prefix=/usr/local --docdir=/usr/local/share/doc/automake-1.16
make && make install

安装的可执行程序

aclocal
根据configure.in文件的内容来生成aclocal.m4文件。

aclocal-1.15
指向aclocal的硬链接。

automake
A tool for automatically generating Makefile.in files from Makefile.am files [To create all the Makefile.in files for a package, run this program in the top-level directory. By scanning the configure.in file, it automatically finds each appropriate Makefile.am file and generates the corresponding Makefile.in file.]

automake-1.15
指向automake的硬链接。

常见错误汇总

#1

「help2man: can’t get `–help’ info from automake-1.15 Try …
问题描述:

help2man: can’t get `–help’ info from automake-1.16

Try `–no-discard-stderr’ if option outputs to stderr

make: *** [doc/automake-1.16.1] Error 255

解决办法:

# [...省略]

# 修改Makefile文件中的如下行
doc/aclocal-$(APIVERSION).1: $(aclocal_script) lib/Automake/Config.pm
        $(update_mans) aclocal-$(APIVERSION)
# 添加--no-discard-stderr选项
doc/automake-$(APIVERSION).1: $(automake_script) lib/Automake/Config.pm
        $(update_mans) automake-$(APIVERSION) --no-discard-stderr

# [...省略]

参考文献

LFS/Automake-1.15
LFS/6.44. Automake-1.16.1
Homepage: https://www.gnu.org/software/automake/