Under normal circumstances, recompiling the compiler is limited to the following instructions (assuming you start in directory /pp/src):
cd compiler
make cycle |
This will work only if the make le is installed correctly and if the needed tools are present in the PATH. Which tools must be installed can be found in appendix E.
The above instructions will do the following:
The last two steps are repeated 3 times, until three passes have been made or until the generated compiler binary is equal to the binary it was compiled with. This process ensures that the compiler binary is correct.
Compiling for another target: When compiling the compiler for another target, it is necessary to specify the OS_TARGET make le variable. It can be set to the following values: win32, go32v2, os2 and linux. As an example, cross-compilation for the go32v2 target from the win32 target is chosen:
cd compiler
make cycle OS_TARGET=go32v2 |
This will compile the go32v2 RTL, and compile a go32v2 compiler.
When compiling a new compiler and the compiler should be compiled using an existing compiled RTL, the all target must be used, and another RTL directory than the default (which is the ../rtl/$(OS_TARGET) directory) must be indicated. For instance, assuming that the compiled RTL units are in /pp/rtl, typing
cd compiler
make clean make all UNITDIR=/pp/rtl |
should use the RTL from the /pp/rtl dirrectory.
This will then compile the compiler using the RTL units in /pp/rtl. After this has been done, the 'make cycle' can be used, starting with this compiler:
make cycle PP=./ppc386
|
This will do the make cycle from above, but will start with the compiler that was generated by the make all instruction.
In all cases, many options can be passed to make to in uence the compile process. In general, the make les add any needed compiler options to the command-line, so that the RTL and compiler can be compiled. Additional options (e.g. optimization options) can be speci ed by passing them in OPT.