Total Pageviews

Monday 22 August 2016

ATS Programming Language

Installation through source compilation

This installation method requires access to gcc or some other C-compiler (such as clang) and is also in need of the GMP library. It takes 3 simple steps to complete with the third one being optional.
Step 1:
You can download a released package of ATS2 available on-line and then untar it in a directory, say MYATS, of your choice by issuing the following command-line:
tar -zvxf ATS2-Postiats-x.x.x.tgz
where ATS2-Postiats-x.x.x.tgz refers to the downloaded package and x.x.x is the version number of the package. All the directories and files extracted from the tarball are stored in the directory MYATS/ATS2-Postiats-x.x.x.
If you have access to the git command, then you can also do a git-clone as follows to obtain the current released package of ATS2:
git clone git://git.code.sf.net/p/ats2-lang/code ATS2-Postiats
Step 2:
Please enter the directory MYATS/ATS2-Postiats-x.x.x, and then execute the following command-line:
./configure && make all
You can expect that two executables patscc and patsopt be generated. After setting PATSHOME to MYATS/ATS2-Positiats-x.x.x and adding ${PATSHOME}/bin to the value of PATH, you are ready to use patsccand patsopt for compiling ATS programs.
If you want patsopt to run with GC when it is called to compile ATS source, please re-build by issuing the following command-line:
make cleanall && ./configure && make GCFLAG=-D_ATS_GCATS all
If you prefer to have patsopt run with Boehm-GC, please issue the following command-line:
make cleanall && ./configure && make GCFLAG=-D_ATS_GCBDW all
Step3
Optionally, you may choose to install ATS. The default directory for installing ATS is /usr/local. If you want to change it, please first execute the following command-line:
./configure --prefix=DESTDIR
where DESTDIR refers to the directory into which ATS is to be installed.
You can now install ATS by executing:
make install
After installation, you need to set PATSHOME to DESTDIR/lib/ats2-postiats-x.x.x, which is the name of the directory where ATS is installed.
Note that you can always re-configure before executing make install if you would like to change a previously selected directory for installation:
./configure --prefix=DESTDIR2
Also, you can perform staged installation by making use of the variable DESTDIR. Please find explanation on-line.

from http://www.ats-lang.org/Downloads.html#Requirements_install,
http://www.ats-lang.org