ikarus --compile-dependencies seems to be working now.

This commit is contained in:
Abdulaziz Ghuloum 2008-02-18 22:05:29 -05:00
parent 8a809e2f58
commit 8564000d0d
3 changed files with 32 additions and 15 deletions

View File

@ -291,6 +291,14 @@
[else
(let ([x (read)])
(cons x (f (- n 1))))])))]
[(#\L) ;;; list of length > 255
(let ([n (read-int p)])
(let f ([n n])
(cond
[(< n 0) (read)]
[else
(let ([x (read)])
(cons x (f (- n 1))))])))]
[else
(die who "Unexpected char as a fasl object header" h)])))
(read))

View File

@ -30,20 +30,29 @@
(define (load-serialized-library filename sk)
;;; TODO: check file last-modified date
(let ([ikfasl (string-append filename ".ikfasl")])
(and (file-exists? ikfasl)
(let ([x
(let ([p (open-file-input-port ikfasl)])
(let ([x (fasl-read p)])
(close-input-port p)
x))])
(if (serialized-library? x)
(apply sk (serialized-library-contents x))
(begin
(printf
"WARNING: not using fasl file ~s because it was \
compiled with a different version of ikarus.\n"
ikfasl)
#f))))))
(cond
[(not (file-exists? ikfasl)) #f]
[(<= (file-ctime ikfasl) (file-ctime filename))
(printf
"WARNING: not using fasl file ~s because it is older \
than the source file ~s\n"
ikfasl
filename)
#f]
[else
(let ([x
(let ([p (open-file-input-port ikfasl)])
(let ([x (fasl-read p)])
(close-input-port p)
x))])
(if (serialized-library? x)
(apply sk (serialized-library-contents x))
(begin
(printf
"WARNING: not using fasl file ~s because it was \
compiled with a different version of ikarus.\n"
ikfasl)
#f)))])))
(define (do-serialize-library filename contents)
(let ([ikfasl (string-append filename ".ikfasl")])

View File

@ -1 +1 @@
1395
1396