[fixed compile script atsmyles@earthlink.net**20081112224217 Changed compile script to manually compile the r6rs.o1 library rather than using the compile-file from gambit. This uses much less memory than the previous approach ] hunk ./compile 3 -(load "/usr/lib/syntax-case") +(load "~~/syntax-case") hunk ./compile 43 + (define (compile-r6rs-base . files) + (let* [(filenames (map path-strip-extension (map path-strip-directory files))) + (link-file (string-append core-library-name ".o1.c")) + (object-file (string-append core-library-name ".o1")) + (gcc (string-append "gcc -bundle -D___DYNAMIC -I" + (path-expand "~~/include") + " " (apply string-append (map (lambda (file) (string-append " " file ".c")) filenames)) + " " link-file + " -o " (path-expand object-file result-path)))] + (for-each (lambda (file) + (display* "creating c file: " file "\n") + (compile-file-to-c file options: '(debug) output: tmp-dir)) files) + (parameterize [(current-directory tmp-dir)] + (link-flat filenames output: link-file) + (display* "executing command: " gcc) + (shell-command gcc)))) + hunk ./compile 71 - (base-file (path-expand "base.exp" tmp-dir)) - (expander-file (path-expand "expander.exp" tmp-dir)) + (base-file (path-expand "base.scm" tmp-dir)) + (expander-file (path-expand "expander.scm" tmp-dir)) hunk ./compile 83 - (shell-command (string-append "cat " - (path-expand "err5rs-records-inspection.scm") " " - (path-expand "err5rs-records-procedural.scm") " " - (path-expand "error.scm") " " - (path-expand "compat-gambit.scm") " " - (path-expand "runtime.scm") " " - base-file " " - expander-file " " - (path-expand "primitives.scm") " " - "> " result-file)) + (compile-r6rs-base + (path-expand "err5rs-records-inspection.scm") + (path-expand "err5rs-records-procedural.scm") + (path-expand "error.scm") + (path-expand "compat-gambit.scm") + (path-expand "runtime.scm") + base-file + expander-file + (path-expand "primitives.scm")) hunk ./compile 93 - (display* "compiling core") - (compile-file result-file options: '(debug) output: (path-expand (string-append core-library-name ".o1") result-path)) +; (shell-command (string-append "cat " +; (path-expand "err5rs-records-inspection.scm") " " +; (path-expand "err5rs-records-procedural.scm") " " +; (path-expand "error.scm") " " +; (path-expand "compat-gambit.scm") " " +; (path-expand "runtime.scm") " " +; base-file " " +; expander-file " " +; (path-expand "primitives.scm") " " +; "> " result-file)) +; +; (display* "compiling core") +; (compile-file result-file options: '(debug) output: (path-expand (string-append core-library-name ".o1") result-path))