This script acts as a front end to the GNAT compiler in the case where you don't want to install GNAT over an existing compiler (perhaps your main compiler is Apple's gcc-4.0.1, which doesn't support Ada), and/or where you have more than one GNAT version installed.
Certainly on Linux, binary GNAT distributions (with the honorable exception of those from AdaCore) can often only be installed in standard places unless you use a script, built when the distribution is installed if you're lucky, to set up the necessary environment variables. Even then, you may have trouble getting the correct version of gcc for your C and C++ compilations (never mind Fortran).
gnatfe replaces that script.
After you've installed the software in a place early in your path but without any existing GCC or GNAT components (the default is
/usr/local/bin), commands such as
gprmake will run in the place selected by
gnatfe. Additionally, new commands
If your default is to pick up GNAT from
/opt/gnat-gpl-2006, you can override this by setting
GNAT_PREFIX: for example,
GNAT_PREFIX=/opt/gnat-gpl-2007 gnatmake foo.adb
- The main script
- The installation script
Both these scripts need to be checked before use! They include configuration variables to say where the actual GNAT installation is and where you want the front-ends to be.
The script won't work to build GCC itself (the problem is the use of backslash-quoted characters:
-Dfoo="\" a b c \""). Instead, set PATH so that your host compiler is first in the path.
This program is issued under the GNU Public License .