getconf.red 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. % getconf.red
  2. % Tony Hearn keeps his master configuration data in two DOS batch files.
  3. % This script extracts the information and puts it here where I want it!
  4. % To run this script you need a working REDUCE. If you were having to
  5. % build for the VERY first time and did not have an existing config.lsp
  6. % file you would need to transcribe the information from the batch files
  7. % mentioned here by hand. But once you have a REDUCE built you can select
  8. % the reduce build directory as current and go
  9. % r38 $srcdir/../util/getconf.red -D!@srcdir=$srcdir
  10. % to refresh $srcdir/../util/config.lsp from that top-level data.
  11. symbolic;
  12. fluid '(!@srcdir);
  13. symbolic procedure make_conf_file();
  14. begin
  15. scalar a, p1, p2, p3, w;
  16. princ "source directory = "; printc !@srcdir;
  17. a := open("$srcdir/../../../upackage.bat", 'input);
  18. p1 := nil;
  19. while atom p1 and p1 neq !$eof!$ do <<
  20. a := rds a; p1 := read(); a := rds a >>;
  21. p2 := w := nil;
  22. while w neq !$eof!$ do <<
  23. w := nil;
  24. while atom w and w neq !$eof!$ do <<
  25. a := rds a; w := read(); a := rds a >>;
  26. if not atom w then p2 := append(p2, w) >>;
  27. close a;
  28. a := open("$srcdir/../../../xpackage.bat", 'input);
  29. p3 := w := nil;
  30. while w neq !$eof!$ do <<
  31. w := nil;
  32. while atom w and w neq !$eof!$ do <<
  33. a := rds a; w := read(); a := rds a >>;
  34. if not atom w then p3 := append(p3, w) >>;
  35. close a;
  36. if filep "$srcdir/../../../getred.pl" then
  37. a := "$srcdir/../util/devconfig.lsp"
  38. else a := "$srcdir/../util/config.lsp";
  39. a := open(a, 'output);
  40. << a := wrs a; linelength 72;
  41. terpri();
  42. printc "% These are packages that get built into the base system that";
  43. printc "% is used to compile what follows...";
  44. terpri();
  45. prettyprint p1; terpri();
  46. terpri();
  47. printc "% The next set of modules are all built using a system that";
  48. printc "% has the above set available. The key issue here is that the";
  49. printc "% packages in this list of ""extensions"" can all be built";
  50. printc "% independently of each other.";
  51. terpri();
  52. % The v3tools module depends on the groebner code already being built, and so
  53. % it must appear late in the list. As I introduce this script the xpackage.bat
  54. % file may not reflect that so FUDGE it here.
  55. if memq('v3tools, p2) then
  56. p2 := append(delete('v3tools, p2), '(v3tools));
  57. prettyprint p2; terpri();
  58. terpri();
  59. printc "% Finally we have a list of all the test scripts that REDUCE";
  60. printc "% is shipped with.";
  61. % As a special HACK I will removbe gnuplot (if present) since at least as
  62. % of the time of working on this its level of interactivity causes the
  63. % profiling job to fail.
  64. r3 := delete('gnuplot, p3);
  65. terpri();
  66. prettyprint p3; terpri();
  67. terpri();
  68. printc "% End of configuration file";
  69. close wrs a >>
  70. end;
  71. make_conf_file();
  72. end;