Next: Cross-Compiler Up: Installation
Compilation in a Separate Directory
If you wish to build the object files and executables in a directory
other than the one containing the source files, here is what you must
1. Make sure you have a version of Make that supports the `VPATH'
feature. (GNU Make supports it, as do Make versions on most BSD
2. If you have ever run `configure' in the source directory, you must
undo the configuration. Do this by running:
3. Go to the directory in which you want to build the compiler before
On systems that do not support symbolic links, this directory must
be on the same file system as the source code directory.
4. Specify where to find `configure' when you run it:
This also tells `configure' where to find the compiler sources;
`configure' takes the directory from the file name that was used to
invoke it. But if you want to be sure, you can specify the source
directory with the `--srcdir' option, like this:
../gcc/configure --srcdir=../gcc sun3
The directory you specify with `--srcdir' need not be the same as
the one that `configure' is found in.
Now, you can run `make' in that directory. You need not repeat the
configuration steps shown above, when ordinary source files change. You
must, however, run `configure' again when the configuration files
change, if your system does not support symbolic links.
automatically generated by info2www