La nouvelle config a trois architectures : Linux.FC2, Linux.RH71 et Solaris.

This commit is contained in:
Jean-Paul Chaput 2004-07-24 22:40:33 +00:00
parent c97944e89e
commit 21253e1320
2 changed files with 67 additions and 38 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $Id: attila.conf,v 1.8 2003/10/29 16:08:51 xtof Exp $ # $Id: attila.conf,v 1.9 2004/07/24 22:40:27 jpc Exp $
# #
# -*- Mode: Shell-script -*- # -*- Mode: Shell-script -*-
# #
@ -26,9 +26,13 @@
# Linux Configuration Variables. # Linux Configuration Variables.
LINUX_TARGET="fa" LINUX_RH71_TARGET="fa"
LINUX_CC="gcc3" LINUX_RH71_CC="gcc3"
LINUX_CXX="g++3" LINUX_RH71_CXX="g++3"
LINUX_FC2_TARGET="tsunami"
LINUX_FC2_CC="gcc"
LINUX_FC2_CXX="g++"
@ -37,9 +41,9 @@
# Solaris Configuration Variables. # Solaris Configuration Variables.
SOLARIS_TARGET="beny" SOLARIS_TARGET="funk"
SOLARIS_CC="/usr/local/gcc-3.0.4/bin/gcc3" SOLARIS_CC="/usr/local/bin/gcc"
SOLARIS_CXX="/usr/local/gcc-3.0.4/bin/g++3" SOLARIS_CXX="/usr/local/bin/g++"

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# $Id: attila.sh,v 1.17 2003/10/29 16:08:54 xtof Exp $ # $Id: attila.sh,v 1.18 2004/07/24 22:40:33 jpc Exp $
# #
# /------------------------------------------------------------------\ # /------------------------------------------------------------------\
# | | # | |
@ -14,6 +14,9 @@
# | **************************************************************** | # | **************************************************************** |
# | U p d a t e s | # | U p d a t e s |
# | $Log: attila.sh,v $ # | $Log: attila.sh,v $
# | Revision 1.18 2004/07/24 22:40:33 jpc
# | La nouvelle config a trois architectures : Linux.FC2, Linux.RH71 et Solaris.
# |
# | Revision 1.17 2003/10/29 16:08:54 xtof # | Revision 1.17 2003/10/29 16:08:54 xtof
# | changing target machine for installations # | changing target machine for installations
# | # |
@ -177,9 +180,10 @@
guess_os () guess_os ()
{ {
case "`uname -sr`" in case "`uname -sr`" in
Linux*) echo "Linux";; Linux\ 2.4.9*) echo "Linux.RH71";;
SunOS\ 5*) echo "Solaris";; Linux\ 2.6.6*) echo "Linux.FC2";;
*) echo "`uname -sr`";; SunOS\ 5*) echo "Solaris";;
*) echo "`uname -sr`";;
esac esac
} }
@ -192,16 +196,21 @@
guess_gcc () guess_gcc ()
{ {
case "$1" in case "$1" in
"Linux") if which gcc3 > /dev/null 2>&1; then "Linux.RH71") if which gcc > /dev/null 2>&1; then
CXX=g++3 CXX=$LINUX_RH71_CXX
CC=gcc3 CC=$LINUX_RH71_CC
fi fi
;; ;;
"Solaris") if [ -x /usr/local/gcc-3.0.4/bin/gcc ]; then "Linux.FC2") if which gcc > /dev/null 2>&1; then
CXX=/usr/local/gcc-3.0.4/bin/g++ CXX=$LINUX_FC2_CXX
CC=/usr/local/gcc-3.0.4/bin/gcc CC=$LINUX_FC2_CC
fi fi
;; ;;
"Solaris") if [ -x "$SOLARIS_CC" ]; then
CXX=$SOLARIS_CXX
CC=$SOLARIS_CC
fi
;;
esac esac
} }
@ -414,8 +423,9 @@
echo " o Compilation environment." echo " o Compilation environment."
case "$ALLIANCE_OS" in case "$ALLIANCE_OS" in
"Linux") MAKE="make";; "Linux.RH71") MAKE="make";;
"Solaris") MAKE="gmake";; "Linux.FC2") MAKE="make";;
"Solaris") MAKE="gmake";;
*) echo "attila: \"$ALLIANCE_OS\" is not supported, only Linux & Solaris" *) echo "attila: \"$ALLIANCE_OS\" is not supported, only Linux & Solaris"
echo " are." echo " are."
@ -423,7 +433,9 @@
esac esac
export MAKE export MAKE
echo " - TARGET := `hostname`"
echo " - OS := $ALLIANCE_OS" echo " - OS := $ALLIANCE_OS"
echo " - ID := `id`"
echo " - MAKE := $MAKE" echo " - MAKE := $MAKE"
guess_gcc $ALLIANCE_OS guess_gcc $ALLIANCE_OS
@ -475,10 +487,10 @@
done done
fi fi
if [ ! -f Makefile.in -o ! -f configure ]; then #if [ ! -f Makefile.in -o ! -f configure ]; then
echo " o Running autostuff for Alliance top directory." # echo " o Running autostuff for Alliance top directory."
./autostuff # ./autostuff
fi #fi
if [ ! -d $BUILD_DIR ]; then if [ ! -d $BUILD_DIR ]; then
echo " o Creating build directory $BUILD_DIR" echo " o Creating build directory $BUILD_DIR"
@ -496,8 +508,16 @@
for TOOL in $TOOLS; do for TOOL in $TOOLS; do
cd $HOME/alliance/src cd $HOME/alliance/src
if [ ! -f "$TOOL/Makefile.in" -o ! -f "$TOOL/configure" ]; then if [ ! -f "$TOOL/Makefile.in" -o ! -f "$TOOL/configure" ]; then
echo " - Running autostuff for $TOOL." echo " - Running autostools for $TOOL."
./autostuff $TOOL #./autostuff $TOOL
cd $TOOL
aclocal -I . -I ..
if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
libtoolize --force --copy --automake
fi
automake --add-missing --copy --foreign
autoconf
cd ..
fi fi
cd $BUILD_DIR cd $BUILD_DIR
@ -539,20 +559,24 @@
CVS_STARTUP_FILES="" CVS_STARTUP_FILES=""
LINUX_TARGET="fa" LINUX_RH71_TARGET="fa"
LINUX_CC="gcc3" LINUX_RH71_CC="gcc3"
LINUX_CXX="g++3" LINUX_RH71_CXX="g++3"
SOLARIS_TARGET="beny" LINUX_FC2_TARGET="tsunami"
SOLARIS_CC="/usr/local/gcc-3.0.4/bin/gcc3" LINUX_FC2_CC="gcc"
SOLARIS_CXX="/usr/local/gcc-3.0.4/bin/g++3" LINUX_FC2_CXX="g++"
SOLARIS_TARGET="funk"
SOLARIS_CC="/usr/local/bin/gcc"
SOLARIS_CXX="/usr/local/bin/g++"
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# Internal variables. # Internal variables.
ALL_OSS="Linux Solaris" ALL_OSS="Linux.RH71 Linux.FC2 Solaris"
CC=gcc CC=gcc
CXX=g++ CXX=g++
export CC CXX export CC CXX
@ -726,8 +750,9 @@
ENVIRONMENT="" ENVIRONMENT=""
ENVIRONMENT="$ENVIRONMENT ALLIANCE_TOP=$ALLIANCE_TOP; export ALLIANCE_TOP;" ENVIRONMENT="$ENVIRONMENT ALLIANCE_TOP=$ALLIANCE_TOP; export ALLIANCE_TOP;"
$RSH $LINUX_TARGET "/bin/bash -c \"$ENVIRONMENT $SELF $ARGS\"" $RSH $LINUX_FC2_TARGET "/bin/bash -c \"$ENVIRONMENT $SELF $ARGS\""
$RSH $SOLARIS_TARGET "/bin/bash -c \". /etc/profile; $ENVIRONMENT $SELF $ARGS\"" $RSH $LINUX_RH71_TARGET "/bin/bash -c \"$ENVIRONMENT $SELF $ARGS\""
$RSH $SOLARIS_TARGET "/bin/bash -c \". /etc/profile; $ENVIRONMENT $SELF $ARGS\""
else else
# Out of recursion... # Out of recursion...
compile_tool compile_tool