#| -*-Scheme-*-
-$Id: make.scm,v 1.18 1999/01/03 05:22:10 cph Exp $
+$Id: make.scm,v 1.19 2000/01/18 20:38:37 cph Exp $
-Copyright (c) 1988-1999 Massachusetts Institute of Technology
+Copyright (c) 1988-2000 Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
(pathname-as-directory "cref")
(lambda ()
(load-option 'RB-TREE)
- (package/system-loader "cref" '() false)))))
-(add-identification! "CREF" 1 18)
\ No newline at end of file
+ (package/system-loader "cref" '() #f)))))
+(add-identification! "CREF" 1 19)
\ No newline at end of file
#| -*-Scheme-*-
-$Id: redpkg.scm,v 1.11 1999/01/02 06:11:34 cph Exp $
+$Id: redpkg.scm,v 1.12 2000/01/18 20:38:41 cph Exp $
-Copyright (c) 1988-1999 Massachusetts Institute of Technology
+Copyright (c) 1988-2000 Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
"glo")))
(if (file-exists? pathname)
(let ((contents (fasload pathname)))
- (cond ((check-list contents symbol?)
- (list (cons '() contents)))
+ (cond ((and (pair? contents)
+ (pair? (car contents))
+ (eq? 'VERSION (caar contents))
+ (exact-nonnegative-integer?
+ (cdar contents)))
+ (if (not (= 2 (cdar contents)))
+ (error "Unknown globals-file version:"
+ (cdar contents)))
+ (cdr contents))
+ ((check-list contents symbol?)
+ (list (vector '() '() contents)))
((check-list contents
(lambda (element)
(and (pair? element)
(check-list (car element) symbol?)
(check-list (cdr element) symbol?))))
- contents)
+ (map (lambda (element)
+ (vector (car element)
+ '()
+ (cdr element)))
+ contents))
(else
(warn "Malformed globals file:" pathname)
'())))
(let ((namestring (->namestring (car global))))
(lambda (entry)
(for-each
- (let ((package (get-package (car entry) #t)))
+ (let ((package (get-package (vector-ref entry 0) #t)))
+ (let loop
+ ((package package)
+ (ancestors (vector-ref entry 1)))
+ (if (eq? 'UNKNOWN (package/parent package))
+ (if (pair? ancestors)
+ (let ((parent (get-package (car ancestors) #t)))
+ (set-package/parent! package parent)
+ (loop parent (cdr ancestors)))
+ (set-package/parent! package #f))))
(lambda (name)
(bind! package
name
(make-expression package namestring #f))))
- (cdr entry))))
+ (vector-ref entry 2))))
(cdr global)))
globals)
(for-each
#| -*-Scheme-*-
-$Id: toplev.scm,v 1.12 1999/01/02 06:11:34 cph Exp $
+$Id: toplev.scm,v 1.13 2000/01/18 20:39:42 cph Exp $
-Copyright (c) 1988-1999 Massachusetts Institute of Technology
+Copyright (c) 1988-2000 Massachusetts Institute of Technology
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
(with-output-to-file (pathname-new-type pathname "crf")
(lambda ()
(format-packages-unusual pmodel)))))
-
+\f
(define (write-globals pathname pmodel changes?)
(if (or changes? (not (file-processed? pathname "pkg" "glo")))
(let ((package-bindings
package-bindings))
unspecific)))))
exports)
- (fasdump (map (lambda (entry)
- (cons (package/name (car entry))
- (map binding/name (cdr entry))))
- package-bindings)
+ (fasdump (cons '(VERSION . 2)
+ (map (lambda (entry)
+ (vector (package/name (car entry))
+ (let loop ((package (car entry)))
+ (let ((parent
+ (package/parent package)))
+ (if parent
+ (cons (package/name parent)
+ (loop parent))
+ '())))
+ (map binding/name (cdr entry))))
+ package-bindings))
(pathname-new-type pathname "glo")))))
\ No newline at end of file