This project is the old version of Standard ML of New Jersey that continues to support older systems (e.g., 32-bit machines). We will continue to fix bugs and make minor improvements while the main development branch matures. We will also backport additions to the SML/NJ Library and other components.
The preferred way to build the system is to follow the installation instructions for your platform. If, however, you want to compile the current source from GitHub, the following steps should usually work.
-
Start with a fresh clone of the repository (let
ROOT
be the root directory of the clone.% git clone git@github.com:smlnj/legacy.git $ROOT
-
Configure and install the corresponding release in the
$ROOT
:% cd $ROOT % config/install.sh
-
Use this compiler to recompile from sources
% cd base/system % ./cmb-make ../../bin/sml % ./makeml
The "
../bin/sml
" argument is optional; if omitted, then thesml
command in the user'sPATH
will be used. Once can also specify a different path to ansml
command, when appropriate.Also note that because of a flaw in the way that CM handles conditionals in CM files, it is necessary that the ml-yacc and ml-ulex commands be available in the
PATH
. If you do not have an installation of SML/NJ available, then use the following steps:% cd base/system % PATH=$PATH:$PWD/../../bin ./cmb-make ../../bin/sml % ./makeml
-
At this point, you can test the compiled code while in the
system
directory.% ./testml
-
To finish the build process, you have to install the new compiler heap image and rebuild the libraries.
% ./installml -clean % cd ../.. % config/install.sh
You should now have a version of the system in $ROOT/bin/sml
that
corresponds to the latest version of the source on GitHub.
If you subsequently pull changes from the repository, you can rebuild
starting at Step 3.
These instructions are for Unix-like systems (including macOS). We do not
have scripts (e.g., makeml
) to support this process on Windows.