+++ /dev/null
-#| -*-Scheme-*-
-
-Copyright (C) 2013 Matthew Birkholz
-
-This file is part of an extension to MIT/GNU Scheme.
-
-MIT/GNU Scheme is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at
-your option) any later version.
-
-MIT/GNU Scheme is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with MIT/GNU Scheme; if not, write to the Free Software
-Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,
-USA.
-
-|#
-
-;;;; Compile a 3D Planetarium.
-
-(load-option 'CREF)
-(load-option 'SOS)
-(load-option 'GTK)
-(load-option 'GL)
-
-(with-working-directory-pathname (directory-pathname (current-load-pathname))
- (lambda ()
- (define (load-compiled file deps pkg-name)
- (let ((env (->environment pkg-name)))
- (compile-file file deps env)
- (load file env)))
-
- (load "mit-compile")
-
- (let ((package-set (package-set-pathname "mit-3d")))
- (if (not (file-modification-time<? "mit-3d.pkg" package-set))
- (cref/generate-trivial-constructor "mit-3d"))
- (construct-packages-from-file (fasload package-set)))
-
- (fluid-let ((compile-file:sf-only? #f))
- (load-compiled "terrain" '("geometry") '(planetarium terrain))
- ((access test-normals (->environment '(planetarium terrain))))
- (load-compiled "google-earth" '() '(planetarium google-earth)))
-
- (cref/generate-constructors "mit-3d")))
\ No newline at end of file
|#
(load-option 'CREF)
+(load-option 'SOS)
(load-option 'GTK)
(with-working-directory-pathname (directory-pathname (current-load-pathname))
(lambda ()
- (define (load-compiled file deps pkg-name)
- (let ((env (->environment pkg-name)))
- (compile-file file deps env)
- (load file env)))
+ (define (cf files deps pkg-name)
+ (if (pair? files)
+ (for-each (lambda (f) (compile-file f deps (->environment pkg-name)))
+ files)
+ (compile-file files deps (->environment pkg-name))))
+ (define (lf file pkg-name)
+ (load file (->environment pkg-name)))
(if (name->package '(PLANETARIUM))
(error "The PLANETARIUM package already exists.")
(cref/generate-trivial-constructor "mit"))
(construct-packages-from-file (fasload package-set))))
- (load-compiled "mit-r3rs" '() '(r3rs extras))
- (load-compiled "mit-syntax" '() '(planetarium syntax))
- (for-each (lambda (file) (load-compiled file '() '(planetarium)))
- '("geometry" "matrices" "time" "graphics" "solar" "geometry"))
- ((access test-angular-separation (->environment '(planetarium))))
- (load-compiled "earth" '("geometry" "matrices") '(planetarium))
- (load-compiled "tellurion" '("geometry" "matrices") '(planetarium))
- (load-compiled "mit-gtk" '() '(planetarium gtk-graphics))
- (load-compiled "mit-x" '() '(planetarium x-graphics))
- (load-compiled "mit-graphics" '() '(planetarium simple-graphics))
- (load-compiled "mit-cil"
- `("mit-syntax" ,@(directory-read "cil-*.txt"))
- '(planetarium earth-cil))
- (cref/generate-constructors "mit")))
\ No newline at end of file
+ (cf "mit-r3rs" '() '(r3rs extras))
+ (lf "mit-r3rs" '(r3rs extras))
+ (cf "mit-syntax" '() '(planetarium syntax))
+ (lf "mit-syntax" '(planetarium syntax))
+ (cf '("geometry" "matrices" "time" "graphics"
+ "solar") '() '(planetarium))
+ (cf '("earth" "tellurion")
+ '("geometry" "matrices") '(planetarium))
+ (cf "mit-gtk" '() '(planetarium gtk-graphics))
+ (cf "mit-x" '() '(planetarium x-graphics))
+ (cf "mit-graphics" '() '(planetarium simple-graphics))
+ (cf "mit-cil" `("mit-syntax" ,@(directory-read "cil-*.txt"))
+ '(planetarium earth-cil))
+
+ (cref/generate-constructors "mit")
+
+ (if (not (warn-errors? (lambda () (load-option 'GL))))
+ (begin
+ (let ((package-set (package-set-pathname "mit-3d")))
+ (if (not (file-modification-time<? "mit-3d.pkg" package-set))
+ (cref/generate-trivial-constructor "mit-3d"))
+ (construct-packages-from-file (fasload package-set)))
+
+ (cf "terrain" '("geometry") '(planetarium terrain))
+ (cf "google-earth" '() '(planetarium google-earth))
+
+ (cref/generate-constructors "mit-3d")))))
\ No newline at end of file