Generating portable C code from ATS source

I will be releasing ATS2-0.1.12 shortly.

What is said in this message should be tried with ATS-0.1.12.

I use atscc2js as an example to illustrate how to generate a package
of C code from something written in ATS:

https://github.com/githwxi/ATS-Postiats-contrib/tree/master/projects/MEDIUM/CATS-parsemit/JavaScript

Atscc2js is a tool for compiling into JavaScript the C code generated from
ATS source.

Do:

cd ATS-Postiats-contrib/tree/master/projects/MEDIUM/CATS-parsemit/JavaScript
mkdir MYPORTDIR
make MYPORTDIR

Now you can find a Makefile plus many C files in ./MYPORTDIR.
Do the following to compile the C files:

cd ./MYPORTDIR
make PATSCC=gcc MYCCRULE=PORTABLE

At this point, one no longer needs ATS2. One only needs
ATS2-include, which is released together with ATS2. For instance,
I can install the latest version of ATS2-include, and then do the following
to compile atscc2js:

make PATSHOME=/tmp/ATS2-Postiats-include-0.1.12 PATSCC=gcc MYCCRULE=PORTABLE

More related information can be found here:

If one wants to release a package written in ATS, I suggest that a C
version is released as well.
One can simply include ATS2-include in the released C version, which is
under MIT/BSD license.

Cheers!