2011-01-28 23:57:02 +00:00
|
|
|
# Build script for make
|
|
|
|
|
2018-11-19 23:17:37 +00:00
|
|
|
do_companion_tools_make_get()
|
|
|
|
{
|
2017-05-30 05:32:38 +00:00
|
|
|
CT_Fetch MAKE
|
2011-01-28 23:57:02 +00:00
|
|
|
}
|
|
|
|
|
2018-11-19 23:17:37 +00:00
|
|
|
do_companion_tools_make_extract()
|
|
|
|
{
|
2017-05-30 05:32:38 +00:00
|
|
|
CT_ExtractPatch MAKE
|
2011-01-28 23:57:02 +00:00
|
|
|
}
|
|
|
|
|
2018-11-19 23:17:37 +00:00
|
|
|
do_companion_tools_make_for_build()
|
|
|
|
{
|
2017-01-24 02:48:22 +00:00
|
|
|
CT_DoStep INFO "Installing make for build"
|
2016-11-29 00:55:22 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2018-11-19 23:17:37 +00:00
|
|
|
do_companion_tools_make_for_host()
|
|
|
|
{
|
2017-01-24 02:48:22 +00:00
|
|
|
CT_DoStep INFO "Installing make for host"
|
2016-11-29 00:55:22 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
|
2018-11-19 23:17:37 +00:00
|
|
|
do_make_backend()
|
|
|
|
{
|
2016-11-29 00:55:22 +00:00
|
|
|
local host
|
|
|
|
local prefix
|
|
|
|
local cflags
|
|
|
|
local ldflags
|
2017-03-10 19:59:52 +00:00
|
|
|
local -a extra_config
|
2016-11-29 00:55:22 +00:00
|
|
|
|
|
|
|
for arg in "$@"; do
|
|
|
|
eval "${arg// /\\ }"
|
|
|
|
done
|
2011-01-28 23:57:02 +00:00
|
|
|
|
2017-03-10 19:59:52 +00:00
|
|
|
if [ "${host}" != "${CT_BUILD}" ]; then
|
|
|
|
extra_config+=( --without-guile )
|
|
|
|
fi
|
|
|
|
|
2016-11-23 02:10:23 +00:00
|
|
|
CT_DoLog EXTRA "Configuring make"
|
2016-11-29 00:55:22 +00:00
|
|
|
CT_DoExecLog CFG \
|
|
|
|
CFLAGS="${cflags}" \
|
|
|
|
LDFLAGS="${ldflags}" \
|
2017-01-25 08:06:28 +00:00
|
|
|
${CONFIG_SHELL} \
|
2017-05-30 05:32:38 +00:00
|
|
|
"${CT_SRC_DIR}/make/configure" \
|
2016-11-29 00:55:22 +00:00
|
|
|
--host="${host}" \
|
2017-03-10 19:59:52 +00:00
|
|
|
--prefix="${prefix}" \
|
|
|
|
"${extra_config[@]}"
|
2016-11-23 02:10:23 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Building make"
|
2016-11-21 07:50:17 +00:00
|
|
|
CT_DoExecLog ALL make
|
2016-11-23 02:10:23 +00:00
|
|
|
|
|
|
|
CT_DoLog EXTRA "Installing make"
|
2016-11-21 07:50:17 +00:00
|
|
|
CT_DoExecLog ALL make install
|
2011-01-28 23:57:02 +00:00
|
|
|
}
|