(declare (usual-integrations))
\f
-(let* ((scm-file (lambda (file) (string-append file ".scm")))
- (bin-file (lambda (file) (string-append file ".bin")))
+(let* ((sf-names (lambda (file) (sf/pathname-defaulting file #f #f)))
+ (scm-file (lambda (file) (receive (scm bin spec) (sf-names file) scm)))
+ (bin-file (lambda (file) (receive (scm bin spec) (sf-names file) bin)))
(bin-time (lambda (file) (file-modification-time (bin-file file))))
(sf-dependent
(lambda (environment)
(let ((reasons
(let ((source-time (bin-time source)))
(append
- (if (not (file-processed? source "scm" "bin"))
- (list (scm-file source))
- '())
+ (receive (scm bin spec) (sf-names source)
+ (if (file-modification-time<=? scm bin)
+ '()
+ (list scm)))
(map bin-file
(if source-time
(filter (lambda (dependency)
(begin
(fluid-let ((sf/default-syntax-table (->environment '(edwin))))
(sf-conditionally "string"))
- (load "string.bin" '(edwin string))))
+ (receive (scm bin spec) (sf/pathname-defaulting "string" #f #f)
+ scm spec
+ (load bin '(edwin string)))))
(if (lexical-unreferenceable? (->environment '(edwin class-constructor))
'class-descriptors)
(fluid-let ((sf/default-syntax-table (->environment '())))
(sf-conditionally files))
(for-each (lambda (file)
- (load (string-append file ".bin") package))
+ (receive (scm bin spec)
+ (sf/pathname-defaulting file #f #f)
+ scm spec
+ (load bin package)))
files))))
(sf-and-load '("macros") '(edwin macros))
(sf-and-load '("clsmac") '(edwin class-macros))
;; This is written as a macro so that the shift will be a constant
;; in the compiled code.
;; It does not work when cross-compiled!
- (let ((chars-per-word (bytes-per-object)))
+ (let ((chars-per-word (target-bytes-per-object)))
(case chars-per-word
((4) -2)
((8) -3)