olang | O Programming Language


2 Installation

This installation assumes you are running an unix-like operation system.

2.1 Dependencies

2.2 Installing olc from source

The olang is still in its early stages, so it’s not packaged for major package managers. To install it, clone the source code and follow the installation instructions.

git clone https://git.sr.ht/~johnnyrichard/olang

The following commands will compile the code and install olc binary (olang compiler), man pages and info docs into your system.

$ make
$ make install

And for uninstall the program run

$ make uninstall

2.3 Custom Installation

There are few make variables which can be used to customize your installation as described bellow.

PREFIX

The prefix where the compiler and docs should be installed, it is set to /usr/local if not specified.

BINDIR

The path where the compiler binary will be installed, it is set to $PREFIX/bin if not specified.

DATADIR

The path where the read-only documents will be installed, it is set to $PREFIX/share if not specified.

MANDIR

The path where the man documents will be installed, it is set to $DATADIR/man if not specified.

MAN1DIR

The path where the man1 documents will be installed, it is set to $MANDIR/man1 if not specified.

INFODIR

The path where the info documents will be installed, it is set to $DATADIR/info if not specified.

DESTDIR

In case you are installing the compiler on different root than / (by default the install assumes the destination dir as root), you can set the variable DESTDIR on make for example:

$ make DESTDIR=/mnt/linux-root install

2.4 Developer Tips

If you want to install the compiler but do not want to make it system available, you might want to have it installed on the XDG ~/.local directory. Make sure you have set PATH, MANPATH and INFOPATH correctly so you can have the resources installed available on your shell.

$ make PREFIX=~/.local install