|
@ -0,0 +1 @@
|
|||
SUBDIRS = src etc doc
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
SUBDIRS = attila
|
||||
|
||||
pdfdir = $(prefix)/doc/pdf
|
||||
pdf_DATA = attila.pdf
|
||||
|
||||
EXTRA_DIST = $(pdf_DATA) \
|
||||
./man_attila.sgm \
|
||||
./attila.sgm
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
|
||||
|
||||
<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
|
||||
|
||||
|
||||
<!ENTITY man-attila SYSTEM "man_attila.sgm">
|
||||
|
||||
|
||||
<!ENTITY Alliance "<emphasis>Alliance</emphasis>">
|
||||
<!ENTITY Attila "<emphasis>Attila</emphasis>">
|
||||
<!ENTITY attila "<userinput>attila</userinput>">
|
||||
|
||||
<!ENTITY arg-no-rm-core "<literal>[--no-rm-core|-c]</literal>">
|
||||
|
||||
<!ENTITY arg-N "<literal>long <replaceable>N</replaceable></literal>">
|
||||
|
||||
|
||||
]>
|
||||
|
||||
|
||||
<book lang="en">
|
||||
<?dbhtml filename="attila.html">
|
||||
|
||||
<bookinfo>
|
||||
<title> Attila User's Manual </title>
|
||||
<date> September, 27 2002 </date>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname> Jean-Paul </firstname>
|
||||
<surname> Chaput </surname>
|
||||
<affiliation>
|
||||
<jobtitle> System Administrator </jobtitle>
|
||||
<orgname> Pierre & Marie Curie University, LIP6 </orgname>
|
||||
<orgdiv> ASIM Department </orgdiv>
|
||||
</affiliation>
|
||||
</author>
|
||||
</authorgroup>
|
||||
<releaseinfo> September 2002 / 20020924.1 </releaseinfo>
|
||||
<pubdate> September 2002 </pubdate>
|
||||
</bookinfo>
|
||||
|
||||
|
||||
<reference id="ref-attila">
|
||||
<?dbhtml filename="ref_attila.html">
|
||||
|
||||
<title>&Alliance; - &attila; User's Manual </title>
|
||||
|
||||
&man-attila;
|
||||
|
||||
|
||||
</reference>
|
||||
|
||||
</book>
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
|
||||
pkghtmldir = $(prefix)/doc/html/@PACKAGE@
|
||||
pkghtml_DATA = \
|
||||
./attila.html \
|
||||
./ref_attila.html \
|
||||
./man_attila.html
|
||||
|
||||
EXTRA_DIST = $(pkghtml_DATA)
|
|
@ -0,0 +1,141 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
> Attila User's Manual </TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
||||
"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="Alliance - attila User's Manual "
|
||||
HREF="ref_attila.html"></HEAD
|
||||
><BODY
|
||||
CLASS="BOOK"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="BOOK"
|
||||
><A
|
||||
NAME="AEN1"><DIV
|
||||
CLASS="TITLEPAGE"
|
||||
><H1
|
||||
CLASS="TITLE"
|
||||
><A
|
||||
NAME="AEN2">Attila User's Manual</H1
|
||||
><H3
|
||||
CLASS="AUTHOR"
|
||||
><A
|
||||
NAME="AEN6"> Jean-Paul Chaput </H3
|
||||
><DIV
|
||||
CLASS="AFFILIATION"
|
||||
><SPAN
|
||||
CLASS="JOBTITLE"
|
||||
> System Administrator <BR></SPAN
|
||||
><SPAN
|
||||
CLASS="ORGNAME"
|
||||
> Pierre & Marie Curie University, LIP6 <BR></SPAN
|
||||
><SPAN
|
||||
CLASS="ORGDIV"
|
||||
> ASIM Department <BR></SPAN
|
||||
></DIV
|
||||
><SPAN
|
||||
CLASS="RELEASEINFO"
|
||||
> September 2002 / 20020924.1 <BR></SPAN
|
||||
><HR></DIV
|
||||
><DIV
|
||||
CLASS="TOC"
|
||||
><DL
|
||||
><DT
|
||||
><B
|
||||
>Table of Contents</B
|
||||
></DT
|
||||
><DT
|
||||
>I. <A
|
||||
HREF="ref_attila.html"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>Alliance</I
|
||||
> - <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>attila</B
|
||||
></TT
|
||||
> User's Manual</A
|
||||
></DT
|
||||
><DD
|
||||
><DL
|
||||
><DT
|
||||
><A
|
||||
HREF="man_attila.html"
|
||||
>attila</A
|
||||
> -- A Tool Installer </DT
|
||||
></DL
|
||||
></DD
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="ref_attila.html"
|
||||
ACCESSKEY="N"
|
||||
>Next >>></A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><I
|
||||
CLASS="EMPHASIS"
|
||||
>Alliance</I
|
||||
> - <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>attila</B
|
||||
></TT
|
||||
> User's Manual</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
|
@ -0,0 +1,161 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<HTML
|
||||
><HEAD
|
||||
><TITLE
|
||||
>Alliance - attila User's Manual </TITLE
|
||||
><META
|
||||
NAME="GENERATOR"
|
||||
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
|
||||
"><LINK
|
||||
REL="HOME"
|
||||
TITLE=" Attila User's Manual "
|
||||
HREF="attila.html"><LINK
|
||||
REL="PREVIOUS"
|
||||
TITLE=" Attila User's Manual "
|
||||
HREF="attila.html"><LINK
|
||||
REL="NEXT"
|
||||
TITLE="attila"
|
||||
HREF="man_attila.html"></HEAD
|
||||
><BODY
|
||||
CLASS="REFERENCE"
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#840084"
|
||||
ALINK="#0000FF"
|
||||
><DIV
|
||||
CLASS="NAVHEADER"
|
||||
><TABLE
|
||||
SUMMARY="Header navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TH
|
||||
COLSPAN="3"
|
||||
ALIGN="center"
|
||||
>Attila User's Manual</TH
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="left"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="attila.html"
|
||||
ACCESSKEY="P"
|
||||
><<< Previous</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="80%"
|
||||
ALIGN="center"
|
||||
VALIGN="bottom"
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="10%"
|
||||
ALIGN="right"
|
||||
VALIGN="bottom"
|
||||
><A
|
||||
HREF="man_attila.html"
|
||||
ACCESSKEY="N"
|
||||
>Next >>></A
|
||||
></TD
|
||||
></TR
|
||||
></TABLE
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"></DIV
|
||||
><DIV
|
||||
CLASS="REFERENCE"
|
||||
><A
|
||||
NAME="REF-ATTILA"><DIV
|
||||
CLASS="TITLEPAGE"
|
||||
><H1
|
||||
CLASS="TITLE"
|
||||
>I. <I
|
||||
CLASS="EMPHASIS"
|
||||
>Alliance</I
|
||||
> - <TT
|
||||
CLASS="USERINPUT"
|
||||
><B
|
||||
>attila</B
|
||||
></TT
|
||||
> User's Manual </H1
|
||||
><DIV
|
||||
CLASS="TOC"
|
||||
><DL
|
||||
><DT
|
||||
><B
|
||||
>Table of Contents</B
|
||||
></DT
|
||||
><DT
|
||||
><A
|
||||
HREF="man_attila.html"
|
||||
>attila</A
|
||||
> -- A Tool Installer </DT
|
||||
></DL
|
||||
></DIV
|
||||
></DIV
|
||||
></DIV
|
||||
><DIV
|
||||
CLASS="NAVFOOTER"
|
||||
><HR
|
||||
ALIGN="LEFT"
|
||||
WIDTH="100%"><TABLE
|
||||
SUMMARY="Footer navigation table"
|
||||
WIDTH="100%"
|
||||
BORDER="0"
|
||||
CELLPADDING="0"
|
||||
CELLSPACING="0"
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="attila.html"
|
||||
ACCESSKEY="P"
|
||||
><<< Previous</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="attila.html"
|
||||
ACCESSKEY="H"
|
||||
>Home</A
|
||||
></TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
><A
|
||||
HREF="man_attila.html"
|
||||
ACCESSKEY="N"
|
||||
>Next >>></A
|
||||
></TD
|
||||
></TR
|
||||
><TR
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="left"
|
||||
VALIGN="top"
|
||||
>Attila User's Manual</TD
|
||||
><TD
|
||||
WIDTH="34%"
|
||||
ALIGN="center"
|
||||
VALIGN="top"
|
||||
> </TD
|
||||
><TD
|
||||
WIDTH="33%"
|
||||
ALIGN="right"
|
||||
VALIGN="top"
|
||||
>attila</TD
|
||||
></TR
|
||||
></TABLE
|
||||
></DIV
|
||||
></BODY
|
||||
></HTML
|
||||
>
|
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 995 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 964 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 944 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 95 B |
After Width: | Height: | Size: 843 B |
After Width: | Height: | Size: 846 B |
After Width: | Height: | Size: 922 B |
After Width: | Height: | Size: 1.0 KiB |
|
@ -0,0 +1,119 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
LOG="builddoc.log"
|
||||
TOOL="attila"
|
||||
SGML_DOC="$TOOL.sgm"
|
||||
|
||||
|
||||
detect_fail ()
|
||||
{
|
||||
echo "" >&2
|
||||
echo "builddoc.sh ERROR:" >&2
|
||||
echo "" >&2
|
||||
echo " Cannot find \"$1\"." >&2
|
||||
echo "" >&2
|
||||
echo " Please check that DocBook is installed on your system." >&2
|
||||
echo "" >&2
|
||||
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
detect ()
|
||||
{
|
||||
STR="`which $1 2> /dev/null`"
|
||||
|
||||
if [ -z "$STR" ]; then detect_fail "$1"; fi
|
||||
|
||||
echo "$STR"
|
||||
}
|
||||
|
||||
|
||||
DB2MAN=`detect docbook2man`
|
||||
DB2PDF=`detect db2pdf`
|
||||
DB2HTML=`detect db2html`
|
||||
|
||||
|
||||
rm -f $LOG
|
||||
|
||||
|
||||
echo ""
|
||||
echo " o Building MAN pages..."
|
||||
$DB2MAN $SGML_DOC > $LOG 2>&1
|
||||
mv *.1 man1
|
||||
|
||||
echo " - Building Makefile.am for man1 subdir."
|
||||
MAN_AM="Makefile.am-man"
|
||||
echo "" > $MAN_AM
|
||||
echo "" >> $MAN_AM
|
||||
echo "man_MANS = \\" >> $MAN_AM
|
||||
FILE_LIST=`(cd man1; find . -name \*.1 -exec echo {} \;)`
|
||||
set $FILE_LIST
|
||||
while [ $# -gt 0 ]; do
|
||||
LINE=" $1"
|
||||
if [ $# -gt 1 ]; then LINE="$LINE \\"; fi
|
||||
echo "$LINE" >> $MAN_AM
|
||||
shift
|
||||
done
|
||||
echo "" >> $MAN_AM
|
||||
echo "EXTRA_DIST = \$(man_MANS)" >> $MAN_AM
|
||||
mv $MAN_AM man1/Makefile.am
|
||||
|
||||
|
||||
echo ""
|
||||
echo " o Building HTML..."
|
||||
if [ -d $TOOL ]; then
|
||||
mv $TOOL/CVS ./CVS-$TOOL
|
||||
mv $TOOL/stylesheet-images/CVS ./CVS-SS-$TOOL
|
||||
fi
|
||||
|
||||
$DB2HTML $SGML_DOC >> $LOG 2>&1
|
||||
if [ -d $TOOL.junk ]; then rm -r $TOOL.junk; fi
|
||||
|
||||
echo " - Building Makefile.am for html subdir."
|
||||
DOC_AM="Makefile.am-doc"
|
||||
echo "" > $DOC_AM
|
||||
echo "" >> $DOC_AM
|
||||
echo "pkghtmldir = \$(prefix)/doc/html/@PACKAGE@" >> $DOC_AM
|
||||
echo "pkghtml_DATA = \\" >> $DOC_AM
|
||||
FILE_LIST=`(cd $TOOL; find . -name \*.html -exec echo {} \;)`
|
||||
set $FILE_LIST
|
||||
while [ $# -gt 0 ]; do
|
||||
LINE=" $1"
|
||||
if [ $# -gt 1 ]; then LINE="$LINE \\"; fi
|
||||
echo "$LINE" >> $DOC_AM
|
||||
shift
|
||||
done
|
||||
echo "" >> $DOC_AM
|
||||
echo "EXTRA_DIST = \$(pkghtml_DATA)" >> $DOC_AM
|
||||
mv $DOC_AM $TOOL/Makefile.am
|
||||
|
||||
if [ -f ./CVS-$TOOL ]; then
|
||||
mv ./CVS-$TOOL $TOOL/CVS
|
||||
mv ./CVS-SS-$TOOL $TOOL/stylesheet-images/CVS
|
||||
fi
|
||||
|
||||
|
||||
echo ""
|
||||
echo " o Building PDF..."
|
||||
$DB2PDF $SGML_DOC >> $LOG 2>&1
|
||||
|
||||
echo " - Building Makefile.am for doc dir."
|
||||
DOC_AM="Makefile.am"
|
||||
echo "" > $DOC_AM
|
||||
echo "SUBDIRS = $TOOL" >> $DOC_AM
|
||||
echo "" >> $DOC_AM
|
||||
echo "pdfdir = \$(prefix)/doc/pdf" >> $DOC_AM
|
||||
echo "pdf_DATA = $TOOL.pdf" >> $DOC_AM
|
||||
echo "" >> $DOC_AM
|
||||
echo "EXTRA_DIST = \$(pdf_DATA) \\" >> $DOC_AM
|
||||
FILE_LIST=`find . -name \*.sgm -exec echo {} \;`
|
||||
set $FILE_LIST
|
||||
while [ $# -gt 0 ]; do
|
||||
LINE=" $1"
|
||||
if [ $# -gt 1 ]; then LINE="$LINE \\"; fi
|
||||
echo "$LINE" >> $DOC_AM
|
||||
shift
|
||||
done
|
||||
echo "" >> $DOC_AM
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
|
||||
man_MANS = \
|
||||
./attila.1
|
||||
|
||||
EXTRA_DIST = $(man_MANS)
|
|
@ -0,0 +1,260 @@
|
|||
.\\" auto-generated by docbook2man-spec $Revision: 1.1 $
|
||||
.TH "ATTILA" "1" "29 September 2002" "ASIM/LIP6" "Alliance - attila User's Manual"
|
||||
.SH NAME
|
||||
attila \- A Tool Installer
|
||||
.SH SYNOPSIS
|
||||
.sp
|
||||
\fBattila\fR [ \fB-h\fR ] [ \fB-S\fR ] [ \fB-U\fR ] [ \fB-F\fR ] [ \fB-A\fR ]
|
||||
[ \fB--help\fR ] [ \fB--ssh\fR ] [ \fB--user\fR ] [ \fB--asim\fR ]
|
||||
[ \fB--prefix=\fIINSTALL_DIR\fB\fR ] [ \fB--builddir=\fIBUILD_DIR\fB\fR ]
|
||||
\fB--tool=\fIname1\fB\fR [ \fB--tool=\fIname2\fB\fR\fI...\fR ]
|
||||
.SH "DESCRIPTION"
|
||||
.PP
|
||||
attila automates the process of compiling
|
||||
and installing one or more \fBAlliance\fR tools. The
|
||||
tool can be installed either in the user's account (during the
|
||||
devellopment stage) or in the \fBAlliance\fR system
|
||||
wide tree (for instance /asim/alliance) when a
|
||||
new version is made avalaible to all.
|
||||
.PP
|
||||
attila proceed with the following
|
||||
steps\ :
|
||||
.IP 1.
|
||||
Checks if the sources of tools are present in the
|
||||
user's account. If not, check them out from the
|
||||
\fBAlliance\fR CVS tree. Note that you must
|
||||
have access to it.
|
||||
.IP 2.
|
||||
In case of \fB--asim\fR
|
||||
or \fB--full\fR installations,
|
||||
attila will fork itself on one Linux
|
||||
computer (currently bip) and on one Solaris
|
||||
computer (beny). As to connect on thoses
|
||||
computer it will uses rsh so you must setup
|
||||
your ~/.rhosts to access them whithout
|
||||
passwords. You also can uses ssh (but the
|
||||
procedure to allow automatic login is more complicated).
|
||||
.IP 3.
|
||||
Run configure in the build
|
||||
directory (see below).
|
||||
.IP 4.
|
||||
Install the tool in the local install directory (see below)
|
||||
or in the system-wide \fBAlliance\fR directory
|
||||
rooted under /asim/alliance.
|
||||
.PP
|
||||
.sp
|
||||
.RS
|
||||
.B "After an --asim install:"
|
||||
the build directory tree of the tool will be removed to
|
||||
avoid messing with further local installations.
|
||||
.PP
|
||||
.RE
|
||||
.sp
|
||||
.SS "DIRECTORY STRUCTURE"
|
||||
.PP
|
||||
attila relies on the following tree
|
||||
structure\ : (all paths below are given relative to the user's
|
||||
home directory)
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
~/alliance/src where the tools sources
|
||||
are to be found.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
~/alliance/Linux/build/$TOOL : the top
|
||||
directory under which the tool will be compiled for Linux.
|
||||
This is where the configure script will be run.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
~/alliance/Linux/install : the top of
|
||||
the install tree when the tool is compiled locally for Linux.
|
||||
Under this directory you will found (at least)\ :
|
||||
\&./bin,
|
||||
\&./lib and ./include.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
~/alliance/Solaris/build/$TOOL :
|
||||
the tool's build directory for Solaris.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
~/alliance/Solaris/install : top of the
|
||||
local install tree for Solaris.
|
||||
.PP
|
||||
.SS "CVS CHECKOUT"
|
||||
.PP
|
||||
If the sources of the requested tool(s) are not found under
|
||||
~/alliance/src/ attila will
|
||||
try to check them out. So, as says above, you must have access
|
||||
rights to the \fBAlliance\fR CVS tree.
|
||||
.PP
|
||||
In addition to the tool(s) sources, it will also checks for
|
||||
the minimal set of files needed for configure to
|
||||
run. As for now\ :
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
autostuff
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
alliance.m4
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
motif.m4
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
Makefile.am
|
||||
.PP
|
||||
.SS "GUESSING CVSROOT"
|
||||
.PP
|
||||
The root of the CVS tree will be set according to the
|
||||
following rules\ :
|
||||
.IP 1.
|
||||
Uses the user's environment variable
|
||||
CVSROOT if sets.
|
||||
.IP 2.
|
||||
Uses the attila default value
|
||||
sets in attila.conf (variable
|
||||
ATTILA_CVSROOT).
|
||||
.PP
|
||||
.SH "GUESSING ALLIANCE_TOP"
|
||||
.PP
|
||||
The root of the Alliance installed distribution
|
||||
tree will be set according to the following rules\ :
|
||||
.IP 1.
|
||||
Uses the user's environment variable
|
||||
ALLIANCE_TOP if sets.
|
||||
.IP 2.
|
||||
Uses the attila default value
|
||||
sets in attila itself (variable
|
||||
ATTILA_ALLIANCE_TOP).
|
||||
.sp
|
||||
.RS
|
||||
.B "ALLIANCE_TOP:"
|
||||
is set in attila itself because its value
|
||||
is a prerequisite to load the configuration file
|
||||
attila.conf which is in the directory
|
||||
$ALLIANCE_TOP/etc/.
|
||||
.RE
|
||||
.sp
|
||||
.PP
|
||||
.SH "ARGUMENTS"
|
||||
.PP
|
||||
attila accepts the followings arguments\ :
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fB-h\fR, \fB--help\fR\ :
|
||||
print help.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fB-S\fR, \fB--ssh\fR\ :
|
||||
uses ssh instead of rsh to
|
||||
connect to the remote computers (in case of
|
||||
\fB--asim\fR or \fB--full\fR).
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fB-U\fR, \fB--user\fR\ :
|
||||
perform a local installation.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fB-F\fR, \fB--full\fR\ :
|
||||
install for all avalaibles architectures (currently Linux and
|
||||
Solaris).
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fB-A\fR, \fB--asim\fR\ :
|
||||
install in the system-wide directory
|
||||
(/asim/alliance).
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fB--prefix=\fIINSTALL_DIR\fB\fR\ :
|
||||
override the default installation directory.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fB--builddir=\fIBUILD_DIR\fB\fR\ :
|
||||
override the default building directory.
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fB--tool=\fIname1\fB\fR\ :
|
||||
name of the tool to be installed.
|
||||
.PP
|
||||
.SH "CONFIGURATION FILE ATTILA.CONF"
|
||||
.PP
|
||||
The configuration file is located in
|
||||
$ALLIANCE_TOP/etc. This file is to be read by the
|
||||
sh \fBshell\fR. It sets up the
|
||||
following variables\ :
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fBLINUX_TARGET\fR : the computer where to
|
||||
compile for the Linux architecture (default bip).
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fBLINUX_CC\fR : the name or full path to
|
||||
to the C compiler for Linux system
|
||||
(default gcc3).
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fBLINUX_CXX\fR : the name or full path to
|
||||
to the C++ compiler for Linux system
|
||||
(default g++3).
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fBSOLARIS_TARGET\fR : the computer where to
|
||||
compile for the Solaris architecture (default beny).
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fBSOLARIS_CC\fR : the name or full path to
|
||||
to the C compiler for Solaris system
|
||||
(default /usr/local/gcc-3.0.4/bin/g++3).
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fBSOLARIS_CXX\fR : the name or full path to
|
||||
to the C++ compiler for Solaris system
|
||||
(default /usr/local/gcc-3.0.4/bin/g++3).
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fBATTILA_CVSROOT\fR : the root of the
|
||||
\fBAlliance\fR CVS tree
|
||||
(default /users/outil/alliance/cvsroot).
|
||||
.TP 0.2i
|
||||
\(bu
|
||||
\fBCVS_STARTUP_FILES\fR : the minimal set of
|
||||
files needed to run configure.
|
||||
.PP
|
||||
.SH "EXAMPLES"
|
||||
.PP
|
||||
Compile & install nero tool on the local computer
|
||||
(must be either a Linux or a Solaris one) :
|
||||
.sp
|
||||
.nf
|
||||
$ \fBattila --tool=nero\fR
|
||||
|
||||
.sp
|
||||
.fi
|
||||
.PP
|
||||
Compile & install nero tool for all architectures
|
||||
(currently only Linux and Solaris are supported)\ :
|
||||
.sp
|
||||
.nf
|
||||
$ \fBattila --full --tool=nero\fR
|
||||
|
||||
.sp
|
||||
.fi
|
||||
.PP
|
||||
Compile & install nero tool in the system-wide
|
||||
directory (a new version for everyone to use)\ :
|
||||
.sp
|
||||
.nf
|
||||
$ \fBattila --asim --tool=nero\fR
|
||||
|
||||
.sp
|
||||
.fi
|
||||
.PP
|
||||
Compile & install mbk the genlib
|
||||
(the order is significant) in a row for a local install on the current
|
||||
computer\ :
|
||||
.sp
|
||||
.nf
|
||||
$ \fBattila --tool=mbk --tool=genlib\fR
|
||||
|
||||
.sp
|
||||
.fi
|
|
@ -0,0 +1,364 @@
|
|||
|
||||
|
||||
<refentry id="attila">
|
||||
<?dbhtml filename="man_attila.html">
|
||||
|
||||
<refmeta>
|
||||
<refentrytitle>attila</refentrytitle>
|
||||
<manvolnum>1</manvolnum>
|
||||
<refmiscinfo>ASIM/LIP6</refmiscinfo>
|
||||
</refmeta>
|
||||
|
||||
<refnamediv>
|
||||
<refname> attila </refname>
|
||||
<refpurpose> A Tool Installer </refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
|
||||
<refsynopsisdiv>
|
||||
<cmdsynopsis>
|
||||
<command>attila</command>
|
||||
<arg>-h</arg>
|
||||
<arg>-S</arg>
|
||||
<arg>-U</arg>
|
||||
<arg>-F</arg>
|
||||
<arg>-A</arg>
|
||||
<sbr>
|
||||
<arg>--help</arg>
|
||||
<arg>--ssh</arg>
|
||||
<arg>--user</arg>
|
||||
<arg>--asim</arg>
|
||||
<sbr>
|
||||
<arg>--prefix=<replaceable>INSTALL_DIR</replaceable></arg>
|
||||
<arg>--builddir=<replaceable>BUILD_DIR</replaceable></arg>
|
||||
<sbr>
|
||||
<arg choice="req">--tool=<replaceable>name1</replaceable></arg>
|
||||
<arg rep="repeat">--tool=<replaceable>name2</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
</refsynopsisdiv>
|
||||
|
||||
<refsect1>
|
||||
<title> Description </title>
|
||||
|
||||
<para> <literal>attila</literal> automates the process of compiling
|
||||
and installing one or more <emphasis>Alliance</emphasis> tools. The
|
||||
tool can be installed either in the user's account (during the
|
||||
devellopment stage) or in the <emphasis>Alliance</emphasis> system
|
||||
wide tree (for instance <literal>/asim/alliance</literal>) when a
|
||||
new version is made avalaible to all.
|
||||
</para>
|
||||
<para> <literal>attila</literal> proceed with the following
|
||||
steps :
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para> Checks if the sources of tools are present in the
|
||||
user's account. If not, check them out from the
|
||||
<emphasis>Alliance</emphasis> CVS tree. Note that you must
|
||||
have access to it.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> In case of <userinput>--asim</userinput>
|
||||
or <userinput>--full</userinput> installations,
|
||||
<literal>attila</literal> will fork itself on one Linux
|
||||
computer (currently <literal>bip</literal>) and on one Solaris
|
||||
computer (<literal>beny</literal>). As to connect on thoses
|
||||
computer it will uses <literal>rsh</literal> so you must setup
|
||||
your <literal>~/.rhosts</literal> to access them whithout
|
||||
passwords. You also can uses <literal>ssh</literal> (but the
|
||||
procedure to allow automatic login is more complicated).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> Run <literal>configure</literal> in the build
|
||||
directory (see below).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> Install the tool in the local install directory (see below)
|
||||
or in the system-wide <emphasis>Alliance</emphasis> directory
|
||||
rooted under <literal>/asim/alliance</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
<important>
|
||||
<title> After an <literal>--asim</literal> install </title>
|
||||
<para> the build directory tree of the tool will be removed to
|
||||
avoid messing with further local installations.
|
||||
</para>
|
||||
</important>
|
||||
</para>
|
||||
|
||||
<refsect2>
|
||||
<title> Directory Structure </title>
|
||||
|
||||
<para> <literal>attila</literal> relies on the following tree
|
||||
structure : (all paths below are given relative to the user's
|
||||
home directory)
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para> <literal>~/alliance/src</literal> where the tools sources
|
||||
are to be found.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <literal>~/alliance/Linux/build/$TOOL</literal> : the top
|
||||
directory under which the tool will be compiled for Linux.
|
||||
This is where the <literal>configure</literal> script will be run.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <literal>~/alliance/Linux/install</literal> : the top of
|
||||
the install tree when the tool is compiled locally for Linux.
|
||||
Under this directory you will found (at least) :
|
||||
<literal>./bin</literal>,
|
||||
<literal>./lib</literal> and <literal>./include</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <literal>~/alliance/Solaris/build/$TOOL</literal> :
|
||||
the tool's build directory for Solaris.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <literal>~/alliance/Solaris/install</literal> : top of the
|
||||
local install tree for Solaris.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title> CVS checkout </title>
|
||||
|
||||
<para> If the sources of the requested tool(s) are not found under
|
||||
<literal>~/alliance/src/</literal> <literal>attila</literal> will
|
||||
try to check them out. So, as says above, you must have access
|
||||
rights to the <emphasis>Alliance</emphasis> CVS tree.
|
||||
</para>
|
||||
<para> In addition to the tool(s) sources, it will also checks for
|
||||
the minimal set of files needed for <literal>configure</literal> to
|
||||
run. As for now :
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para> <literal>autostuff</literal> </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <literal>alliance.m4</literal> </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <literal>motif.m4</literal> </para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <literal>Makefile.am</literal> </para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title> Guessing <literal>CVSROOT</literal> </title>
|
||||
|
||||
<para> The root of the CVS tree will be set according to the
|
||||
following rules :
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para> Uses the user's environment variable
|
||||
<literal>CVSROOT</literal> if sets.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> Uses the <literal>attila</literal> default value
|
||||
sets in <literal>attila.conf</literal> (variable
|
||||
<literal>ATTILA_CVSROOT</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
<title> Guessing <literal>ALLIANCE_TOP</literal> </title>
|
||||
|
||||
<para> The root of the <literal>Alliance</literal> installed distribution
|
||||
tree will be set according to the following rules :
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para> Uses the user's environment variable
|
||||
<literal>ALLIANCE_TOP</literal> if sets.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> Uses the <literal>attila</literal> default value
|
||||
sets in <literal>attila</literal> itself (variable
|
||||
<literal>ATTILA_ALLIANCE_TOP</literal>).
|
||||
</para>
|
||||
<important>
|
||||
<title> <literal>ALLIANCE_TOP</literal> </title>
|
||||
<para> is set in <literal>attila</literal> itself because its value
|
||||
is a prerequisite to load the configuration file
|
||||
<literal>attila.conf</literal> which is in the directory
|
||||
<literal>$ALLIANCE_TOP/etc/</literal>.
|
||||
</para>
|
||||
</important>
|
||||
</listitem>
|
||||
</orderedlist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1>
|
||||
<title> Arguments </title>
|
||||
|
||||
<para> <literal>attila</literal> accepts the followings arguments :
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para> <userinput>-h</userinput>, <userinput>--help</userinput> :
|
||||
print help.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>-S</userinput>, <userinput>--ssh</userinput> :
|
||||
uses <literal>ssh</literal> instead of <literal>rsh</literal> to
|
||||
connect to the remote computers (in case of
|
||||
<userinput>--asim</userinput> or <userinput>--full</userinput>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>-U</userinput>, <userinput>--user</userinput> :
|
||||
perform a local installation.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>-F</userinput>, <userinput>--full</userinput> :
|
||||
install for all avalaibles architectures (currently Linux and
|
||||
Solaris).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>-A</userinput>, <userinput>--asim</userinput> :
|
||||
install in the system-wide directory
|
||||
(<literal>/asim/alliance</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>--prefix=<filename>INSTALL_DIR</filename></userinput> :
|
||||
override the default installation directory.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>--builddir=<filename>BUILD_DIR</filename></userinput> :
|
||||
override the default building directory.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>--tool=<filename>name1</filename></userinput> :
|
||||
name of the tool to be installed.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1>
|
||||
<title> Configuration file <literal>attila.conf</literal> </title>
|
||||
|
||||
<para> The configuration file is located in
|
||||
<literal>$ALLIANCE_TOP/etc</literal>. This file is to be read by the
|
||||
<literal>sh</literal> <emphasis>shell</emphasis>. It sets up the
|
||||
following variables :
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para> <userinput>LINUX_TARGET</userinput> : the computer where to
|
||||
compile for the Linux architecture (default <literal>bip</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>LINUX_CC</userinput> : the name or full path to
|
||||
to the <acronym>C</acronym> compiler for Linux system
|
||||
(default <literal>gcc3</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>LINUX_CXX</userinput> : the name or full path to
|
||||
to the <acronym>C++</acronym> compiler for Linux system
|
||||
(default <literal>g++3</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>SOLARIS_TARGET</userinput> : the computer where to
|
||||
compile for the Solaris architecture (default <literal>beny</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>SOLARIS_CC</userinput> : the name or full path to
|
||||
to the <acronym>C</acronym> compiler for Solaris system
|
||||
(default <literal>/usr/local/gcc-3.0.4/bin/g++3</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>SOLARIS_CXX</userinput> : the name or full path to
|
||||
to the <acronym>C++</acronym> compiler for Solaris system
|
||||
(default <literal>/usr/local/gcc-3.0.4/bin/g++3</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>ATTILA_CVSROOT</userinput> : the root of the
|
||||
<emphasis>Alliance</emphasis> CVS tree
|
||||
(default <literal>/users/outil/alliance/cvsroot</literal>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para> <userinput>CVS_STARTUP_FILES</userinput> : the minimal set of
|
||||
files needed to run <literal>configure</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
|
||||
<refsect1>
|
||||
<title> Examples </title>
|
||||
|
||||
<para>
|
||||
Compile & install <literal>nero</literal> tool on the local computer
|
||||
(must be either a Linux or a Solaris one) :
|
||||
<screen>
|
||||
$ <userinput>attila --tool=nero</userinput>
|
||||
</screen>
|
||||
</para>
|
||||
<para>
|
||||
Compile & install <literal>nero</literal> tool for all architectures
|
||||
(currently only Linux and Solaris are supported) :
|
||||
<screen>
|
||||
$ <userinput>attila --full --tool=nero</userinput>
|
||||
</screen>
|
||||
</para>
|
||||
<para>
|
||||
Compile & install <literal>nero</literal> tool in the system-wide
|
||||
directory (a new version for everyone to use) :
|
||||
<screen>
|
||||
$ <userinput>attila --asim --tool=nero</userinput>
|
||||
</screen>
|
||||
</para>
|
||||
<para>
|
||||
Compile & install <literal>mbk</literal> the <literal>genlib</literal>
|
||||
(the order is significant) in a row for a local install on the current
|
||||
computer :
|
||||
<screen>
|
||||
$ <userinput>attila --tool=mbk --tool=genlib</userinput>
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
</refsect1>
|
||||
|
||||
|
||||
</refentry>
|
|
@ -0,0 +1,10 @@
|
|||
AM_CFLAGS = @ALLIANCE_CFLAGS@
|
||||
|
||||
bin_SCRIPTS = attila
|
||||
CLEANFILES = attila
|
||||
|
||||
attila : ${srcdir}/attila.sh
|
||||
${SED} 's,__ALLIANCE_INSTALL_DIR__,$(prefix),' $< > $@
|
||||
chmod a+x $@
|
||||
|
||||
EXTRA_DIST = attila.sh
|
|
@ -0,0 +1,620 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $Id: attila.sh,v 1.1 2002/09/29 17:55:54 jpc Exp $
|
||||
#
|
||||
# /------------------------------------------------------------------\
|
||||
# | |
|
||||
# | 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-support@asim.lip6.fr |
|
||||
# | ================================================================ |
|
||||
# | sh script : "./attila" |
|
||||
# | **************************************************************** |
|
||||
# | U p d a t e s |
|
||||
# | |
|
||||
# \------------------------------------------------------------------/
|
||||
#
|
||||
|
||||
|
||||
|
||||
|
||||
# /------------------------------------------------------------------\
|
||||
# | |
|
||||
# | Functions Definitions |
|
||||
# | |
|
||||
# \------------------------------------------------------------------/
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Function : `print_usage()'.
|
||||
|
||||
print_usage ()
|
||||
{
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Usage : attila [-h] [-U] [-F] [-A] \\"
|
||||
echo " [--help] [--user] [--full] [--asim] \\"
|
||||
echo " [--prefix=<INSTALL_DIR>] [--builddir=<BUILD_DIR>] \\"
|
||||
echo " <--tool=<name1> [--tool=<name2> [...]]"
|
||||
echo ""
|
||||
echo "Options :"
|
||||
echo " o [-h|--help] : Print this help."
|
||||
echo " o [-U|--user] : 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] : Compile/install the requested tool(s) for all"
|
||||
echo " avalaibles architectures. Currently only Linux and Solaris"
|
||||
echo " are supported."
|
||||
echo " o [-A|--asim] : 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 [--prefix=<INSTALL_DIR>] : 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>] : 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>] : The name of the tool to be processed, at"
|
||||
echo " least one must be present."
|
||||
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 support: alliance-support@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/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 -sr`" in
|
||||
Linux*) echo "Linux";;
|
||||
SunOS\ 5*) echo "Solaris";;
|
||||
*) echo "`uname -sr`";;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Function : `guess_gcc()'.
|
||||
|
||||
guess_gcc ()
|
||||
{
|
||||
case "$1" in
|
||||
"Linux") if which gcc3 > /dev/null 2>&1; then
|
||||
CXX=g++3
|
||||
CC=gcc3
|
||||
fi
|
||||
;;
|
||||
"Solaris") if [ -x /usr/local/gcc-3.0.4/bin/gcc ]; then
|
||||
CXX=/usr/local/gcc-3.0.4/bin/g++
|
||||
CC=/usr/local/gcc-3.0.4/bin/gcc
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# 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 ()
|
||||
{
|
||||
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
|
||||
|
||||
if [ ! -f "$ALLIANCE_TOP/etc/attila.conf" ]; then
|
||||
echo "attila: \"$ALLIANCE_TOP/etc/attila.conf\" doesn't exist !"
|
||||
echo " Please check \$ALLIANCE_TOP."
|
||||
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ! -d "$ALLIANCE_TOP/bin" ]; then
|
||||
echo "attila: \"$ALLIANCE_TOP/bin\" doesn't exist !"
|
||||
echo " Please check \$ALLIANCE_TOP."
|
||||
|
||||
exit 1
|
||||
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/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 : `cvs_check()'.
|
||||
|
||||
cvs_check ()
|
||||
{
|
||||
echo " o Checking CVSROOT."
|
||||
|
||||
# Check the CVROOT variable.
|
||||
if [ -z "$CVSROOT" ]; then
|
||||
echo " - CVROOT is not set. Using defaut $ATTILA_CVSROOT."
|
||||
CVSROOT="$ATTILA_CVSROOT"; export CVSROOT
|
||||
else
|
||||
echo " - Trusting user supplied \$CVSROOT ($CVSROOT)."
|
||||
fi
|
||||
|
||||
|
||||
# Check out minimal set of files if needed.
|
||||
for file in $CVS_STARTUP_FILES; do
|
||||
if [ ! -f $HOME/alliance/src/$file ]; then
|
||||
cvs co alliance/src/$file
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
# Checks for tools sources.
|
||||
echo " o Checking tools sources."
|
||||
for TOOL in $TOOLS; do
|
||||
echo " - $HOME/alliance/src/$TOOL."
|
||||
|
||||
if [ ! -d $HOME/alliance/src/$TOOL ]; then
|
||||
echo " > The tool directory $TOOL doesn't exist."
|
||||
echo -n " > Do you want to check it out from the CVS tree ? [y]/n "
|
||||
|
||||
LOOP="y"
|
||||
while [ "$LOOP" = "y" ]; do
|
||||
read ANSWER
|
||||
case "$ANSWER" in
|
||||
"y"|"") ANSWER="y"; LOOP="n";;
|
||||
"n") LOOP="n";;
|
||||
*) echo -n " > ";;
|
||||
esac
|
||||
done
|
||||
|
||||
case "$ANSWER" in
|
||||
"y") cvs co alliance/src/$TOOL;;
|
||||
"n") exit 1;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
}
|
||||
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Function : `compile_tool()'.
|
||||
|
||||
compile_tool ()
|
||||
{
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# Check environment.
|
||||
|
||||
echo " o Compilation environment."
|
||||
|
||||
ALLIANCE_OS=`guess_os`
|
||||
case "$ALLIANCE_OS" in
|
||||
"Linux") MAKE="make";;
|
||||
"Solaris") MAKE="gmake";;
|
||||
*) echo "attila: \"$ALLIANCE_OS\" is not supported, only Linux & Solaris"
|
||||
echo " are."
|
||||
|
||||
exit 1
|
||||
esac
|
||||
export MAKE
|
||||
|
||||
echo " - OS := $ALLIANCE_OS"
|
||||
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/src
|
||||
if [ ! -f $TOOL/Makefile.in ]; then
|
||||
./autostuff $TOOL
|
||||
fi
|
||||
|
||||
if [ "$ASIM" = "y" ]; then
|
||||
echo " o For ASIM install, removing $BUILD_DIR"
|
||||
for TOOL in $TOOLS; do
|
||||
echo " - $BUILD_DIR/$TOOL."
|
||||
rm -rf $BUILD_DIR/$TOOL
|
||||
done
|
||||
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 $BUILD_DIR
|
||||
if [ ! -d $TOOL ]; then
|
||||
echo " - Creating $TOOL directory."
|
||||
make_dir $TOOL
|
||||
fi
|
||||
cd $TOOL
|
||||
|
||||
$SRC_DIR/$TOOL/configure --prefix=$INSTALL_DIR
|
||||
$MAKE prefix=$INSTALL_DIR install
|
||||
|
||||
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="__ALLIANCE_INSTALL_DIR__"
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Variables sets in "attila.conf".
|
||||
|
||||
|
||||
CVS_STARTUP_FILES=""
|
||||
|
||||
LINUX_TARGET="bip"
|
||||
LINUX_CC="gcc3"
|
||||
LINUX_CXX="g++3"
|
||||
|
||||
SOLARIS_TARGET="beny"
|
||||
SOLARIS_CC="/usr/local/gcc-3.0.4/bin/gcc3"
|
||||
SOLARIS_CXX="/usr/local/gcc-3.0.4/bin/g++3"
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Internal variables.
|
||||
|
||||
|
||||
CC=gcc
|
||||
CXX=g++
|
||||
export CC CXX
|
||||
|
||||
RSH="rsh"
|
||||
|
||||
SRC_DIR="alliance/src"
|
||||
BUILD_DIR=""
|
||||
INSTALL_DIR=""
|
||||
|
||||
|
||||
|
||||
TOOLS=""
|
||||
|
||||
ASIM="n"
|
||||
FULL="n"
|
||||
AUTO="n"
|
||||
SELF="$0"
|
||||
|
||||
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Process the command line.
|
||||
|
||||
|
||||
# Print the banner.
|
||||
alc_banner
|
||||
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
print_usage
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
COMMAND_LINE=""
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
# Long arguments.
|
||||
--help) print_help;
|
||||
exit 0;;
|
||||
--ssh) RSH="ssh";;
|
||||
--user) ASIM="n";;
|
||||
--full) FULL="y";;
|
||||
--asim) ASIM="y"; FULL="y";;
|
||||
--asim-noloop) ASIM="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;;
|
||||
|
||||
# Short arguments.
|
||||
-*) SHORTS="$1"; NB=2; CH=`echo $SHORTS | cut -c$NB`
|
||||
|
||||
while [ "$CH" != "" ]; do
|
||||
case $CH in
|
||||
h) print_usage; exit 0;;
|
||||
S) RSH="ssh";;
|
||||
U) ASIM="n";;
|
||||
F) FULL="y";;
|
||||
A) ASIM="n"; 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
|
||||
|
||||
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
|
||||
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Do the work.
|
||||
|
||||
find_self "$0" "$AUTO" $COMMAND_LINE
|
||||
|
||||
load_conf
|
||||
|
||||
cvs_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
|
||||
|
||||
for TOOL in $TOOLS; do
|
||||
ARGS="$ARGS --tool=$TOOL"
|
||||
done
|
||||
|
||||
ENVIRONMENT=""
|
||||
ENVIRONMENT="$ENVIRONMENT ALLIANCE_TOP=$ALLIANCE_TOP; export ALLIANCE_TOP;"
|
||||
|
||||
$RSH $LINUX_TARGET "$ENVIRONMENT $SELF $ARGS"
|
||||
$RSH $SOLARIS_TARGET ". /etc/profile; $ENVIRONMENT $SELF $ARGS"
|
||||
else
|
||||
# Out of recursion...
|
||||
compile_tool
|
||||
fi
|