umm, make configure scripts work with CC, AS, and LD set or unset

git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@10 67a159dc-881f-0410-a524-ba9dfbe2cb84
cleanup-cruft
Brad House 21 years ago
parent c618040a4a
commit a19f2f33f1

@ -44,6 +44,38 @@ compile_utils_args()
echo -n "${ARGS}" echo -n "${ARGS}"
} }
export_utils_args()
{
if [ "${UTILS_CC}" != "" ]
then
export CC="${UTILS_CC}"
fi
if [ "${UTILS_LD}" != "" ]
then
export LD="${UTILS_LD}"
fi
if [ "${UTILS_AS}" != "" ]
then
export AS="${UTILS_AS}"
fi
}
unset_utils_args()
{
if [ "${UTILS_CC}" != "" ]
then
unset CC
fi
if [ "${UTILS_LD}" != "" ]
then
unset LD
fi
if [ "${UTILS_AS}" != "" ]
then
unset AS
fi
}
compile_generic() { compile_generic() {
local RET local RET
if [ "$#" -lt "2" ] if [ "$#" -lt "2" ]
@ -137,6 +169,7 @@ compile_busybox() {
} }
compile_modutils() { compile_modutils() {
local ARGS
if [ ! -f "${MODUTILS_BINCACHE}" ] if [ ! -f "${MODUTILS_BINCACHE}" ]
then then
[ ! -f "${MODUTILS_SRCTAR}" ] && gen_die "Could not find modutils source tarball: ${MODUTILS_BINCACHE}" [ ! -f "${MODUTILS_SRCTAR}" ] && gen_die "Could not find modutils source tarball: ${MODUTILS_BINCACHE}"
@ -146,8 +179,9 @@ compile_modutils() {
[ ! -d "${MODUTILS_DIR}" ] && gen_die "Modutils directory ${MODUTILS_DIR} invalid" [ ! -d "${MODUTILS_DIR}" ] && gen_die "Modutils directory ${MODUTILS_DIR} invalid"
cd "${MODUTILS_DIR}" cd "${MODUTILS_DIR}"
print_info 1 "modutils: configure" print_info 1 "modutils: configure"
ARGS=`compile_utils_args` export_utils_args
env ${ARGS} ./configure --disable-combined --enable-insmod-static >> ${DEBUGFILE} 2>&1 || gen_die "Configure of modutils failed" ./configure --disable-combined --enable-insmod-static >> ${DEBUGFILE} 2>&1 || gen_die "Configure of modutils failed"
unset_utils_args
print_info 1 "modutils: make all" print_info 1 "modutils: make all"
compile_generic "all" utils compile_generic "all" utils
print_info 1 "modutils: copying to bincache" print_info 1 "modutils: copying to bincache"
@ -162,6 +196,7 @@ compile_modutils() {
} }
compile_module_init_tools() { compile_module_init_tools() {
local ARGS
if [ ! -f "${MODULE_INIT_TOOLS_BINCACHE}" ] if [ ! -f "${MODULE_INIT_TOOLS_BINCACHE}" ]
then then
[ ! -f "${MODULE_INIT_TOOLS_SRCTAR}" ] && gen_die "Could not find module-init-tools source tarball: ${MODULE_INIT_TOOLS_BINCACHE}" [ ! -f "${MODULE_INIT_TOOLS_SRCTAR}" ] && gen_die "Could not find module-init-tools source tarball: ${MODULE_INIT_TOOLS_BINCACHE}"
@ -171,8 +206,9 @@ compile_module_init_tools() {
[ ! -d "${MODULE_INIT_TOOLS_DIR}" ] && gen_die "Module-init-tools directory ${MODULE_INIT_TOOLS_DIR} invalid" [ ! -d "${MODULE_INIT_TOOLS_DIR}" ] && gen_die "Module-init-tools directory ${MODULE_INIT_TOOLS_DIR} invalid"
cd "${MODULE_INIT_TOOLS_DIR}" cd "${MODULE_INIT_TOOLS_DIR}"
print_info 1 "module-init-tools: configure" print_info 1 "module-init-tools: configure"
ARGS=`compile_utils_args` export_utils_args
env ${ARGS} ./configure >> ${DEBUGFILE} 2>&1 || gen_die "Configure of module-init-tools failed" ./configure >> ${DEBUGFILE} 2>&1 || gen_die "Configure of module-init-tools failed"
unset_utils_args
print_info 1 "module-init-tools: make all" print_info 1 "module-init-tools: make all"
compile_generic "all" utils compile_generic "all" utils
print_info 1 "module-init-tools: copying to bincache" print_info 1 "module-init-tools: copying to bincache"

Loading…
Cancel
Save