1(* 2 Copyright (c) 2000 3 Cambridge University Technical Services Limited 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License version 2.1 as published by the Free Software Foundation. 8 9 This library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with this library; if not, write to the Free Software 16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17*) 18 19(* Script to rebuild the compiler. *) 20(* This is used only during testing. The normal build process uses 21 BuildExport to export a newly compiled compiler and exportPoly 22 to compile the basis and produce an object file. *) 23 24PolyML.print_depth 0; 25 26PolyML.make "mlsource/MLCompiler"; 27 28(* Create the initial basis *) 29val globalTable : Make.gEnv = Make.makeGEnv (); 30val () = Initialise.initGlobalEnv {globalTable=globalTable, intIsArbitraryPrecision=false}; 31 32(* Compile the basis in the new compiler. *) 33MLCompiler.useIntoEnv globalTable [] "mlsource/BuildBasis.sml"; 34 35(* Use useString to start the new shell because it allows this 36 to be pasted into a window as a single item. Otherwise the 37 line to start the new shell will be in the buffer of the old 38 TextIO.stdIn not the one we've just built. *) 39MLCompiler.useStringIntoEnv globalTable "PolyML.rootFunction();"; 40 41