Menu

Building and installing Log in to Edit

Hongwei Xi Artyom Shalkhakov Brandon Barker jeffrey

Installing ATS/Anairiats

To install ATS on Ubuntu 12.04, run the following command.

sudo apt-get install ats-lang-anairiats

For more information on compiling ATS from its source code, see the official website.

Compiling ATS/Postiats from sources

Assuming you've got ATS/Anairiats functioning on your system, you can use it to bootstrap Postiats (currently version 0.2.10 is required). Please proceed as described next.

Checkout Postiats from sources, using the following command (assuming that ~/postiats is a directory where the repository is to be put locally):

git clone https://github.com/githwxi/ATS-Postiats.git ~/postiats

Navigate to ~/postiats, then issue the following commands:

make -f codegen/Makefile_atslib
touch src/.depend
make -C src -f Makefile all

Then, copy the resulting src/patsopt binary to ~/postiats/bin (create the directory if needed). And finally set the environment variable PATSHOME to ~/postiats, e.g., by adding the following line to your .bashrc:

export PATSHOME="~/postiats"

Optionally, put ~/postiats/bin on your PATH, e.g., by adding the following line to your .bashrc:

export PATH=$PATH:$PATSHOME/bin

If you want to create the atslib library, please do

make -C ccomp/atslib -f Makefile all

The created library file is ccomp/atslib/lib/libatslib.a. If you use it, please make sure that your library path is set properly.

What to try if the build of ATS/Postiats fails

Should the build fail at some point, it may be necessary to clean up:

cd $PATSHOME/src
make cleanall

Other utilities

atscc, sometimes called patscc in ATS/Potiats, is a wrapper utility to allow easier compilation of ATS source code than by using patsopt.

Here is more information on 'patscc':

http://www.ats-lang.org/RESOURCE/#ATS_utility

In order to compile ATS2 programs, you can now do
something like:

patscc -o test test.dats test_header.sats test_helper.dats

However, for a considerably large project, it is suggested to use 'patsopt' directly in a Makefile.

To build and use patscc, after building ATS/Postiats:

cd $PATSHOME/utils/atscc
make
cp patscc ../../bin/

Related

Wiki: Home

Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.