mkrlisp.lsp 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. %
  2. % csl -z -orlisp.img mkrlisp.lsp -lrlisp.log
  3. %
  4. % where this job rebuilds RLISP etc etc from scratch
  5. %
  6. %
  7. % Build a CSL REDUCE "in core" as first stage of a bootstrap. To be
  8. % run starting from a cold-start CSL, i.e. with the -z option.
  9. %
  10. % Author: Anthony C. Hearn.
  11. % Modifications by Stanley L. Kameny and Arthur Norman
  12. (verbos 3)
  13. (rdf "$cslbase/compat.lsp")
  14. (rdf "$cslbase/extras.lsp")
  15. (rdf "$cslbase/compiler.lsp")
  16. (compile!-all)
  17. % Finally build fasl files for the compatibility code and the two
  18. % versions of the compiler.
  19. (faslout 'compat)
  20. (rdf "$cslbase/compat.lsp")
  21. (rdf "$cslbase/extras.lsp")
  22. (faslend)
  23. (faslout 'compiler)
  24. (rdf "$cslbase/compiler.lsp")
  25. (faslend)
  26. (faslout 'ccomp)
  27. (rdf "$cslbase/ccomp.lsp")
  28. (faslend)
  29. (setq !*comp t) % It's faster if we compile the boot file.
  30. % The curious arrangement of rds and oldchan!* is because the
  31. % source file ../src/boot.sl ends by doing an (rds oldchan!*), which
  32. % avoids it hitting the end of file, and probably fits PSL very well.
  33. % If that line were not there I could just go (rdf "$cslbase/../src/boot.sl")
  34. % and that would cope with the file closing as well.
  35. (rds (setq oldchan!* (rds nil)))
  36. (rds (setq xxx (open "../src/boot.sl" 'input)))
  37. (close xxx)
  38. (begin2)
  39. % "cslprolo.red" can contain thigs that are system dependent
  40. % but which HAVE to be loaded before "rlisp.red" is.
  41. rds(xxx := open("../src/cslprolo.red",'input));
  42. (close xxx)
  43. (begin2)
  44. rds(xxx := open("../src/module.red",'input));
  45. (close xxx)
  46. (begin2)
  47. rds(xxx := open("../src/rlisp.red",'input));
  48. (close xxx)
  49. (begin2)
  50. % "cslrend.red" contains CSL specific definitions of a few functions
  51. % required by Reduce, and can flag things as 'lose where that will help
  52. % performance by allowing versions of functions built into the CSL kernel
  53. % to remain active.
  54. rds(xxx := open("../src/cslrend.red",'input));
  55. (close xxx)
  56. (begin)
  57. symbolic;
  58. << initreduce();
  59. date!* := "RLISP";
  60. % I call mapstore() here to reset all counts to zero,
  61. % thereby making future statistics at least marginally meaningful!
  62. mapstore 4;
  63. !*savedef := nil;
  64. preserve('begin, "RLISP ...") >>;
  65. % end of build1.lsp