Installation

Install ATS 2 from Source Code

Before installing ATS 2, we need the latest version of ATS 1 first.

  1. Download ATS 0.2.10 from http://sourceforge.net/projects/ats-lang/files/

  2. Unzip it into a folder, e.g. ~/ats

  3. Setup environment variables

    export ATSHOME=~/ats
    export ATSHOMERELOC=ATS-0.2.10
    export PATH=$PATH:$ATSHOME/bin
    
  4. Configure

    Attention

    You may need to install autoconf package first

    cd ~/ats
    aclocal
    autoheader
    automake --force-missing --add-missing
    autoconf
    ./configure
    
  5. Make

    make all
    
  6. Make sure that all the binaries are under bin, and all the libraries are under ccomp/lib and ccomp/lib64.

Next, we are building ATS 2. CMake 2.8+ is recommended.

  1. Download source code from GitHub, https://github.com/githwxi/ATS-Postiats/archive/master.zip

  2. Unzip it into a folder, e.g. ~/ats2

  3. Setting up environment variables

    export ATSHOME=~/ats
    export ATSHOMERELOC=ATS-0.2.10
    export PATSHOME=~/ats2
    export PATH=$PATH:$ATSHOME/bin:$PATSHOME/bin
    
  4. Make

    cd ~/ats2/src/BUILD
    cmake ..
    make
    
    mkdir ~/ats2/bin
    cp patsopt ~/ats2/bin/
    

Next, build libraries and tools

  1. Generate source code from templates

    cd ~/ats2
    make -f codegen/Makefile_atslib
    make -f codegen/Makefile_atscntrib
    
  2. Make C Target Compiler and Libraries

    cd ~/ats2/ccomp
    make
    
  3. Make utilities

    cd ~/ats2/libatsyntax
    make
    
    cd ~/ats2/utils/atscc
    make
    cp patscc ~/ats2/bin/
    
    cd ~/ats2/utils/atsyntax
    make