
			    Luban Build and Install Guide

                Copyright (C) 2005 by Xiaochuan(Peter) Huang
	
			    All rights reserved.

    Luban programming language package is free software; you can redistribute it and/or modify
    it under the terms of the "Luban License" which comes with this package.

    Luban is a scripting language with a component and composition model. It is simple and intuitive for
    scripting purpose, while its component model will help you manage and share your code when
    your luban code base grows.


Common requirements for building Luban package
1) gcc version 3.0 and up
   Lower version of gcc would build, but the result Luban package will be thread unsafe
   And the threading feature of Luban will be unuseable.
2) POSIX pthread library
You only need below two if you wish to modify Luban grammar and syntax
3) bison grammar parser v1.85 and up
4) flex the lexical parser


Installation Instructions For Linux and UNIX alike:

0) Requirements for building Luban package
	i. gcc version 3.0 and up
           Lower version of gcc would build, but the result Luban package will be thread unsafe
	   And the threading feature of Luban will be unuseable.
	ii. bison the grammar parser v1.85 and up
	iii. flex the lexical parser
	iv. you can modify the Luban build process to make it build
            on other UNIX system other than Linux, as far as
		- libc is thread safe (check your OS)
		- pthread available
		- STL used by compiler is thread safe

1) Download, unzip and untar the Luban package.

2) Change into the untared Luban directory and run "lbnbuild"
   This will build all necessary executable and libraries

3) If you have root user privilege, change to root and run "lbninstall"
   This will install "luban" executable into /usr/bin
   and all libraries into /usr/lib,
   all header files into /usr/lib/luban/include
   all other files including import type list to /usr/lib/luban

4) If you do not have root access, you can install Luban into any directory,
   for example /home/mydir/myluban, by typing "lbninstall /home/mydir/myluban"
   This will install "luban" executable into /home/mydir/myluban/bin
   and all libraries into /home/mydir/myluban/lib
   all header files into /home/mydir/myluban/include
   all other files including import type list to /home/mydir/myluban

5) After installation, you can start Luban by typing "luban -i"
   If you install Luban as decribed in above step 4, you also need to do the following
   before starting Luban:
	a.) Make sure "luban" executable is reachable in your "PATH"
            in our example add "/home/mydir/myluban/bin" to your PATH env variable
	b.) Add the directory of Luban libraries to your LD_LIBRARY_PATH
            in our example append "/home/mydir/myluban/lib" to LD_LIBRARY_PATH
	c.) set env variable LUBAN_HOME to the directory you install luban
            in our example, LUBAN_HOME=/home/mydir/myluban
   Without above a) and/or b) luban won't start, without c) luban will start
   but some standard utility data types and structure will be missing



Installation Instructions For Cygwin on WIN32 (NT, 2000 and XP ):

1) Download, unzip and untar the Luban package.

2) Change into the untared Luban directory and run "./lbnbuild.cygwin"
   This will build all necessary executable and libraries

3) If you have root user privilege, change to root and run "./lbninstall.cygwin"
   This will install "luban" executable into /usr/bin
   and all libraries into /usr/bin,
   all header files into /usr/lib/luban/include
   all other files including import type list to /usr/lib/luban

4) If you wish to install Luban into a specific directory,
   for example /home/mydir/myluban, by typing "./lbninstall.cygwin /home/mydir/myluban"
   This will install "luban" executable into /home/mydir/myluban/bin
   and all libraries into /home/mydir/myluban/lib
   all header files into /home/mydir/myluban/include
   all other files including import type list to /home/mydir/myluban

5) After installation, you can start Luban by typing "luban -i"
   If you happen to install Luban as decribed in above step 4, you also need to do the following
   before starting Luban:
	a.) Make sure "luban" executable is reachable in your "PATH"
            in our example add "/home/mydir/myluban/bin" to your PATH env variable
	b.) Add the directory of Luban libraries to your PATH too
            in our example append "/home/mydir/myluban/lib" to PATH
	c.) set env variable LUBAN_HOME to the directory you install luban
            in our example, LUBAN_HOME=/home/mydir/myluban
   Without above a) and/or b) luban won't start, without c) luban will start
   but some standard utility data types and structure will be missing


6) Programming details regarding Luban language can be found in "lubandoc.txt"
   inside this package.


Enjoy
