Bootstrap aclocal.
This commit is contained in:
parent
bb4d24509e
commit
52cdbad405
43
parts.rst
43
parts.rst
|
@ -171,7 +171,7 @@ bzip2 1.0.8
|
||||||
``bzip2`` is a compression format that compresses more than ``gzip``. It
|
``bzip2`` is a compression format that compresses more than ``gzip``. It
|
||||||
is preferred where we can use it, and makes source code sizes smaller.
|
is preferred where we can use it, and makes source code sizes smaller.
|
||||||
|
|
||||||
coreutils 5.0.0
|
coreutils 5.0
|
||||||
===============
|
===============
|
||||||
|
|
||||||
GNU Coreutils is a collection of widely used utilities such as ``cat``,
|
GNU Coreutils is a collection of widely used utilities such as ``cat``,
|
||||||
|
@ -370,32 +370,43 @@ packaging software on computer systems where a Bourne shell is available.
|
||||||
At this stage we still do not have a working autotools system, so we manually install
|
At this stage we still do not have a working autotools system, so we manually install
|
||||||
``autoconf`` script and replace a few placeholder variables with ``sed``.
|
``autoconf`` script and replace a few placeholder variables with ``sed``.
|
||||||
|
|
||||||
|
Autoconf 2.52 is the newest version of ``autoconf`` that does not need ``perl``, and hence
|
||||||
|
a bit easier to install.
|
||||||
|
|
||||||
|
automake 1.6.3
|
||||||
|
==============
|
||||||
|
|
||||||
|
GNU Automake is a tool for automatically generating Makefile.in files. It is another major
|
||||||
|
part of GNU Autotools build system and consists of ``aclocal`` and ``automake`` scripts.
|
||||||
|
|
||||||
|
We bootstrap it using a 3 stage process:
|
||||||
|
|
||||||
|
1. Use ``sed`` to replace a few placeholder variables in ``aclocal.in`` script.
|
||||||
|
Then we manually install ``aclocal`` script and its dependencies.
|
||||||
|
2. Patch ``configure.in`` to create ``automake`` file but skip ``Makefile.in`` processing.
|
||||||
|
Again we manually install ``automake`` script and its dependencies.
|
||||||
|
3. We now use ``aclocal``, ``autoconf``, and ``automake`` to do a proper build and install.
|
||||||
|
|
||||||
automake 1.4-p6
|
automake 1.4-p6
|
||||||
===============
|
===============
|
||||||
|
|
||||||
GNU Automake is a tool for automatically generating Makefile.in files. It is another
|
This is an older version of GNU Automake. Various versions of GNU Autotools are not fully
|
||||||
major part of GNU Autotools build system.
|
compatible, and we will need older ``automake`` to build some older software.
|
||||||
|
|
||||||
``automake`` again needs both ``automake`` and ``autoconf``. In order to bootstrap it
|
|
||||||
we patch ``configure.in`` file to produce ``automake`` and skip ``Makefile`` effectively
|
|
||||||
removing dependency on ``automake`` at the cost of having to install ``automake`` manually.
|
|
||||||
|
|
||||||
Then we rebuild both ``automake`` using already installed ``autoconf`` and ``automake``.
|
|
||||||
|
|
||||||
autoconf 2.52
|
autoconf 2.52
|
||||||
=============
|
=============
|
||||||
|
|
||||||
We now properly rebuild ``autoconf`` using ``autoconf`` and ``automake``.
|
We now properly rebuild ``autoconf`` using ``automake-1.4`` and manually installed ``autoconf``.
|
||||||
|
|
||||||
autoconf 2.13
|
autoconf 2.13
|
||||||
=============
|
=============
|
||||||
|
|
||||||
Different versions of autotools are not fully compatible, so build older ``autoconf`` too.
|
An older ``autoconf`` will be necessary to build GNU Binutils.
|
||||||
|
|
||||||
autoconf 2.12
|
autoconf 2.12
|
||||||
=============
|
=============
|
||||||
|
|
||||||
Yet another old autoconf version that we will need for GNU Binutils.
|
Yet another old autoconf version that we will need for some parts of GNU Binutils.
|
||||||
|
|
||||||
libtool 1.4
|
libtool 1.4
|
||||||
===========
|
===========
|
||||||
|
@ -438,11 +449,3 @@ interactively. This newer version of ``bash`` compiles without any patches,
|
||||||
provides new features, and is built with GNU readline support so it can be used
|
provides new features, and is built with GNU readline support so it can be used
|
||||||
as an interactive shell. autoconf 2.52 is used to regenerate the configure
|
as an interactive shell. autoconf 2.52 is used to regenerate the configure
|
||||||
script and bison is used to recreate some included generated files.
|
script and bison is used to recreate some included generated files.
|
||||||
|
|
||||||
automake 1.6.3
|
|
||||||
==============
|
|
||||||
|
|
||||||
This is a newer version of GNU Automake that is required to build newer
|
|
||||||
versions of ``autoconf``. We again use two stage approach like we did
|
|
||||||
with ``automake-1.4`` because previous versions of ``automake`` are too old
|
|
||||||
to properly build ``automake-1.6``.
|
|
||||||
|
|
12
rootfs.sh
12
rootfs.sh
|
@ -156,9 +156,6 @@ get_file ftp://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz 1
|
||||||
# coreutils 5.0
|
# coreutils 5.0
|
||||||
get_file https://ftp.gnu.org/gnu/coreutils/coreutils-5.0.tar.bz2 1
|
get_file https://ftp.gnu.org/gnu/coreutils/coreutils-5.0.tar.bz2 1
|
||||||
|
|
||||||
# coreutils 6.3
|
|
||||||
get_file https://ftp.gnu.org/gnu/coreutils/coreutils-6.3.tar.bz2
|
|
||||||
|
|
||||||
# heirloom-devtools
|
# heirloom-devtools
|
||||||
get_file http://downloads.sourceforge.net/project/heirloom/heirloom-devtools/070527/heirloom-devtools-070527.tar.bz2
|
get_file http://downloads.sourceforge.net/project/heirloom/heirloom-devtools/070527/heirloom-devtools-070527.tar.bz2
|
||||||
|
|
||||||
|
@ -189,6 +186,9 @@ get_file https://ftp.gnu.org/gnu/grep/grep-2.4.tar.gz
|
||||||
# diffutils 2.7
|
# diffutils 2.7
|
||||||
get_file https://ftp.gnu.org/gnu/diffutils/diffutils-2.7.tar.gz
|
get_file https://ftp.gnu.org/gnu/diffutils/diffutils-2.7.tar.gz
|
||||||
|
|
||||||
|
# coreutils 6.3
|
||||||
|
get_file https://ftp.gnu.org/gnu/coreutils/coreutils-6.3.tar.bz2
|
||||||
|
|
||||||
# gawk 3.0.4
|
# gawk 3.0.4
|
||||||
get_file https://ftp.gnu.org/gnu/gawk/gawk-3.0.4.tar.gz
|
get_file https://ftp.gnu.org/gnu/gawk/gawk-3.0.4.tar.gz
|
||||||
|
|
||||||
|
@ -210,6 +210,9 @@ get_file https://www.cpan.org/src/5.0/perl-5.6.2.tar.gz
|
||||||
# autoconf 2.52
|
# autoconf 2.52
|
||||||
get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.52.tar.gz
|
get_file https://ftp.gnu.org/gnu/autoconf/autoconf-2.52.tar.gz
|
||||||
|
|
||||||
|
# automake 1.6.3
|
||||||
|
get_file https://ftp.gnu.org/gnu/automake/automake-1.6.3.tar.bz2
|
||||||
|
|
||||||
# automake 1.4-p6
|
# automake 1.4-p6
|
||||||
get_file https://ftp.gnu.org/gnu/automake/automake-1.4-p6.tar.gz
|
get_file https://ftp.gnu.org/gnu/automake/automake-1.4-p6.tar.gz
|
||||||
|
|
||||||
|
@ -228,9 +231,6 @@ get_file https://ftp.gnu.org/gnu/binutils/binutils-2.14.tar.bz2
|
||||||
# bash 3.2.57
|
# bash 3.2.57
|
||||||
get_file https://ftp.gnu.org/gnu/bash/bash-3.2.57.tar.gz
|
get_file https://ftp.gnu.org/gnu/bash/bash-3.2.57.tar.gz
|
||||||
|
|
||||||
# automake 1.6.3
|
|
||||||
get_file https://ftp.gnu.org/gnu/automake/automake-1.6.3.tar.bz2
|
|
||||||
|
|
||||||
# General cleanup
|
# General cleanup
|
||||||
find tmp -name .git -exec rm -rf \;
|
find tmp -name .git -exec rm -rf \;
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,9 @@
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
cp autoconf.in autoconf
|
cp autoconf.in autoconf
|
||||||
sed -i "s# @SHELL@#/bin/sh#" autoconf
|
sed -i -e "s# @SHELL@#/bin/sh#" -e 's/@M4@/m4/' -e 's/@AWK@/awk/' \
|
||||||
sed -i 's/@M4@/m4/' autoconf
|
-e 's/@PACKAGE_NAME@/Autoconf/' -e 's/@VERSION@/2.52/' \
|
||||||
sed -i 's/@AWK@/awk/' autoconf
|
-e "s#@datadir@#${PREFIX}/share/autoconf-2.52#" autoconf
|
||||||
sed -i 's/@PACKAGE_NAME@/Autoconf/' autoconf
|
|
||||||
sed -i 's/@VERSION@/2.52/' autoconf
|
|
||||||
sed -i "s#@datadir@#${PREFIX}/share/autoconf-2.52#" autoconf
|
|
||||||
chmod +x autoconf
|
chmod +x autoconf
|
||||||
|
|
||||||
m4 autoconf.m4 --freeze-state=autoconf.m4f
|
m4 autoconf.m4 --freeze-state=autoconf.m4f
|
||||||
|
|
|
@ -10,7 +10,7 @@ src_prepare() {
|
||||||
|
|
||||||
# Install autoconf data files into versioned directory
|
# Install autoconf data files into versioned directory
|
||||||
for file in */Makefile.in Makefile.in; do
|
for file in */Makefile.in Makefile.in; do
|
||||||
sed -i '/^pkgdatadir/s:$:-@VERSION@:' $file
|
sed -i '/^pkgdatadir/s:$:-@VERSION@:' $file
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
src_prepare() {
|
||||||
|
rm configure Makefile.in */Makefile.in aclocal.m4
|
||||||
|
aclocal-1.6
|
||||||
|
autoconf-2.52
|
||||||
|
# When building with newer automake we get the following error
|
||||||
|
# Makefile.am:59: ETAGS_ARGS multiply defined in condition TRUE
|
||||||
|
sed -i '/ETAGS_ARGS/,+1d' Makefile.am
|
||||||
|
automake-1.6
|
||||||
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
./configure --prefix=/after
|
||||||
|
}
|
|
@ -1,30 +0,0 @@
|
||||||
# SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
sed -i 's#m4/Makefile tests/Makefile##; s/Makefile //' configure.in
|
|
||||||
|
|
||||||
rm configure Makefile.in */Makefile.in
|
|
||||||
autoconf-2.52
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
./configure --prefix=/after
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
cp m4/amversion.in m4/amversion.m4
|
|
||||||
sed -i 's/@VERSION@/1.4-p6/' m4/amversion.m4
|
|
||||||
sed -i 's/@APIVERSION@/1.4/' m4/amversion.m4
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
install automake "${PREFIX}"/bin/automake-1.4
|
|
||||||
mkdir -p "${PREFIX}"/share/automake-1.4
|
|
||||||
cp -r *.am "${PREFIX}"/share/automake-1.4/
|
|
||||||
|
|
||||||
install aclocal "${PREFIX}"/bin/aclocal-1.4
|
|
||||||
mkdir -p "${PREFIX}"/share/aclocal-1.4
|
|
||||||
cp -r m4/*.m4 "${PREFIX}"/share/aclocal-1.4/
|
|
||||||
}
|
|
|
@ -3,27 +3,22 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
sed -i '/Makefile/d' configure.in
|
|
||||||
|
|
||||||
rm configure Makefile.in */Makefile.in */*/Makefile.in aclocal.m4
|
rm configure Makefile.in */Makefile.in */*/Makefile.in aclocal.m4
|
||||||
autoconf-2.52
|
cp aclocal.in aclocal
|
||||||
}
|
cp m4/amversion.in m4/amversion.m4
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
./configure --prefix=/after
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
cp m4/amversion.in m4/amversion.m4
|
sed -i -e 's/@VERSION@/1.6.3/' -e 's/@APIVERSION@/1.6/' m4/amversion.m4
|
||||||
sed -i 's/@VERSION@/1.6.3/' m4/amversion.m4
|
|
||||||
sed -i 's/@APIVERSION@/1.6/' m4/amversion.m4
|
sed -i -e 's#@PERL@#/after/bin/perl#' -e 's/@PACKAGE@/automake/' \
|
||||||
|
-e 's/@APIVERSION@/1.6/' -e 's/@VERSION@/1.6.3/' \
|
||||||
|
-e 's#@prefix@#/after#' -e 's#@datadir@#/after/share#' aclocal
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
install automake "${PREFIX}"/bin/automake-1.6
|
mkdir -p "${PREFIX}"/share/automake-1.6/Automake
|
||||||
mkdir -p "${PREFIX}"/share/automake-1.6/{Automake,am}
|
|
||||||
cp lib/Automake/*.pm "${PREFIX}"/share/automake-1.6/Automake/
|
cp lib/Automake/*.pm "${PREFIX}"/share/automake-1.6/Automake/
|
||||||
cp -r lib/am/*.am "${PREFIX}"/share/automake-1.6/am/
|
|
||||||
|
|
||||||
install aclocal "${PREFIX}"/bin/aclocal-1.6
|
install aclocal "${PREFIX}"/bin/aclocal-1.6
|
||||||
mkdir -p "${PREFIX}"/share/aclocal-1.6
|
mkdir -p "${PREFIX}"/share/aclocal-1.6
|
||||||
|
|
|
@ -3,22 +3,29 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
|
sed -i '/Makefile/d' configure.in
|
||||||
|
|
||||||
rm configure Makefile.in */Makefile.in */*/Makefile.in aclocal.m4
|
rm configure Makefile.in */Makefile.in */*/Makefile.in aclocal.m4
|
||||||
aclocal-1.6
|
aclocal-1.6
|
||||||
autoconf-2.52
|
autoconf-2.52
|
||||||
automake-1.6
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
./configure --prefix=/after
|
./configure --prefix=/after
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_compile() {
|
||||||
# cleanup old manual install
|
cp m4/amversion.in m4/amversion.m4
|
||||||
rm "${PREFIX}"/bin/automake-1.6
|
sed -i 's/@VERSION@/1.6.3/' m4/amversion.m4
|
||||||
rm "${PREFIX}"/bin/aclocal-1.6
|
sed -i 's/@APIVERSION@/1.6/' m4/amversion.m4
|
||||||
rm -rf "${PREFIX}"/share/automake-1.6
|
}
|
||||||
rm -rf "${PREFIX}"/share/aclocal-1.6
|
|
||||||
|
src_install() {
|
||||||
default_src_install
|
install automake "${PREFIX}"/bin/automake-1.6
|
||||||
|
mkdir -p "${PREFIX}"/share/automake-1.6/am
|
||||||
|
cp lib/Automake/*.pm "${PREFIX}"/share/automake-1.6/Automake/
|
||||||
|
cp -r lib/am/*.am "${PREFIX}"/share/automake-1.6/am/
|
||||||
|
|
||||||
|
install aclocal "${PREFIX}"/bin/aclocal-1.6
|
||||||
|
cp -r m4/*.m4 "${PREFIX}"/share/aclocal-1.6/
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
rm configure Makefile.in */Makefile.in
|
rm configure Makefile.in */Makefile.in */*/Makefile.in aclocal.m4
|
||||||
|
aclocal-1.6
|
||||||
autoconf-2.52
|
autoconf-2.52
|
||||||
aclocal-1.4
|
automake-1.6
|
||||||
automake-1.4
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_configure() {
|
src_configure() {
|
||||||
|
@ -15,9 +15,10 @@ src_configure() {
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
# cleanup old manual install
|
# cleanup old manual install
|
||||||
rm "${PREFIX}"/bin/automake-1.4
|
rm "${PREFIX}"/bin/automake-1.6
|
||||||
rm -rf "${PREFIX}"/share/automake-1.4
|
rm "${PREFIX}"/bin/aclocal-1.6
|
||||||
rm -rf "${PREFIX}"/share/aclocal-1.4
|
rm -rf "${PREFIX}"/share/automake-1.6
|
||||||
|
rm -rf "${PREFIX}"/share/aclocal-1.6
|
||||||
|
|
||||||
default_src_install
|
default_src_install
|
||||||
}
|
}
|
|
@ -76,8 +76,11 @@ populate_device_nodes
|
||||||
|
|
||||||
build autoconf-2.52 stage1.sh
|
build autoconf-2.52 stage1.sh
|
||||||
|
|
||||||
build automake-1.4-p6 stage1.sh
|
build automake-1.6.3 stage1.sh
|
||||||
build automake-1.4-p6 stage2.sh
|
build automake-1.6.3 stage2.sh
|
||||||
|
build automake-1.6.3 stage3.sh
|
||||||
|
|
||||||
|
build automake-1.4-p6
|
||||||
|
|
||||||
build autoconf-2.52 stage2.sh
|
build autoconf-2.52 stage2.sh
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,6 @@
|
||||||
set -e
|
set -e
|
||||||
. helpers.sh
|
. helpers.sh
|
||||||
|
|
||||||
build automake-1.6.3 stage1.sh
|
|
||||||
build automake-1.6.3 stage2.sh
|
|
||||||
|
|
||||||
echo "Bootstrapping completed."
|
echo "Bootstrapping completed."
|
||||||
|
|
||||||
exec env - PATH=/after/bin PS1="\w # " bash -i
|
exec env - PATH=/after/bin PS1="\w # " bash -i
|
||||||
|
|
Loading…
Reference in New Issue