

  <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>
        <sbr>
        <arg>-c-<arg choice="req"><replaceable>configure_arg1</replaceable> </arg> <arg rep="repeat"> <replaceable>configure_arg2</replaceable> </arg> </arg>
        <sbr>
        <arg>-m-<arg choice="req"><replaceable>make_arg1</replaceable></arg> <arg rep="repeat"><replaceable>make_arg2</replaceable></arg> </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&nbsp;:
      <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>autostuff</literal> for the tool in the
          <literal>~/alliance/src</literal> directory.
          </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&nbsp;: (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)&nbsp:
          <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&nbsp;:
      <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&nbsp;:
      <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&nbsp;:
    <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&nbsp;:
    <itemizedlist>
      <listitem>
        <para> <userinput>-h</userinput>, <userinput>--help</userinput>&nbsp;:
        print help.
        </para>
      </listitem>
      <listitem>
        <para> <userinput>-S</userinput>, <userinput>--ssh</userinput>&nbsp;:
        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>&nbsp;:
        perform a local installation.
        </para>
      </listitem>
      <listitem>
        <para> <userinput>-F</userinput>, <userinput>--full</userinput>&nbsp;:
        install for all avalaibles architectures (currently Linux and
        Solaris).
        </para>
      </listitem>
      <listitem>
        <para> <userinput>-A</userinput>, <userinput>--asim</userinput>&nbsp;:
        install in the system-wide directory
        (<literal>/asim/alliance</literal>).
        </para>
      </listitem>
      <listitem>
        <para> <userinput>--prefix=<filename>INSTALL_DIR</filename></userinput>&nbsp;:
        override the default installation directory.
        </para>
      </listitem>
      <listitem>
        <para> <userinput>--builddir=<filename>BUILD_DIR</filename></userinput>&nbsp;:
        override the default building directory.
        </para>
      </listitem>
      <listitem>
        <para> <userinput>--tool=<filename>name1</filename></userinput>&nbsp;:
        name of the tool to be installed.
        </para>
      </listitem>
      <listitem>
        <para> <userinput>-c- <filename>configure_arg1</filename></userinput>&nbsp;:
        all arguments following <userinput>-c-</userinput> (until a
        <userinput>-m-</userinput> is encountered) are passed
        <emphasis>as is</emphasis> to the subsequent call to
        <literal>configure</literal>. For example, if you want to first
        use your local libraries, give <userinput>--enable-devel</userinput>.
        </para>
      </listitem>
      <listitem>
        <para> <userinput>-m- <filename>make_arg1</filename></userinput>&nbsp;:
        all arguments following <userinput>-m-</userinput> are passed
        <emphasis>as is</emphasis> to the subsequent call to
        <literal>make</literal>. If no <userinput>-m-</userinput>
        argument is given, then <userinput>install</userinput> is
        assumed. If you want to completly uninstall a tool and clean
        it's build directory you can pass
        <userinput>uninstall clean</userinput>
        </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&nbsp;:
    <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)&nbsp;:
    <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)&nbsp;:
    <screen>
$ <userinput>attila --asim --tool=nero</userinput>
    </screen>
    </para>
    <para>
    Compile & install <literal>mbk</literal> then <literal>genlib</literal>
    (the order is significant) in a row for a local install on the current
    computer&nbsp;:
    <screen>
$ <userinput>attila --tool=mbk --tool=genlib</userinput>
    </screen>
    </para>
    <para>
    Compile <literal>nero</literal> tool and link it against the locally
    installed libraries (if any).
    <screen>
$ <userinput>attila --tool=nero -c- --enable-devel</userinput>
    </screen>
    </para>
    <para>
    Remove <literal>poire</literal> tool from the system-wide tree.
    (<literal>poire</literal> is the old name of <literal>nero</literal>).
    <screen>
$ <userinput>attila --asim --tool=poire -m- uninstall</userinput>
    </screen>
    </para>

  </refsect1>


  </refentry>
