Installation guidelines
=======================

======================================================================
TESTING AN INSTALLATION PROCEDURE IS HARD, AND RARELY DONE RIGHT AT
THE FIRST TRY. IF YOU EXPERIENCE INSTALLATION TROUBLES, PLEASE REPORT
THEM, TO AVOID THEM TO FUTURE USERS. mailto:metalua@gmail.com
======================================================================

Prerequisites
-------------
- under MS-Windows, ability to type a couple of commands in a DOS command window
- under POSIX OSes, lua and luac executables in your path, in versions >=5.1

MS-Windows
----------

- get the sources
- cd metalua\src
- edit make.bat to set your variables:
  * DISTRIB_BIN: where you want to put executables metalua.bat, lua.exe, luac.exe.
    This directory should be referenced in your PATH environment variable.
  * DISTRIB_LIB: where you want to put your Lua libraries. It shouldn't mess up
    an existing Lua libraries directory. This folder should be referrenced in your
    LUA_PATH environment variable.
- run make.bat

Unix
----

- get the sources
- cd metalua/src
- set these variables or modify them in make.sh:
  * BUILD: a directory in which metalua should be built. Must be writable by the user.
  * INSTALL_BIN: where metalua will be copied
  * INSTALL_LIB: where (meta)lua libs will be copied. Should be referenced in your LUA_PATH.
- run ./make.sh, under your UID
- a ./make-install.sh script should have been generated, run it. If you want to isntall it
  in a directory that doesn't belong to you, you might want to run it as root.

Test drive
----------
There are some samples in metalua/src/samples, which can be run simply by
typing in the shell `metalua samplename.mlua`. Use `metalua -h` to
have an overview of interesting options. Among them, "-a" dumps the
AST resulting from a compilation: that's the perfect learning tool for
practical-oriented minds.

Once you've played with the samples, and maybe written a couple of
simple programs, I'm afraid the next step will be to RTFM :) 

