These instructions are provided for those that need to recompile the runtime system, the SML/NJ compiler, or the other tools provided with the SML/NJ distribution.
You will need to install the SML/NJ executables from the self-installing executable provided in the distribution. This is necessary to install some of the required batch files to invoke the compiler.To unpack the distribution, you will need the Windows versions of the "GNU unzip" (gunzip) and "tape archive" (tar). These are freely available from ftp.cs.washington.edu:/pub/ntemacs/utilities.
Compiling the runtime system requires the following tools:
- MS Visual C++, 2.0 or later
- MS Assembler (MASM), 6.11 or later
- MS NMAKE (part of VC++), 1.50 or later
It should be straightforward to build with other compilers, assemblers, and "make" utilities (see src\runtime\objs\makefile.win32 and src\runtime\objs\mk.x86-win32).
Compiling the SML compiler source requires ksh and common Unix tools (sed, grep). We use MKS Toolkit for this, although other ksh based toolkits should work directly as well; e.g. UWIN.
- Determine the root directory for the SML/NJ installation on your system, and make it your current directory. For the purpose of exposition, we will assume the default directory, C:\SML.
- Download the runtime system sources and the SML/NJ compiler sources:
You may also wish to fetch some of the following optional components of the SML/NJ distribution:
110-runtime.tar.Z 110-sml-nj.tar.Z
110-cm.tar.Z Compilation Manager 110-smlnj-lib.tar.Z Standard ML of New Jersey Library 110-ml-burg.tar.Z ML-Burg code-generator generator 110-ml-lex.tar.Z ML-Lex lexical analyzer generator 110-ml-yacc.tar.Z ML-Yacc parser generator - Uncompress and unbundle each of the distribution files:
C:\SML\> gunzip 110-runtime.tar.Z C:\SML\> tar -xvf 110-runtime.tar- Change to the SRC\SML-NJ directory
C:\SML\> ch src\sml-nj- Download the SML/NJ compiler binaries:
110-bin.x86-win32.tar.Z - Uncompress and unbundle the binaries:
C:\SML\SRC\SML-NJ\> gunzip 110-bin.x86-win32.tar.Z C:\SML\SRC\SML-NJ\> tar -xvf 110-bin.x86-win32.tar
- Ensure that the compiler, assembler, and "make" utility are in your path.
- Compile the runtime by issuing
nmake /f mk.x86-win32in SML/NJ's src\runtime\objs directory. This will create run.x86-win32.exe which is usually placed in the smlnj\bin\.run directory.
Set the working directory to src\sml-nj and, from a ksh prompt, issue the command:xmakeml -boot bin.x86-win32This will produce the image sml.x86-win32 which is usually placed in bin\.heap
SML/NJ tools are built analogously to the Unix versions. That is, the commandbuildis issued in the respective tool directory. Note that SML/NJ's bin directory must be in the path for the default build command to find the compiler and tools.