Hi,
due to recent needs, I wrote a little script to simplify the
installation of a GPC *binary* distribution into *another* directory
than it was intended.
To explain the situation: The gpc executable uses some files (e.g.
the preprocessor gpc-cccp, the actual compiler gpc1 and the runtime
library libgpc.a) which are usually stored in a directory
<prefix>/lib/gcc-lib/<target>/<version>/. The <prefix>, i.e. the
base directory for the GPC installation, can be specified while
building GPC, and is then hard-coded into the gpc executable. When
using gpc, it can be overridden with a `-B' option (for gpc-cccp and
gpc1) and a `-L' option (for libgpc.a).
The purpose of the install-gpc-binary script is just to create
another script which calls gpc with those two options (in addition
to any options given on the command-line). It examines the installed
GPC binary distribution to find out the correct directories. The
script created will be called gpc, and should be in the PATH, while
the actual gpc executable should not be in the PATH, so calling
`gpc' will invoke the script. Then, `gpc' can be used just like a
gpc installed in the normal way, which is quite useful for using
third-party Makefiles etc.
Who needs this script?
Those who get a binary distribution of GPC and don't install it into
the right directory. These are usually not PC (including Linux)
users, because most of them have root access and can install GPC
into the right directory. There are also usually not system
administrators of multi-user machines (who have root access and
usually will prefer to build their software themselves, anyway). So,
these are e.g. users on multi-user machines who can't convince their
admins to install GPC for them, or just need it quickly, and/or
don't have enough space in their home to build GPC...
How to use it?
- Get a GPC binary for your system, and the install-gpc-binary
script. The script is available in the same FTP directories on
agnes as the GPC binaries, i.e.:
ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/beta/binary/install-gpc-binary
ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/alpha/binary/install-gpc-binary
- Unpack the GPC binary into any directory (but don't move it around
after running the script).
- Change into its "base" directory -- e.g. if the archive unpacks
into usr/local/bin/..., usr/local/lib/..., etc. (below the current
directory), change into usr/local, or move the contents of
usr/local up to the current directory. In any case, the bin and
lib directories should now be subdirectories of the current
directory (the script will make sure this was done correctly).
- Run this script and answer a few simple questions.
- That's all. If you set your $PATH appropriately, you can now
invoke `gpc' in the normal way.
Frank
--
Frank Heckenbach, frank(a)g-n-u.de
http://fjf.gnu.de/
PGP and GPG keys: http://fjf.gnu.de/plan