Generate correct constructor when there are no exports.
authorChris Hanson <org/chris-hanson/cph>
Tue, 18 Jan 2000 20:43:28 +0000 (20:43 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 18 Jan 2000 20:43:28 +0000 (20:43 +0000)
v7/src/cref/conpkg.scm

index 5c2701656bcb8372a3960d8c380e0a18e1e4ec36..fdedf1b16bff2b9896c9cf571a0bd8e6ef5b2397 100644 (file)
@@ -1,8 +1,8 @@
 #| -*-Scheme-*-
 
-$Id: conpkg.scm,v 1.6 1999/01/02 06:11:34 cph Exp $
+$Id: conpkg.scm,v 1.7 2000/01/18 20:43:28 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
@@ -33,14 +33,18 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     ;; #F, () or the system-global-environment changes.
     `((DECLARE (USUAL-INTEGRATIONS SYSTEM-GLOBAL-ENVIRONMENT))
       ,@(append-map*
-        `((LET ((ENVIRONMENT-LINK-NAME
-                 (LET-SYNTAX
-                     ((UCODE-PRIMITIVE
-                       (MACRO (NAME) (MAKE-PRIMITIVE-PROCEDURE NAME))))
-                   (UCODE-PRIMITIVE ENVIRONMENT-LINK-NAME))))
-            ,@(append-map*
-               (append-map construct-links (pmodel/extra-packages pmodel))
-               construct-links packages)))
+        (let ((links
+               (append-map*
+                (append-map construct-links (pmodel/extra-packages pmodel))
+                construct-links packages)))
+          (if (pair? links)
+              `((LET ((ENVIRONMENT-LINK-NAME
+                       (LET-SYNTAX
+                           ((UCODE-PRIMITIVE
+                             (MACRO (NAME) (MAKE-PRIMITIVE-PROCEDURE NAME))))
+                         (UCODE-PRIMITIVE ENVIRONMENT-LINK-NAME))))
+                  ,@links))
+              '()))
         construct-definitions
         (sort packages package-structure<?)))))