From 8233a4e5f77b7099531aa4ac109d5bba0de511e1 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 16 Aug 2001 20:50:26 +0000 Subject: [PATCH] Eliminate use of ".glo" files; ".pkd" files have all the information needed. --- v7/src/cref/redpkg.scm | 13 ++++++----- v7/src/cref/toplev.scm | 51 ++---------------------------------------- 2 files changed, 9 insertions(+), 55 deletions(-) diff --git a/v7/src/cref/redpkg.scm b/v7/src/cref/redpkg.scm index 3cd14dd47..29c9924fe 100644 --- a/v7/src/cref/redpkg.scm +++ b/v7/src/cref/redpkg.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: redpkg.scm,v 1.14 2001/08/16 20:46:11 cph Exp $ +$Id: redpkg.scm,v 1.15 2001/08/16 20:50:26 cph Exp $ Copyright (c) 1988-2001 Massachusetts Institute of Technology @@ -48,10 +48,10 @@ USA. (begin (warn "Malformed package-description file:" pathname) - '()))) + #f))) (begin (warn "Can't find package-description file:" pathname) - '()))))) + #f))))) globals) model-pathname))))) @@ -408,9 +408,10 @@ USA. (error "Unknown package name:" name))))))) ;; GLOBALS is a list of the bindings supplied externally. (for-each (lambda (global) - (process-globals-info (cdr global) - (->namestring (car global)) - get-package)) + (if (cdr global) + (process-globals-info (cdr global) + (->namestring (car global)) + get-package))) globals) (for-each (lambda (package description) diff --git a/v7/src/cref/toplev.scm b/v7/src/cref/toplev.scm index 3c89ca84f..c4500bd17 100644 --- a/v7/src/cref/toplev.scm +++ b/v7/src/cref/toplev.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: toplev.scm,v 1.14 2001/08/15 02:59:58 cph Exp $ +$Id: toplev.scm,v 1.15 2001/08/16 20:46:15 cph Exp $ Copyright (c) 1988-2001 Massachusetts Institute of Technology @@ -50,14 +50,12 @@ USA. (generate/common (lambda (pathname pmodel changes?) (write-cref-unusual pathname pmodel changes?) - (write-globals pathname pmodel changes?) (write-external-descriptions pathname pmodel changes?)))) (define cref/generate-all (generate/common (lambda (pathname pmodel changes?) (write-cref pathname pmodel changes?) - (write-globals pathname pmodel changes?) (write-external-descriptions pathname pmodel changes?)))) (define (write-external-descriptions pathname pmodel changes?) @@ -75,49 +73,4 @@ USA. (if (or changes? (not (file-processed? pathname "pkg" "crf"))) (with-output-to-file (pathname-new-type pathname "crf") (lambda () - (format-packages-unusual pmodel))))) - -(define (write-globals pathname pmodel changes?) - (if (or changes? (not (file-processed? pathname "pkg" "glo"))) - (let ((package-bindings - (map (lambda (package) - (cons package - (list-transform-positive - (package/sorted-bindings package) - binding/source-binding))) - (pmodel/packages pmodel))) - (exports '())) - (for-each (lambda (entry) - (for-each (lambda (binding) - (for-each (lambda (link) - (set! exports - (cons (link/destination link) - exports)) - unspecific) - (binding/links binding))) - (cdr entry))) - package-bindings) - (for-each (lambda (binding) - (let ((package (binding/package binding))) - (let ((entry (assq package package-bindings))) - (if entry - (set-cdr! entry (cons binding (cdr entry))) - (begin - (set! package-bindings - (cons (list package binding) - package-bindings)) - unspecific))))) - exports) - (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 + (format-packages-unusual pmodel))))) \ No newline at end of file -- 2.25.1