6.1. Compilation under UNIX

[<<<] [>>>]

Compilation starts from the clean source package. You unzip it or gunzip untar it into the source directory. To be safe you can run

sh convert.sh

that converts all text files from Windows line feed convention to UNIX convention. If you have a tarball rather than a ZIP file then you may already have the correct line ending, but running the conversion does not hurt. Well, if you feel better by that you can run it many times. On the other hand if you uploaded the Windows source package you will not get along compiling the package without this conversion.

To compile the code you have to issue the command

./setup

This will run all the commands that are needed before compilation to generate the C source files from the “real” source files and also compiles the make files from their macro source. Finally it runs the compilation processes.

The program `setup.pl' started by the shell script `setup' is a huge Perl script that automates the compilation under UNIX and under Windows NT as well.

To install the compiled code the script `setup.pl' has to be started again, this time using the argument:

./setup –-install

Although its use may imply it does not install ScriptBasic. It “only” creates the file `install.sh' that you can run later any time

$ su
Password: **********
# ./install.sh

from the root account. It is recommended that you examine and understand the content of the script before executing it. It actually installs ScriptBasic, compiles the configuration information, stops the Eszter SB Application Engine and many other things.

I said >>“only” creates the file ...<< in double quotes, because it does many things before actually creating the file. It interactively asks you about the destination directories, installs an experimental installation of ScriptBasic locally to run some test programs, examines which modules were compiled fine and so on. It even tests the possible maximal value for the configuration key maxlevel that limits the maximal recursive function call level inside ScriptBasic. To do so it creates a configuration that does not limit the depth and runs a test program until it crashes. The test program in each level of depth opens a file and appends a single byte to the file. Finally the length of the file gives the maximal possible recursive function depth on your installation.


[<<<] [>>>]