The file that ends up in /usr/local/bin/mlton, and also gets put in ???/bin/mlton is made by ???/src/Makefile from ???/src/bin/mlton. Here ??? is the directory where you put the MLton sources. The only thing that the Makefile changes from ???/src/bin/mlton is to set the definition of ROOT.