|
Installation has several aspects. First installation of
source code is covered, and then
the binary distributions are treated. If you
want to install in another place than your
home directory, you must adjust a few things. Finally, no matter
what platform you're using and no matter where you installed, you must
enhance your path to include the place where the
interpreter script is located, and you are ready to
check that your installation works.
Source Code
If you have downloaded the source code, i.e. the
file gbeta-0.9-src.tgz , then you need to unpack it,
otherwise you may skip this section.
You will get a standard installation by unpacking in your home
directory:
For installations elsewhere, see below.
Assuming that you have put gbeta-0.9-src.tgz in your
home directory, you can unpack the archive with:
gtar xzf gbeta-0.9-src.tgz |
If you are running Linux, gtar is available as
tar :,
tar xzf gbeta-0.9-src.tgz |
and if you are running on another platform where gtar is
not available, the following should work:
gunzip gbeta-0.9-src.tgz tar xf gbeta-0.9-src.tar |
There are a couple of things you might like to know if you want to
compile your own version of the interpreter.
Binaries
If you have downloaded one or more binary
distributions of gbeta, you'll need to unpack them, and the standard
place to do this is your home directory:
Again, alternative placements are possible.
Then, on Linux:
gtar xzf gbeta-0.9-i386-linux-elf-bin.tgz |
On Sun:
gtar xzf gbeta-0.9-sparc-sun-solaris2.5-bin.tgz |
On HP:
gtar xzf gbeta-0.9-hppa1.1-hp-hpux9-bin.tgz |
And on SGI:
gtar xzf gbeta-0.9-mips-sgi-irix6-bin.tgz |
You may have to use slightly different versions of these commands,
just like above, depending on the kind of
tar your system provides.
Adjusting the PATH
The PATH environment variable must be enhanced to include
the position of the script gbeta which is used to invoke
the interpreter. Since the interpreter needs a few environment
variables you cannot just run it on its own, and the script is there
to select the right platform and to provide the correct environment.
In a standard installation, this could be achieved by adding one extra
statement in your shell startup script:
# users of sh family shells (sh,bash,ksh,pdksh,ash..)
# would add this to ~/.profile or ~/.bash_profile or ..
PATH=$PATH:$HOME/gbeta-0.9/bin |
or
# users of csh family shells (csh,tcsh)
# would add this to ~/.login
setenv PATH $PATH:$HOME/gbeta-0.9/bin |
If you prefer that, it is of course possible to use other approaches
than changing your path, e.g.
alias gbeta=$HOME/gbeta-0.9/bin/gbeta |
Check the Installation
Now you are ready to try out your installation by
using the interpreter for some basic tasks.
Installing Elsewhere
It is possible to install gbeta in a different place, i.e. not
in your home directory. Assuming that you have unpacked the files in
the directory MYDIR , you must edit the script
which is used to invoke the interpreter. With e.g. emacs as the
editor that amounts to:
cd MYDIR/gbeta-0.9/bin
chmod u+w gbeta emacs gbeta |
In the editor you should change the assignment of
GBETA_ROOT to:
...
GBETA_ROOT=${GBETA_ROOT:-MYDIR/gbeta-$GBETA_VERSION}
# ----- INSTALL END -----
... |
Alternatively, you can leave the gbeta script unchanged
and assign to the evironment variable GBETA_ROOT , by
putting the following into your shell startup file:
# for sh-family shells:
export GBETA_ROOT=MYDIR/gbeta-0.9
# for csh-family shells:
setenv GBETA_ROOT MYDIR/gbeta-0.9 |
Please note that creating an alias or similar to make it possible to
execute the gbeta script is not sufficient when
gbeta is installed in another place than your home directory:
the grammar specifications can not be found if GBETA_ROOT
does not point to the right directory.
| |