summaryrefslogtreecommitdiff
path: root/scripts/build/companion_tools
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build/companion_tools')
-rw-r--r--scripts/build/companion_tools/050-make.sh63
-rw-r--r--scripts/build/companion_tools/100-m4.sh66
-rw-r--r--scripts/build/companion_tools/200-autoconf.sh46
-rw-r--r--scripts/build/companion_tools/300-automake.sh44
-rw-r--r--scripts/build/companion_tools/400-libtool.sh44
5 files changed, 201 insertions, 62 deletions
diff --git a/scripts/build/companion_tools/050-make.sh b/scripts/build/companion_tools/050-make.sh
index 3d6da7c..d8f6b66 100644
--- a/scripts/build/companion_tools/050-make.sh
+++ b/scripts/build/companion_tools/050-make.sh
@@ -1,7 +1,5 @@
# Build script for make
-CT_MAKE_VERSION=3.81
-
do_companion_tools_make_get() {
CT_GetFile "make-${CT_MAKE_VERSION}" \
{http,ftp,https}://ftp.gnu.org/gnu/make
@@ -13,18 +11,57 @@ do_companion_tools_make_extract() {
CT_Patch "make" "${CT_MAKE_VERSION}"
}
-do_companion_tools_make_build() {
- CT_DoStep EXTRA "Installing make"
- mkdir -p "${CT_BUILD_DIR}/build-make"
- CT_Pushd "${CT_BUILD_DIR}/build-make"
-
- CT_DoExecLog CFG "${CT_SRC_DIR}/make-${CT_MAKE_VERSION}/configure" \
- --prefix="${CT_BUILDTOOLS_PREFIX_DIR}"
- CT_DoExecLog ALL ${make}
- CT_DoExecLog ALL ${make} install
- if [ "${CT_COMP_TOOLS_make_gmake}" = "y" ]; then
- CT_DoExecLog ALL ln -sv ${make} "${CT_BUILDTOOLS_PREFIX_DIR}/bin/gmake"
+do_companion_tools_make_for_build() {
+ CT_DoStep EXTRA "Installing make for build"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-make-build"
+ do_make_backend \
+ host=${CT_BUILD} \
+ prefix="${CT_BUILD_COMPTOOLS_DIR}" \
+ cflags="${CT_CFLAGS_FOR_BUILD}" \
+ ldflags="${CT_LDFLAGS_FOR_BUILD}"
+ CT_Popd
+ if [ "${CT_MAKE_GMAKE_SYMLINK}" = "y" ]; then
+ CT_DoExecLog ALL ln -sv make "${CT_BUILD_COMPTOOLS_DIR}/bin/gmake"
fi
+ CT_EndStep
+}
+
+do_companion_tools_make_for_host() {
+ CT_DoStep EXTRA "Installing make for host"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-make-host"
+ do_make_backend \
+ host=${CT_HOST} \
+ prefix="${CT_PREFIX_DIR}" \
+ cflags="${CT_CFLAGS_FOR_HOST}" \
+ ldflags="${CT_LDFLAGS_FOR_HOST}"
CT_Popd
+ if [ "${CT_MAKE_GMAKE_SYMLINK}" = "y" ]; then
+ CT_DoExecLog ALL ln -sv make "${CT_PREFIX_DIR}/bin/gmake"
+ fi
CT_EndStep
}
+
+do_make_backend() {
+ local host
+ local prefix
+ local cflags
+ local ldflags
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ CT_DoLog EXTRA "Configuring make"
+ CT_DoExecLog CFG \
+ CFLAGS="${cflags}" \
+ LDFLAGS="${ldflags}" \
+ "${CT_SRC_DIR}/make-${CT_MAKE_VERSION}/configure" \
+ --host="${host}" \
+ --prefix="${prefix}"
+
+ CT_DoLog EXTRA "Building make"
+ CT_DoExecLog ALL make
+
+ CT_DoLog EXTRA "Installing make"
+ CT_DoExecLog ALL make install
+}
diff --git a/scripts/build/companion_tools/100-m4.sh b/scripts/build/companion_tools/100-m4.sh
index 35721d5..96cde39 100644
--- a/scripts/build/companion_tools/100-m4.sh
+++ b/scripts/build/companion_tools/100-m4.sh
@@ -1,7 +1,5 @@
# Build script for m4
-CT_M4_VERSION=1.4.13
-
do_companion_tools_m4_get() {
CT_GetFile "m4-${CT_M4_VERSION}" \
{http,ftp,https}://ftp.gnu.org/gnu/m4
@@ -12,16 +10,60 @@ do_companion_tools_m4_extract() {
CT_Patch "m4" "${CT_M4_VERSION}"
}
-do_companion_tools_m4_build() {
- CT_DoStep EXTRA "Installing m4"
- mkdir -p "${CT_BUILD_DIR}/build-m4"
- CT_Pushd "${CT_BUILD_DIR}/build-m4"
-
- CT_DoExecLog CFG \
- "${CT_SRC_DIR}/m4-${CT_M4_VERSION}/configure" \
- --prefix="${CT_BUILDTOOLS_PREFIX_DIR}"
- CT_DoExecLog ALL ${make}
- CT_DoExecLog ALL ${make} install
+do_companion_tools_m4_for_build() {
+ CT_DoStep EXTRA "Installing m4 for build"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-m4-build"
+ do_m4_backend \
+ host=${CT_BUILD} \
+ prefix="${CT_BUILD_COMPTOOLS_DIR}" \
+ cflags="${CT_CFLAGS_FOR_BUILD}" \
+ ldflags="${CT_LDFLAGS_FOR_BUILD}"
CT_Popd
CT_EndStep
}
+
+do_companion_tools_m4_for_host() {
+ CT_DoStep EXTRA "Installing m4 for host"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-m4-host"
+ do_m4_backend \
+ host=${CT_HOST} \
+ prefix="${CT_PREFIX_DIR}" \
+ cflags="${CT_CFLAGS_FOR_HOST}" \
+ ldflags="${CT_LDFLAGS_FOR_HOST}"
+ CT_Popd
+ CT_EndStep
+}
+
+do_m4_backend() {
+ local host
+ local prefix
+ local cflags
+ local ldflags
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ case "${host}" in
+ *-uclibc)
+ # uClibc has posix_spawn in librt, but m4 configure only
+ # searches in libc. This leads to a later failure when
+ # it includes system <spawn.h> but expects a locally-built
+ # posix_spawn().
+ ldflags="${ldflags} -lrt"
+ esac
+
+ CT_DoLog EXTRA "Configuring m4"
+ CT_DoExecLog CFG \
+ CFLAGS="${cflags}" \
+ LDFLAGS="${ldflags}" \
+ "${CT_SRC_DIR}/m4-${CT_M4_VERSION}/configure" \
+ --host="${host}" \
+ --prefix="${prefix}"
+
+ CT_DoLog EXTRA "Building m4"
+ CT_DoExecLog ALL make
+
+ CT_DoLog EXTRA "Installing m4"
+ CT_DoExecLog ALL make install
+}
diff --git a/scripts/build/companion_tools/200-autoconf.sh b/scripts/build/companion_tools/200-autoconf.sh
index def6ddc..95b7115 100644
--- a/scripts/build/companion_tools/200-autoconf.sh
+++ b/scripts/build/companion_tools/200-autoconf.sh
@@ -1,7 +1,5 @@
# Build script for autoconf
-CT_AUTOCONF_VERSION=2.65
-
do_companion_tools_autoconf_get() {
CT_GetFile "autoconf-${CT_AUTOCONF_VERSION}" \
{http,ftp,https}://ftp.gnu.org/gnu/autoconf
@@ -13,21 +11,43 @@ do_companion_tools_autoconf_extract() {
CT_Patch "autoconf" "${CT_AUTOCONF_VERSION}"
}
-do_companion_tools_autoconf_build() {
- CT_DoStep EXTRA "Installing autoconf"
- mkdir -p "${CT_BUILD_DIR}/build-autoconf"
- CT_Pushd "${CT_BUILD_DIR}/build-autoconf"
-
+do_companion_tools_autoconf_for_build() {
+ CT_DoStep EXTRA "Installing autoconf for build"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-autoconf-build"
+ do_autoconf_backend host=${CT_BUILD} prefix="${CT_BUILD_COMPTOOLS_DIR}"
+ CT_Popd
+ CT_EndStep
+}
+
+do_companion_tools_autoconf_for_host() {
+ CT_DoStep EXTRA "Installing autoconf for host"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-autoconf-host"
+ do_autoconf_backend host=${CT_HOST} prefix="${CT_PREFIX_DIR}"
+ CT_Popd
+ CT_EndStep
+}
+
+do_autoconf_backend() {
+ local host
+ local prefix
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
# Ensure configure gets run using the CONFIG_SHELL as configure seems to
# have trouble when CONFIG_SHELL is set and /bin/sh isn't bash
# For reference see:
# http://www.gnu.org/software/autoconf/manual/autoconf.html#CONFIG_005fSHELL
-
+ CT_DoLog EXTRA "Configuring autoconf"
CT_DoExecLog CFG ${CONFIG_SHELL} \
"${CT_SRC_DIR}/autoconf-${CT_AUTOCONF_VERSION}/configure" \
- --prefix="${CT_BUILDTOOLS_PREFIX_DIR}"
- CT_DoExecLog ALL ${make}
- CT_DoExecLog ALL ${make} install
- CT_Popd
- CT_EndStep
+ --host="${host}" \
+ --prefix="${prefix}"
+
+ CT_DoLog EXTRA "Building autoconf"
+ CT_DoExecLog ALL make
+
+ CT_DoLog EXTRA "Installing autoconf"
+ CT_DoExecLog ALL make install
}
diff --git a/scripts/build/companion_tools/300-automake.sh b/scripts/build/companion_tools/300-automake.sh
index ff286dd..85afaea 100644
--- a/scripts/build/companion_tools/300-automake.sh
+++ b/scripts/build/companion_tools/300-automake.sh
@@ -1,7 +1,5 @@
# Build script for automake
-CT_AUTOMAKE_VERSION=1.11.1
-
do_companion_tools_automake_get() {
CT_GetFile "automake-${CT_AUTOMAKE_VERSION}" \
{http,ftp,https}://ftp.gnu.org/gnu/automake
@@ -13,16 +11,38 @@ do_companion_tools_automake_extract() {
CT_Patch "automake" "${CT_AUTOMAKE_VERSION}"
}
-do_companion_tools_automake_build() {
- CT_DoStep EXTRA "Installing automake"
- mkdir -p "${CT_BUILD_DIR}/build-automake"
- CT_Pushd "${CT_BUILD_DIR}/build-automake"
-
- CT_DoExecLog CFG \
- "${CT_SRC_DIR}/automake-${CT_AUTOMAKE_VERSION}/configure" \
- --prefix="${CT_BUILDTOOLS_PREFIX_DIR}"
- CT_DoExecLog ALL ${make}
- CT_DoExecLog ALL ${make} install
+do_companion_tools_automake_for_build() {
+ CT_DoStep EXTRA "Installing automake for build"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-automake-build"
+ do_automake_backend host=${CT_BUILD} prefix="${CT_BUILD_COMPTOOLS_DIR}"
+ CT_Popd
+ CT_EndStep
+}
+
+do_companion_tools_automake_for_host() {
+ CT_DoStep EXTRA "Installing automake for host"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-automake-host"
+ do_automake_backend host=${CT_HOST} prefix="${CT_PREFIX_DIR}"
CT_Popd
CT_EndStep
}
+
+do_automake_backend() {
+ local host
+ local prefix
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ CT_DoLog EXTRA "Configuring automake"
+ CT_DoExecLog CFG "${CT_SRC_DIR}/automake-${CT_AUTOMAKE_VERSION}/configure" \
+ --host="${host}" \
+ --prefix="${prefix}"
+
+ CT_DoLog EXTRA "Building automake"
+ CT_DoExecLog ALL make
+
+ CT_DoLog EXTRA "Installing automake"
+ CT_DoExecLog ALL make install
+}
diff --git a/scripts/build/companion_tools/400-libtool.sh b/scripts/build/companion_tools/400-libtool.sh
index fa5dc59..39aa204 100644
--- a/scripts/build/companion_tools/400-libtool.sh
+++ b/scripts/build/companion_tools/400-libtool.sh
@@ -1,7 +1,5 @@
# Build script for libtool
-CT_LIBTOOL_VERSION=2.4.6
-
do_companion_tools_libtool_get() {
CT_GetFile "libtool-${CT_LIBTOOL_VERSION}" \
{http,ftp,https}://ftp.gnu.org/gnu/libtool
@@ -13,16 +11,38 @@ do_companion_tools_libtool_extract() {
CT_Patch "libtool" "${CT_LIBTOOL_VERSION}"
}
-do_companion_tools_libtool_build() {
- CT_DoStep EXTRA "Installing libtool"
- mkdir -p "${CT_BUILD_DIR}/build-libtool"
- CT_Pushd "${CT_BUILD_DIR}/build-libtool"
-
- CT_DoExecLog CFG \
- "${CT_SRC_DIR}/libtool-${CT_LIBTOOL_VERSION}/configure" \
- --prefix="${CT_BUILDTOOLS_PREFIX_DIR}"
- CT_DoExecLog ALL ${make}
- CT_DoExecLog ALL ${make} install
+do_companion_tools_libtool_for_build() {
+ CT_DoStep EXTRA "Installing libtool for build"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-libtool-build"
+ do_libtool_backend host=${CT_BUILD} prefix="${CT_BUILD_COMPTOOLS_DIR}"
+ CT_Popd
+ CT_EndStep
+}
+
+do_companion_tools_libtool_for_host() {
+ CT_DoStep EXTRA "Installing libtool for host"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-libtool-host"
+ do_libtool_backend host=${CT_HOST} prefix="${CT_PREFIX_DIR}"
CT_Popd
CT_EndStep
}
+
+do_libtool_backend() {
+ local host
+ local prefix
+
+ for arg in "$@"; do
+ eval "${arg// /\\ }"
+ done
+
+ CT_DoLog EXTRA "Configuring libtool"
+ CT_DoExecLog CFG "${CT_SRC_DIR}/libtool-${CT_LIBTOOL_VERSION}/configure" \
+ --host="${host}" \
+ --prefix="${prefix}"
+
+ CT_DoLog EXTRA "Building libtool"
+ CT_DoExecLog ALL make
+
+ CT_DoLog EXTRA "Installing libtool"
+ CT_DoExecLog ALL make install
+}