mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-10-10 00:27:23 +00:00
standardizing installation paths and default build.
This commit is contained in:
parent
c985dcb3e4
commit
c0fb40fb69
11 changed files with 253 additions and 115 deletions
|
|
@ -82,7 +82,7 @@ This will create a subdirectory 'voc' which includes the following files and dir
|
|||
|
||||
```
|
||||
cd voc
|
||||
make full
|
||||
make
|
||||
```
|
||||
|
||||
The makefile will:
|
||||
|
|
@ -94,48 +94,71 @@ The makefile will:
|
|||
link the final Oberon compiler. This compiler is then used for the remaining steps.
|
||||
- Build the .sym file browser command `showdef`.
|
||||
- Build all the libraries in -O2 mode, and a subset in -OC mode.
|
||||
- Create an installation directory structure local to your copy of the repository.
|
||||
- Run a set of confidence tests.
|
||||
- Create an installation directory image local to your copy of the repository at `install/`.
|
||||
- Run a set of confidence tests.
|
||||
|
||||
The makefile will use either gcc or clang, whichever is installed. If you have both installed you can specify which to use by running either `export CC=gcc` or `export CC=clang` before the `make full` command.
|
||||
The makefile will use either gcc or clang, whichever is installed. If you have both installed you can specify which to use with, for example, `CC=clang make`.
|
||||
|
||||
The build does not require root access and does not install anything outside
|
||||
the repository. To select a compiler for one build, use for example:
|
||||
|
||||
```
|
||||
CC=clang make
|
||||
```
|
||||
|
||||
|
||||
#### Installation directories:
|
||||
|
||||
If the makefile succeeds it will end with instructions on how to set your path variable so that the
|
||||
compiler (voc) is found.
|
||||
compiler (voc) in the local `install/bin` directory is found.
|
||||
|
||||
|
||||
#### Installing to system directories
|
||||
|
||||
You may optionally install to system directories such as /opt or /usr/local/share.
|
||||
You may optionally copy the local installation image to system directories such as /opt or /usr/local.
|
||||
|
||||
First be sure to have completed `make full` successfully.
|
||||
First be sure to have completed `make` successfully.
|
||||
|
||||
Then from a root prompt, or using sudo, run `make install`
|
||||
Then from a root prompt, or using sudo, run `make install`.
|
||||
|
||||
The installation will be made to:
|
||||
By default, the installation will be made to:
|
||||
|
||||
| System | Install dir |
|
||||
| ----------------------- | -------------------------------------- |
|
||||
| All types of Linux | /opt/voc |
|
||||
| BSD (including Darwin) | /usr/local/share/voc |
|
||||
| Termux (android) | /data/data/com.termux/files/opt/voc |
|
||||
| Content | Install dir |
|
||||
| --------------------------- | --------------------------- |
|
||||
| Compiler and showdef | /usr/local/bin |
|
||||
| Oberon resources | /usr/local/share/voc |
|
||||
| Runtime libraries | /usr/local/lib |
|
||||
| Termux (android) | /data/data/com.termux/files/opt/voc |
|
||||
|
||||
As with `make full`, `make install` will exit with instructions on how to set
|
||||
your PATH.
|
||||
Set `PREFIX`, `BINDIR`, `INSTALLDIR`, and `LIBDIR` to change these locations.
|
||||
`make install` only copies files. Use `make install-system` for a manual
|
||||
installation that also updates the dynamic linker cache.
|
||||
|
||||
For package builds, set the final paths and use `DESTDIR` for staging:
|
||||
|
||||
```
|
||||
make install PREFIX=/usr DESTDIR=/path/to/package-root
|
||||
```
|
||||
|
||||
`DESTDIR` is only a staging prefix and is not included in the compiler's
|
||||
runtime search paths. To install the historical self-contained layout instead,
|
||||
use an explicit installation directory, for example:
|
||||
|
||||
```
|
||||
make install INSTALLDIR=/opt/voc
|
||||
```
|
||||
|
||||
|
||||
#### Installation directory contentains:
|
||||
#### Installation directory contents:
|
||||
|
||||
| Directory | Content |
|
||||
| --- | --- |
|
||||
| bin/ | Compiler and symbol file browser command binaries. |
|
||||
| lib/ | Static and dynamic link libraries for all (-O2 and -OC) type models. |
|
||||
| 2/include/ | C compiler header files for -O2 modules |
|
||||
| 2/sym/ | .sym files for -O2 modules |
|
||||
| C/include/ | C compiler header files for -OC modules |
|
||||
| C/sym/ | .sym files for -OC modules |
|
||||
| Directory | Content |
|
||||
| --- | --- |
|
||||
| `BINDIR` | Compiler and symbol file browser command binaries. |
|
||||
| `LIBDIR` | Static and dynamic link libraries for all type models. |
|
||||
| `INSTALLDIR/2/include` | C headers for -O2 modules. |
|
||||
| `INSTALLDIR/2/sym` | Symbol files for -O2 modules. |
|
||||
| `INSTALLDIR/C/include` | C headers for -OC modules. |
|
||||
| `INSTALLDIR/C/sym` | Symbol files for -OC modules. |
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
### Porting to a new platform
|
||||
|
||||
Porting to a new 32 or 64 bit platform is usually automatically handled
|
||||
by `make full`:
|
||||
by `make`:
|
||||
|
||||
- The makefile compiles `src/tools/make/configure.c` with the
|
||||
platform's default C compiler.
|
||||
|
|
@ -14,10 +14,10 @@ by `make full`:
|
|||
which of 5 sets of pre-prepared C source files to build to create
|
||||
the bootstrap compiler.
|
||||
|
||||
On most systems this will be sufficient for `make full` to build
|
||||
and install the compiler and libraries.
|
||||
On most systems this will be sufficient for `make` to build the compiler
|
||||
and libraries.
|
||||
|
||||
`make full` will terminate with a message such as:
|
||||
`make` will terminate with a message such as:
|
||||
|
||||
`--- Branch v2docs freebsd gcc LP64 confidence tests passed ---`
|
||||
|
||||
|
|
@ -55,4 +55,3 @@ Unix-like systems including Linux, BSD, Android and cygwin
|
|||
If you are porting to a system that does not provide a Unix style API, it will
|
||||
be necessary to implement a new variant of Platform.Mod providing the same
|
||||
interface as Platformunix.Mod and Platform Windows.Mod.
|
||||
|
||||
|
|
|
|||
|
|
@ -52,12 +52,12 @@ This will create a subdirectory 'voc' including the following files and director
|
|||
| makefile | Makefile for all BSD- and Linux- like environments. Includes tests. |
|
||||
| make.cmd | Makefile specifically for native Microsoft C builds. No tests. |
|
||||
|
||||
#### 3. Build and install the Oberon compiler and library
|
||||
#### 3. Build the Oberon compiler and library
|
||||
|
||||
|
||||
```
|
||||
cd voc
|
||||
[sudo] make full
|
||||
make
|
||||
```
|
||||
|
||||
The makefile will:
|
||||
|
|
@ -69,8 +69,14 @@ The makefile will:
|
|||
link the final Oberon compiler. This compiler is then used for the remaining steps.
|
||||
- Build the .sym file browser command `showdef`.
|
||||
- Build all the libraries in -O2 mode, and a subset in -OC mode.
|
||||
- Install the compiler and libraries by copying them to an appropriate location for your OS.
|
||||
- Run a set of confidence tests.
|
||||
- Create an installation image in the local `install/` directory.
|
||||
- Run a set of confidence tests.
|
||||
|
||||
The build does not require administrator access. To install the resulting
|
||||
image, run `make install` separately. On Cygwin, the default Unix locations
|
||||
are `/usr/local/bin`, `/usr/local/share/voc`, and `/usr/local/lib`; use
|
||||
`PREFIX`, `BINDIR`, `INSTALLDIR`, and `LIBDIR` to change them. For a package
|
||||
build, use `DESTDIR` as the staging prefix.
|
||||
|
||||
|
||||
### Build using mingw under cygwin
|
||||
|
|
@ -84,13 +90,13 @@ The makefile will:
|
|||
If it succeeds the makefile will end with instructions on how to set your path variable so that the
|
||||
compiler (voc) is found.
|
||||
|
||||
The installation will be found at:
|
||||
The local build image will be found at:
|
||||
|
||||
| Built with | Install dir |
|
||||
| --------------- | -------------------------------------- |
|
||||
| cygwin | /opt/voc |
|
||||
| cygwin + mingw | %PROGRAMFILES%/voc |
|
||||
| MSC | %PROGRAMFILES%/voc |
|
||||
| cygwin | `voc/install/` |
|
||||
| cygwin + mingw | `voc/install/` |
|
||||
| MSC | `%PROGRAMFILES%/voc` after installation |
|
||||
|
||||
The installation directory contains:
|
||||
|
||||
|
|
@ -167,12 +173,12 @@ To use mingw, install the correct sized package and export CC= the compiler name
|
|||
- For 32 bit cygwin
|
||||
|
||||
- use setup-x86.exe to add the package mingw64-i686-gcc-core.
|
||||
- run 'export CC=i686-w64-mingw32-gcc' then 'make full'
|
||||
- run 'export CC=i686-w64-mingw32-gcc' then 'make'
|
||||
|
||||
- For 64 bit cygwin
|
||||
|
||||
- use setup-x86\_64.exe to add the package mingw64-x86\_64-gcc-core.
|
||||
- run 'export CC=x86_64-w64-mingw32-gcc' then 'make full'
|
||||
- run 'export CC=x86_64-w64-mingw32-gcc' then 'make'
|
||||
|
||||
(*Note*: Don't be put off by the name 'mingw64' in the 32 bit package.)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue