mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

158 lines
5.0 KiB

#
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/scripts/parse-config
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
#
# This script sets environment settings and parses the
# configuration file config/$config/config
#
# [BEGIN] of version section
rockver=TRUNK
# [END] of version section
crossnative=native ; stagelevel=${stagelevel:-1} ; arch=any
arch_sizeof_long_long=undef ; arch_sizeof_int=undef ; arch_machine=undef
arch_sizeof_char_p=undef ; arch_sizeof_long=undef ; arch_bigendian=undef
arch_sizeof_short=undef ; arch_target=any-unknown-linux
if [ -f config/$config/config ]
then
. config/$config/config
else
echo
echo "ERROR: No configuration '$config' found!"
echo
echo "Please create a configuration using ./scripts/Config."
echo
exit 1
fi
if [ "${!ROCK_DEBUG_*}" ]; then
echo "WARNING: Found ROCK_DEBUG_* in environment!" >&2
fi
. misc/output/parse-config
[ "$ROCKCFG_CROSSBUILD" = 1 ] && crossnative=cross
arch="${ROCKCFG_ARCH:-none}" ; target="${ROCKCFG_TARGET:-none}"
if [ -f "architecture/$arch/archtest.out" ]
then . "architecture/$arch/archtest.out" ; fi
if [ -f "architecture/$arch/archtest.sh" ]
then . "architecture/$arch/archtest.sh" ; fi
base=$(pwd -P)
if [ "$ROCK_THIS_IS_CHROOT" = 1 ]
then
toolsdir=tools.chroot
else
if [ $stagelevel -le 1 -a "$ROCKCFG_USE_CROSSCC" = 1 ]
then
toolsdir=tools.cross
else
toolsdir=tools.native
fi
fi
new_path=""
for x in ${PATH//:/ }; do
if [ -d "$x" -a -z "${x##/*}" -a -n "${x##$base/*}" -a \
"$x" != "$CMD_WRAPPER_MYPATH" -a "$x" != "." ]; then
new_path="$new_path:$x"
fi
done
export PATH="${new_path#:}"
unset new_path
if [ $stagelevel -le 1 -a "$ROCKCFG_USE_CROSSCC" = 1 ] ; then
export PATH="$base/build/$ROCKCFG_ID/ROCK/$toolsdir/crosscc:$PATH"
fi
export PATH="$base/build/$ROCKCFG_ID/ROCK/$toolsdir/bin:$PATH"
export PATH="$base/build/$ROCKCFG_ID/ROCK/$toolsdir/wrapper:$PATH"
unset LANG ${!LC_*}; export LC_ALL=C; umask 022
export BUILDCC="cc" BUILD_CC="cc" HOSTCC="cc" HOST_CC="cc"
export BUILDCXX="c++" BUILD_CXX="c++" HOSTCXX="c++" HOST_CXX="c++"
if [ "$ROCKCFG_LINGUAS" == "all" ] ; then
unset LINGUAS
else
export LINGUAS="$ROCKCFG_LINGUAS"
fi
unset CPP ARFLAGS ASFLAGS CFLAGS CXXFLAGS CPPFLAGS FFLAGS LDFLAGS
unset LD_LIBRARY_PATH LD_PRELOAD FLWRAPPER C_INCLUDE_PATH CONFIG_SITE
unset DISPLAY BASH_ENV CDPATH GLOBIGNORE IFS MAIL MAILPATH
unset POSIXLY_CORRECT PROMPT_COMMAND TIMEFORMAT TMOUT
IFS=$' \t\n'
set +o posix
export STRIP_WRAPPER_MYPATH="$base/build/$ROCKCFG_ID/ROCK/$toolsdir/wrapper"
export STRIP_WRAPPER_NOLOOP=0
export INSTALL_WRAPPER_MYPATH="$base/build/$ROCKCFG_ID/ROCK/$toolsdir/wrapper"
export INSTALL_WRAPPER_LOGFILE="/dev/null"
export INSTALL_WRAPPER_FILTER=""
export INSTALL_WRAPPER_NOLOOP=0
export CMD_WRAPPER_MYPATH="$base/build/$ROCKCFG_ID/ROCK/$toolsdir/wrapper"
export CMD_WRAPPER_LOGFILE="" CMD_WRAPPER_DEBUG=0 CMD_WRAPPER_BYPASS=0
export CMD_WRAPPER_NOLOOP=0 ; unset CMD_WRAPPER_OTHERS_TMP
if [ -f $base/build/$ROCKCFG_ID/ROCK/$toolsdir/lib/wrapper-config ]
then . $base/build/$ROCKCFG_ID/ROCK/$toolsdir/lib/wrapper-config ; fi
if [ "$stagelevel" -gt 1 -o "$ROCKCFG_USE_CROSSCC" = 0 ]
then
if [ -f $base/build/$ROCKCFG_ID/ROCK/$toolsdir/lib/parse-config-fixarch ]
then . $base/build/$ROCKCFG_ID/ROCK/$toolsdir/lib/parse-config-fixarch ; fi
arch_build="$arch_target" ; archprefix=""
else
arch_build="`uname -m`-nocross-linux-gnu"
if [ -f $base/build/$ROCKCFG_ID/ROCK/$toolsdir/lib/parse-config-fixarch ]
then . $base/build/$ROCKCFG_ID/ROCK/$toolsdir/lib/parse-config-fixarch ; fi
if [ $stagelevel -eq 1 ]; then
archprefix="${arch_target}-"
if [ ! -f "$base/build/$ROCKCFG_ID/ROCK/$toolsdir/`
`crosscc/${archprefix}gcc" ]
then archprefix="Cross_CC_not_built_so_far_" ; fi
fi
fi
export CC="${archprefix}cc" CXX="${archprefix}c++"
export AS="${archprefix}as" STRIP="${archprefix}strip"
export LD="${archprefix}ld" GASP="${archprefix}gasp"
export AR="${archprefix}ar" RANLIB="${archprefix}ranlib"
export NM="${archprefix}nm" KCC="${archprefix}kcc"
export F77="${archprefix}f77" MAKE="make"
export AWK="gawk" SED="sed"
if [ $stagelevel -le 1 -a "$ROCKCFG_PSEUDONATIVE" = 1 ]; then
export BUILDCC="$BUILDCC -static" BUILDLD="$BUILDLD -static"
fi