2 |
* This is the module that actually puts together the contents of the |
* This is the module that actually puts together the contents of the |
3 |
* structure CM that people find at the top-level. A "minimal" structure |
* structure CM that people find at the top-level. A "minimal" structure |
4 |
* CM is defined in CmHook, but it needs to be initialized at bootstrap |
* CM is defined in CmHook, but it needs to be initialized at bootstrap |
5 |
* time -- and that is what's done here, too. |
* time. |
6 |
* |
* |
7 |
* Copyright (c) 1999 by Lucent Bell Laboratories |
* Copyright (c) 1999 by Lucent Bell Laboratories |
8 |
* |
* |
242 |
Parse.reset (); |
Parse.reset (); |
243 |
SmlInfo.reset ()) |
SmlInfo.reset ()) |
244 |
|
|
245 |
fun initTheValues (bootdir, er) = let |
fun initTheValues (bootdir, er, autoload_postprocess) = let |
246 |
val _ = let |
val _ = let |
247 |
fun listDir ds = let |
fun listDir ds = let |
248 |
fun loop l = |
fun loop l = |
338 |
[#statpid corePidInfo, |
[#statpid corePidInfo, |
339 |
#statpid pervPidInfo, |
#statpid pervPidInfo, |
340 |
#sympid pervPidInfo]) |
#sympid pervPidInfo]) |
341 |
|
fun bare_autoload x = |
342 |
|
(Say.say |
343 |
|
["!* ", x, |
344 |
|
": \"autoload\" not available, using \"make\"\n"]; |
345 |
|
make x) |
346 |
|
val bare_preload = |
347 |
|
Preload.preload { make = make, |
348 |
|
autoload = bare_autoload } |
349 |
|
val standard_preload = |
350 |
|
Preload.preload { make = make, autoload = autoload } |
351 |
in |
in |
352 |
Compile.reset (); |
Compile.reset (); |
353 |
Link.reset (); |
Link.reset (); |
361 |
pervcorepids = pervcorepids }; |
pervcorepids = pervcorepids }; |
362 |
case er of |
case er of |
363 |
BARE => |
BARE => |
364 |
(make "basis.cm"; |
(bare_preload BtNames.bare_preloads; |
365 |
make "host-compiler.cm"; |
system_values := emptydyn; |
366 |
system_values := emptydyn) |
NONE) |
367 |
| AUTOLOAD => |
| AUTOLOAD => |
368 |
(HostMachDepVC.Interact.installCompManager |
(HostMachDepVC.Interact.installCompManager |
369 |
(SOME al_manager'); |
(SOME al_manager'); |
370 |
autoload "basis.cm"; |
standard_preload BtNames.standard_preloads; |
|
autoload "minimal-cm.cm"; |
|
371 |
CmHook.init |
CmHook.init |
372 |
{ stabilize = stabilize, |
{ stabilize = stabilize, |
373 |
recomp = recomp, |
recomp = recomp, |
374 |
make = make, |
make = make, |
375 |
autoload = autoload }) |
autoload = autoload }; |
376 |
|
SOME (autoload_postprocess ())) |
377 |
end |
end |
378 |
end |
end |
379 |
end |
end |
380 |
in |
in |
381 |
fun init (bootdir, de, er) = |
fun init (bootdir, de, er) = let |
|
(system_values := de; |
|
|
initTheValues (bootdir, er); |
|
|
Cleanup.install initPaths) |
|
|
|
|
382 |
fun procCmdLine () = let |
fun procCmdLine () = let |
383 |
val autoload = ignore o autoload |
val autoload = ignore o autoload |
384 |
val make = ignore o make |
val make = ignore o make |
398 |
["@CMslave"] => (#set StdConfig.verbose false; slave ()) |
["@CMslave"] => (#set StdConfig.verbose false; slave ()) |
399 |
| l => ignore (foldl arg autoload l) |
| l => ignore (foldl arg autoload l) |
400 |
end |
end |
401 |
|
in |
402 |
|
system_values := de; |
403 |
|
initTheValues (bootdir, er, fn () => (Cleanup.install initPaths; |
404 |
|
procCmdLine)) |
405 |
|
end |
406 |
|
|
407 |
structure CM :> CM = struct |
structure CM :> CM = struct |
408 |
type 'a controller = { get : unit -> 'a, set : 'a -> unit } |
type 'a controller = { get : unit -> 'a, set : 'a -> unit } |