GNU Automakeのインストール

Autotoolsの一部であり,Autoconfとともに数多くのソフトウェアのビルドにつかわれているGNU Automakeをソースコードからインストールする。
項目 | 説明 |
---|---|
配布元 | |
リポジトリー | automake.git – GNU Automake |
手順 | |
依存情報 | |
依存先 (必須) | Make (GNU Make), Autoconf, Perl 5.006+ |
依存先 (任意) | テスト用: gettext, help2man, texinfo, libtool, flex, bison, dejagnu, zip, icedtea, python, gcc-toolchain, gfortran, pkg-config, vala |
依存元 |
sh -eux <<-"EOT"
PKG=automake VER=1.16.1 TAG=v$VER
LOCAL=~/.local J=$(grep -cs '^processor' /proc/cpuinfo || echo 2)
mkdir -p "$LOCAL/src"
cd "$LOCAL/src"
if command -v git >/dev/null; then
[ -e $PKG ] || git clone --depth 1 git://git.savannah.gnu.org/automake.git $PKG
cd $PKG
git fetch --depth 1 origin tag $TAG
git checkout -f $TAG
git clean -dfX
[ -e .gitmodules ] && git submodule foreach --recursive git clean -dfX
./bootstrap
else
[ -e $PKG-$VER ] || wget https://ftp.gnu.org/gnu/$PKG/$PKG-$VER.tar.gz
tar -xf $PKG-$VER.*
cd $PKG-$VER
make -kj $J distclean clean || :
fi
./configure --prefix="$LOCAL/stow/$PKG-$VER"
make -j $J
make -j $J check
make -j $J install
cd "$LOCAL/stow"
echo $PKG-[0-9]* | xargs -n 1 stow --ignore=dir -D
stow --ignore=dir $PKG-$VER
EOT
日付 | バージョン | OS | 依存関係 |
---|---|---|---|
2019-06-21 | 1.16.1 | Ubuntu 18.04 | GNU Make 4.2.1, GCC 7.4.0, Perl 5.26.1, Autoconf 2.69 |
リポジトリーからのビルドにはconfigure.acからconfigureを生成するのに,autoreconfコマンドを使う。しかし,autoreconfコマンド内部でautomakeが必要になるため,automakeの存在しない環境で,Automakeをビルドできない。
以下に記載があるように,こうしたブートストラップ問題の解消のため,bootstrapスクリプトを使う。
* To regenerate dependent files created by aclocal and automake,
use the ‘bootstrap’ script. It uses the code from the source
tree, so the resulting files (aclocal.m4 and Makefile.in) should
be the same as you would get if you install this version of
automake and use it to generate those files. Be sure to have the
latest stable version of Autoconf installed and available early
in your PATH.
automakeのmake check
はテストが2904個ほどあり,時間がかかる (20-30分かかった) ので注意する。