/usr/bin/attila is in alliance 5.1.1-1.1build1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 | #!/bin/bash
#
# +------------------------------------------------------------------+
# | A l l i a n c e C A D S y s t e m |
# | T o o l I n s t a l l e r |
# | |
# | Author : Jean-Paul CHAPUT |
# | E-mail : alliance-users@asim.lip6.fr |
# | ================================================================ |
# | sh script : "./attila" |
# +------------------------------------------------------------------+
# +------------------------------------------------------------------+
# | Functions Definitions |
# +------------------------------------------------------------------+
# --------------------------------------------------------------------
# Function : "print_usage()".
print_usage ()
{
echo ""
echo ""
echo "Usage : attila [-h] [-L] [-U] [-F] [-A] [-S] [-d] \\"
echo " [--help] [--local] [--user] [--full] [--asim] [--ssh] [--devel]\\"
echo " [--prefix=<INSTALL_DIR>] [--builddir=<BUILD_DIR>] \\"
echo " <--tool=<name1> [--tool=<name2> [...]] \\"
echo " [-c- <configure_arg> [...]] \\"
echo " [-m- <make_arg> [...]] \\"
echo ""
echo ""
echo "Options :"
echo " o [-h|--help] : Print this help."
echo " o [-L|--local] : "
echo " Uses the attila's binary installed in the user's local."
echo " development tree. This is mainly for me when I work on"
echo " attila itself (yes : attila is able to self re-install)."
echo " o [-U|--user] :"
echo " Perform a \"USER\" compilation/installation."
echo " The tool(s) will be compiled then installed under the"
echo " directory given by the \"--prefix\" argument."
echo " o [-F|--full] :"
echo " Compile/install the requested tool(s) for all"
echo " avalaibles architectures. Currently only Linux and Solaris"
echo " are supported."
echo " o [-d|--devel] :"
echo " Uses user's local library first (development version)."
echo " o [-A|--asim] :"
echo " Install the tool(s) in the ASIM shared direc-"
echo " tory (aka \"\$ALLIANCE_TOP\"), this must be used to upgrade"
echo " a tool. This option implies \"--full\"."
echo " NOTE : it will erase any previous installed version of"
echo " the tool. The temporary build directory (--builddir) will"
echo " also be erased."
echo " o [-S|--ssh] :"
echo " Use ssh instead of rsh to connect to the rem-"
echo " ote computers when compiling for several targets. "
echo " o [--prefix=<INSTALL_DIR>] :"
echo " Override the default top directory"
echo " where the tool will be installed. By defaults tools are"
echo " installed under :"
echo " \"\$HOME/alliance/\$OS/install\"."
echo " o [--builddir=<BUILD_DIR>] :"
echo " Override the default top directory"
echo " where the tool will be compiled. By defaults tools are"
echo " compiled under :"
echo " \"\$HOME/alliance/\$OS/build\"."
echo " o [--tool=<name1>] :"
echo " The name of the tool to be processed, at"
echo " least one must be present."
echo " o [-c- <configure_arg> [...]] :"
echo " Arguments to be directly passed to configure."
echo " o [-m- <make_arg> [...]] :"
echo " Arguments to be directly passed to make. If there is none,"
echo " the default rule for Alliance (i.e. \"install\") will be"
echo " called."
echo ""
echo ""
}
# --------------------------------------------------------------------
# Function : "alc_banner()".
alc_banner ()
{
echo ""
echo ""
echo " @ @ @@@@ "
echo " @ @ @ @@@ @@ "
echo " @@@ @@ @@ @ @@ "
echo " @@@ @@ @@ @@ @@@@ "
echo " @ @@ @@@@@@@@ @@@@@@@@ @@@@ @@ @@ @ "
echo " @ @@ @@ @@ @@ @@ @@ @@ "
echo " @ @@ @@ @@ @@ @@ @@@@@ "
echo " @@@@@@@ @@ @@ @@ @@ @@ @@ "
echo " @ @@ @@ @@ @@ @@ @@ @@ "
echo " @ @@ @@ @ @@ @ @@ @@ @@ @@@ "
echo " @@@@ @@@@ @@@@ @@@@ @@@@@@ @@@@@@ @@@@ @@"
echo ""
echo " A Tool for Install Alliance tools"
echo ""
echo " Alliance CAD System 5.0, attila 0.1"
echo " Copyright (c) 2002-2002, ASIM/LIP6/UPMC"
echo " E-mail : alliance-users@asim.lip6.fr"
echo ""
echo ""
}
# --------------------------------------------------------------------
# Function : "find_self()".
#
# Usage : find_self <program> <tool> <args>
#
# Return the absolute path of the binary, and if in case of self
# install switch to the binary in "attila/src" (attila.sh).
find_self ()
{
PROG="$1"
TOOL="$2"
shift 2
# In case of self install, switch to the CVS script.
if [ "$TOOL" = "attila" ]; then
if [ "`basename $PROG`" != "attila.sh" ]; then
SELF="$HOME/alliance/alliance/src/attila/src/attila.sh"
if [ ! -x "$SELF" ]; then
echo "attila: Self install problem, cannot find source file :"
echo " \"$SELF\""
exit 1
else
echo " o Self installing, switching to :"
echo " $SELF"
exec -a "$SELF" "$SELF" $*
fi
fi
fi
# Installing a normal tool, normalise our path.
# Needed in case of recursive call on other computer (ASIM install).
CALL_DIR=`echo "$PROG" | sed 's,/[^/]*$,,'`
REAL_DIR=`(cd $CALL_DIR; pwd)`
SELF="$REAL_DIR/`basename $PROG`"
}
# --------------------------------------------------------------------
# Function : "guess_os()".
guess_os ()
{
case "`uname -srm`" in
Linux*FC2*) echo "Linux.FC2";;
Linux*SLA*) echo "Linux.SLA4x";;
Linux*EL*i686*) echo "Linux.SLA4x";;
Linux*EL*x86_64*) echo "Linux.SLA4x_64";;
Linux*2.6.16*FC5*) echo "Linux.SLA4x";;
Linux*el5*x86_64) echo "Linux.SLSoC5x_64";;
Linux*el5*) echo "Linux.SLSoC5x";;
Linux*SLSoC5*) echo "Linux.SLSoC5x";;
Linux*el5*x86_64) echo "Linux.SLSoC5x_64";;
Linux*el6*x86_64) echo "Linux.slsoc6x_64";;
Linux*slsoc6*) echo "Linux.slsoc6x";;
Linux*el6*) echo "Linux.slsoc6x";;
Linux*i686*) echo "Linux.i686";;
SunOS\ 5*) echo "Solaris";;
Darwin*) echo "Darwin";;
*) echo "`uname -sr`";;
esac
}
# --------------------------------------------------------------------
# Function : "guess_gcc()".
guess_gcc ()
{
case "$1" in
"Linux.slsoc6x") if which gcc > /dev/null 2>&1; then
CXX=$LINUX_slsoc6x_CXX
CC=$LINUX_slsoc6x_CC
fi
;;
"Linux.slsoc6x_64") if which gcc > /dev/null 2>&1; then
CXX=$LINUX_slsoc6x_64_CXX
CC=$LINUX_slsoc6x_64_CC
fi
;;
"Linux.SLSoC5x") if which gcc > /dev/null 2>&1; then
CXX=$LINUX_SLSoC5x_CXX
CC=$LINUX_SLSoC5x_CC
fi
;;
"Linux.SLSoC5x_64") if which gcc > /dev/null 2>&1; then
CXX=$LINUX_SLSoC5x_64_CXX
CC=$LINUX_SLSoC5x_64_CC
fi
;;
"Linux.SLA4x") if which gcc > /dev/null 2>&1; then
CXX=$LINUX_SLA4x_CXX
CC=$LINUX_SLA4x_CC
fi
;;
"Linux.FC2") if which gcc > /dev/null 2>&1; then
CXX=$LINUX_FC2_CXX
CC=$LINUX_FC2_CC
fi
;;
"Linux.RH71") if which gcc > /dev/null 2>&1; then
CXX=$LINUX_RH71_CXX
CC=$LINUX_RH71_CC
fi
;;
"Solaris") if [ -x "$SOLARIS_CC" ]; then
CXX=$SOLARIS_CXX
CC=$SOLARIS_CC
fi
;;
"Darwin") if [ -x "$DARWIN_CC" ]; then
CXX=$DARWIN_CXX
CC=$DARWIN_CC
fi
;;
esac
}
# --------------------------------------------------------------------
# Function : "switch_os()".
switch_os ()
{
TOP_PATH="$1"
SUBST_PATH="$TOP_PATH"
for _OS in $ALL_OSS; do
SUBST_PATH=`echo $SUBST_PATH | sed "s,$_OS,__OS__,"`
done
SUBST_PATH=`echo $SUBST_PATH | sed "s,__OS__,$ALLIANCE_OS,"`
echo "$SUBST_PATH"
}
# --------------------------------------------------------------------
# Function : `load_conf()'.
#
# The two ways to find ALLIANCE_TOP :
#
# 1. - In case of self install, blindly trust the user supplied
# ALLIANCE_TOP (user must supply it).
#
# 2. - Normal case (attila is installing any other tool) : try to
# find ALLIANCE_TOP in the user environment. If not set, use
# the attila install time default ATTILA_ALLIANCE_TOP.
load_conf ()
{
ALLIANCE_OS=`guess_os`
echo " o Guessed OS : $ALLIANCE_OS"
ALLIANCE_TOP=`switch_os $ALLIANCE_TOP`
echo " o Loading configuration file."
if [ "$ATTILA_ALLIANCE_TOP" = "__ALLIANCE_INSTALL_DIR__" ]; then
if [ -z "$ALLIANCE_TOP" ]; then
echo "attila: \$ALLIANCE_TOP is not set. Please set it up by executing"
echo " in the current shell process \"alc_env.sh\" or \"acl_env.csh\"."
echo " (thoses scripts can be found under the /etc directory of"
echo " your Alliance installation)."
exit 1
fi
echo " - Skipped during self install."
else
if [ -z "$ALLIANCE_TOP" ]; then
ALLIANCE_TOP="$ATTILA_ALLIANCE_TOP"
fi
ATTILA_CONF="$ALLIANCE_TOP/etc/attila.conf"
if [ "$ATTILA_LOCAL" = "y" ]; then
ATTILA_CONF="$ATTILA_ALLIANCE_TOP/etc/attila.conf"
fi
if [ ! -f "$ATTILA_CONF" ]; then
echo "attila: \"$ATTILA_CONF\" doesn't exist !"
echo " Please check \$ALLIANCE_TOP."
exit 1
fi
if [ "$ATTILA_LOCAL" != "y" ]; then
if [ ! -d "$ALLIANCE_TOP/bin" ]; then
echo "attila: \"$ALLIANCE_TOP/bin\" doesn't exist !"
echo " Please check \$ALLIANCE_TOP."
exit 1
fi
fi
. "$ATTILA_CONF"
fi
}
# --------------------------------------------------------------------
# Function : `get_string()'.
get_string()
{
string=`echo $1 | cut -d '=' -f 2-`
echo $string
}
# --------------------------------------------------------------------
# Function : "norm_dir()".
norm_dir()
{
DIR="$2"
if [ -z "$DIR" ]; then
case "$1" in
"SRC") DIR="$HOME/alliance/alliance/src";;
"INSTALL") DIR="$HOME/alliance/$ALLIANCE_OS/install";;
*) DIR="$HOME/alliance/$ALLIANCE_OS/build" ;;
esac
fi
HEAD=`echo $DIR | cut -b 1`
if [ "$HEAD" != "/" ]; then
echo "$HOME/$DIR"
return
fi
echo "$DIR"
}
# --------------------------------------------------------------------
# Function : "make_dir()".
make_dir()
{
mkdir -p $1
if [ $? -ne 0 ]; then exit 1; fi
}
# --------------------------------------------------------------------
# Function : "source_check()".
source_check ()
{
echo " o Checking Sources."
MISSING_TOOLS=""
# Checks for tools sources.
echo " o Checking tools sources."
for TOOL in $TOOLS; do
echo -n " - $HOME/alliance/alliance/src/$TOOL "
if [ ! -d $HOME/alliance/alliance/src/$TOOL ]; then
echo "[Not Found]"
MISSING_TOOLS="$MISSING_TOOLS $TOOL"
else
echo "[Found]"
fi
done
if [ ! -z "$MISSING_TOOLS" ]; then
echo " Some tools are missing their sources, please check your git checkout."
exit 1
fi
echo ""
}
# --------------------------------------------------------------------
# Function : "compile_tool()".
compile_tool ()
{
# ----------------------------------------------------------------
# Check environment.
echo " o Compilation environment."
case "$ALLIANCE_OS" in
"Linux.slsoc6x_64") MAKE="make";;
"Linux.slsoc6x") MAKE="make";;
"Linux.SLSoC5x_64") MAKE="make";;
"Linux.SLSoC5x") MAKE="make";;
"Linux.SLA4x") MAKE="make";;
"Linux.FC2") MAKE="make";;
"Linux.RH71") MAKE="make";;
"Solaris") MAKE="gmake";;
"Darwin") MAKE="make";;
*) echo "attila: \"$ALLIANCE_OS\" is not supported, only Linux & Solaris"
echo " are."
exit 1
esac
export MAKE
echo " - TARGET := `hostname`"
echo " - OS := $ALLIANCE_OS"
echo " - ID := `id`"
echo " - MAKE := $MAKE"
guess_gcc $ALLIANCE_OS
echo " - CC := $CC"
echo " - CXX := $CXX"
SRC_DIR=`norm_dir SRC "$SRC_DIR"`
BUILD_DIR=`norm_dir BUILD "$BUILD_DIR"`
INSTALL_DIR=`norm_dir INSTALL "$INSTALL_DIR"`
echo " o Loading Alliance environment."
if [ -f "$ALLIANCE_TOP/etc/alc_env.sh" ]; then
echo " - Using \"$ALLIANCE_TOP/etc/alc_env.sh\"."
. $ALLIANCE_TOP/etc/alc_env.sh
else
echo " - No \"$ALLIANCE_TOP/etc/alc_env.sh\" found, trusting user environment."
fi
echo ""
if [ "$ASIM" = "y" ]; then INSTALL_DIR="$ALLIANCE_TOP"; fi
echo " - SRC_DIR := $SRC_DIR"
echo " - BUILD_DIR := $BUILD_DIR"
echo " - INSTALL_DIR := $INSTALL_DIR"
echo ""
# ------------------------------------------------------------------
# Do the work.
cd $HOME/alliance/alliance/src
if [ "$ASIM" = "y" ]; then
if [ "$ALLIANCE_OS" = "Linux" ]; then
echo " o For ASIM install, removing $BUILD_DIR & configure"
rm -f configure
fi
for TOOL in $TOOLS; do
echo " - $BUILD_DIR/$TOOL."
rm -fr $BUILD_DIR/$TOOL
if [ "$ALLIANCE_OS" = "Linux" ]; then
rm -f $TOOL/configure
fi
done
fi
#if [ ! -f Makefile.in -o ! -f configure ]; then
# echo " o Running autostuff for Alliance top directory."
# ./autostuff
#fi
if [ ! -d $BUILD_DIR ]; then
echo " o Creating build directory $BUILD_DIR"
make_dir $BUILD_DIR
fi
if [ "$ASIM" != "y" ]; then
if [ ! -d $INSTALL_DIR ]; then
echo " o Creating local install directory $INSTALL_DIR"
make_dir $INSTALL_DIR
fi
fi
echo " o Building & installing requested tools."
for TOOL in $TOOLS; do
cd $HOME/alliance/alliance/src
if [ ! -f "$TOOL/Makefile.in" -o ! -f "$TOOL/configure" ]; then
echo " - Running autostools for $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
cd $BUILD_DIR
if [ ! -d $TOOL ]; then
echo " - Creating $TOOL directory."
make_dir $TOOL
fi
cd $TOOL
echo " - Running \"make $ARGS_MAKE\" for $TOOL."
if [ "$ASIM" = "y" ]; then
echo " - Adding dynamic link support for ASIM install"
ARGS_CONFIGURE="$ARGS_CONFIGURE --enable-alc-shared"
fi
ARGS_CONFIGURE="$ARGS_CONFIGURE --enable-alc-shared --disable-static"
$SRC_DIR/$TOOL/configure --prefix=$INSTALL_DIR \
--mandir=$INSTALL_DIR/man \
CFLAGS="-I$ALLIANCE_TOP/include" \
CXXFLAGS="-I$ALLIANCE_TOP/include" \
LDFLAGS="-L$ALLIANCE_TOP/lib" \
--enable-alc-shared
$MAKE prefix=$INSTALL_DIR $ARGS_MAKE
cd ..
if [ "$ASIM" = "y" ]; then
echo " o After an ASIM install, removing $BUILD_DIR"
echo " - $BUILD_DIR/$TOOL"
rm -rf $BUILD_DIR/$TOOL
fi
done
}
# +------------------------------------------------------------------+
# | Main Part of the Shell Script |
# +------------------------------------------------------------------+
ATTILA_ALLIANCE_TOP="/usr"
# --------------------------------------------------------------------
# Variables sets in "attila.conf".
LINUX_slsoc6x_64_TARGET="coriolis"
LINUX_slsoc6x_64_CC="gcc"
LINUX_slsoc6x_64_CXX="g++"
LINUX_slsoc6x_TARGET="yo35"
LINUX_slsoc6x_CC="gcc"
LINUX_slsoc6x_CXX="g++"
LINUX_SLSoC5x_64_TARGET="coriolis"
LINUX_SLSoC5x_64_CC="gcc"
LINUX_SLASoC5_64_CXX="g++"
LINUX_SLSoC5x_TARGET="stixo"
LINUX_SLSoC5x_CC="gcc"
LINUX_SLASoC5_CXX="g++"
LINUX_SLA4x_TARGET="tsunami"
LINUX_SLA4x_CC="gcc"
LINUX_SLA4x_CXX="g++"
LINUX_FC2_TARGET="tsunami"
LINUX_FC2_CC="gcc"
LINUX_FC2_CXX="g++"
LINUX_RH71_TARGET="fa"
LINUX_RH71_CC="gcc3"
LINUX_RH71_CXX="g++3"
SOLARIS_TARGET="funk"
SOLARIS_CC="/usr/local/bin/gcc"
SOLARIS_CXX="/usr/local/bin/g++"
DARWIN_TARGET="paques"
DARWIN_CC="gcc"
DARWIN_CXX="g++"
# --------------------------------------------------------------------
# Internal variables.
ALL_OSS="Linux.SLSoC5x_64 Linux.SLSoC5x Linux.SLA4x Solaris"
CC=gcc
CXX=g++
export CC CXX
RSH="rsh"
SRC_DIR="alliance/alliance/src"
BUILD_DIR=""
INSTALL_DIR=""
TOOLS=""
ARGS_CONFIGURE=""
ARGS_MAKE=""
ARGS_MAKE_DEFAULT="install"
ASIM="n"
FULL="n"
AUTO="n"
DEVEL="n"
SELF="$0"
ATTILA_LOCAL="no"
# --------------------------------------------------------------------
# Process the command line.
# Print the banner.
alc_banner
if [ $# -eq 0 ]; then
print_usage
exit 0
fi
COMMAND_LINE=""
PARSE_STATE="attila"
while [ $# -gt 0 ]; do
case $PARSE_STATE in
"attila") case $1 in
# Long arguments.
--help) print_usage;
exit 0;;
--ssh) RSH="ssh";;
--user) ASIM="n";;
--full) FULL="y";;
--devel) DEVEL="y";;
--asim) ASIM="y"; FULL="y";;
--asim-noloop) ASIM="y";;
--local) ATTILA_LOCAL="y";;
--prefix=*) INSTALL_DIR=`get_string $1`
if [ $? -ne 0 ]; then
echo -n "attila: Bad directory in argument \"$1\"."
print_usage
exit 1
fi;;
--builddir=*) BUILD_DIR=`get_string $1`
if [ $? -ne 0 ]; then
echo -n "attila: Bad directory in argument \"$1\"."
print_usage
exit 1
fi;;
--tool=*) TOOL=`get_string $1`
if [ "$TOOL" = "attila" ]; then AUTO="attila"; fi
TOOLS="$TOOLS $TOOL"
if [ $? -ne 0 ]; then
echo -n "attila: Bad tool name in argument \"$1\"."
print_usage
exit 1
fi;;
-c-) PARSE_STATE="configure";;
-m-) PARSE_STATE="make";;
# Short arguments.
-*) SHORTS="$1"; NB=2; CH=`echo $SHORTS | cut -c$NB`
while [ "$CH" != "" ]; do
case $CH in
h) print_usage; exit 0;;
L) ATTILA_LOCAL="y";;
S) RSH="ssh";;
U) ASIM="n";;
F) FULL="y";;
d) DEVEL="y";;
A) ASIM="y"; FULL="y";;
*) echo "attila:error: Invalid option \`$CH'."
print_usage; exit 1;;
esac
NB=`expr $NB + 1`
CH=`echo $SHORTS | cut -c$NB`
done;;
esac;;
"configure") case $1 in
"-m-") PARSE_STATE="make";;
"-c-") PARSE_STATE="configure";;
*) ARGS_CONFIGURE="$ARGS_CONFIGURE $1";;
esac;;
"make") case $1 in
"-m-") PARSE_STATE="make";;
"-c-") PARSE_STATE="configure";;
*) ARGS_MAKE="$ARGS_MAKE $1";;
esac;;
esac
COMMAND_LINE="$COMMAND_LINE $1"
shift
done
if [ -z "$TOOLS" ]; then
echo "attila:error: At least one \"--tool=<name>\" argument is required."
print_usage; exit 1
fi
if [ ! -z "$INSTALL_DIR" ]; then
INSTALL_DIR=`echo $INSTALL_DIR | sed "s,^$HOME/,,"`
fi
if [ ! -z "$BUILD_DIR" ]; then
BUILD_DIR=`echo $BUILD_DIR | sed "s,^$HOME/,,"`
fi
if [ -z "$ARGS_MAKE" ]; then
ARGS_MAKE="$ARGS_MAKE_DEFAULT"
fi
# --------------------------------------------------------------------
# Do the work.
find_self "$0" "$AUTO" $COMMAND_LINE
load_conf
source_check
if [ "$FULL" = "y" ]; then
# Recursive call.
ARGS=""
if [ ! -z "$INSTALL_DIR" ]; then ARGS="$ARGS --prefix=$INSTALL_DIR"; fi
if [ ! -z "$BUILD_DIR" ]; then ARGS="$ARGS --builddir=$BUILD_DIR" ; fi
if [ "$ASIM" = "y" ]; then
ARGS="$ARGS --asim-noloop"
else
ARGS="$ARGS --user"
fi
if [ "$ATTILA_LOCAL" = "y" ]; then ARGS="$ARGS --local"; fi
if [ "$DEVEL" = "y" ]; then ARGS="$ARGS --devel"; fi
for TOOL in $TOOLS; do
ARGS="$ARGS --tool=$TOOL"
done
if [ ! -z "$ARGS_CONFIGURE" ]; then ARGS="$ARGS -c- $ARGS_CONFIGURE"; fi
if [ ! -z "$ARGS_MAKE" ]; then ARGS="$ARGS -m- $ARGS_MAKE"; fi
ENVIRONMENT=""
ENVIRONMENT="$ENVIRONMENT ALLIANCE_TOP=$ALLIANCE_TOP; export ALLIANCE_TOP;"
$RSH $LINUX_SLSoC5x_TARGET "/bin/bash -c \"$ENVIRONMENT $SELF $ARGS\""
$RSH $LINUX_SLSoC5x_64_TARGET "/bin/bash -c \"$ENVIRONMENT $SELF $ARGS\""
#$RSH $LINUX_SLA4x_TARGET "/bin/bash -c \"$ENVIRONMENT $SELF $ARGS\""
#$RSH $LINUX_FC2_TARGET "/bin/bash -c \"$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
# Out of recursion...
if [ "$DEVEL" = "y" ]; then
ARGS_CONFIGURE="$ARGS_CONFIGURE --enable-devel"
fi
compile_tool
fi
|