home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume10 / comobj.lisp / part01 / co-defsys.l next >
Lisp/Scheme  |  1987-07-30  |  4KB  |  128 lines

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;
  3. ; File:         co-defsys.l
  4. ; RCS:          $Revision: 1.1 $
  5. ; SCCS:         %A% %G% %U%
  6. ; Description:  System Definition for CommonObjects
  7. ; Author:       James Kempf, HP/DCC
  8. ; Created:      11-Mar-87
  9. ; Modified:     11-Mar-87 22:08:34 (James Kempf)
  10. ; Language:     Lisp
  11. ; Package:      COMMON-OBJECTS
  12. ; Status:       Distribution
  13. ;
  14. ; (c) Copyright 1987, HP Labs, all rights reserved.
  15. ;
  16. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  17. ;
  18. ; Copyright (c) 1987 Hewlett-Packard Corporation. All rights reserved.
  19. ;
  20. ; Use and copying of this software and preparation of derivative works based
  21. ; upon this software are permitted.  Any distribution of this software or
  22. ; derivative works must comply with all applicable United States export
  23. ; control laws.
  24. ; This software is made available AS IS, and Hewlett-Packard Corporation makes
  25. ; no warranty about the software, its performance or its conformity to any
  26. ; specification.
  27. ;
  28. ; Suggestions, comments and requests for improvement may be mailed to
  29. ; aiws@hplabs.HP.COM
  30.  
  31. ;;;-*-Mode:LISP; Package:(PCL LISP 1000); Base:10; Syntax:Common-lisp -*-
  32. ;;;
  33. ;;; *************************************************************************
  34. ;;; Copyright (c) 1985, 1986, 1987 Xerox Corporation.  All rights reserved.
  35. ;;;
  36. ;;; Use and copying of this software and preparation of derivative works
  37. ;;; based upon this software are permitted.  Any distribution of this
  38. ;;; software or derivative works must comply with all applicable United
  39. ;;; States export control laws.
  40. ;;; 
  41. ;;; This software is made available AS IS, and Xerox Corporation makes no
  42. ;;; warranty about the software, its performance or its conformity to any
  43. ;;; specification.
  44. ;;; 
  45. ;;; Any person obtaining a copy of this software is requested to send their
  46. ;;; name and post office or electronic mail address to:
  47. ;;;   CommonLoops Coordinator
  48. ;;;   Xerox Artifical Intelligence Systems
  49. ;;;   2400 Hanover St.
  50. ;;;   Palo Alto, CA 94303
  51. ;;; (or send Arpanet mail to CommonLoops-Coordinator.pa@Xerox.arpa)
  52. ;;;
  53. ;;; Suggestions, comments and requests for improvements are also welcome.
  54. ;;; *************************************************************************
  55. ;;;
  56.  
  57. (provide "co-defsys")
  58.  
  59. (in-package 'common-objects :nicknames '(co) :use '(lisp pcl walker))
  60.  
  61. (export '(compile-co 
  62.       load-co
  63.       run-tests
  64.     ))
  65.     
  66. (require "pcl")           ;  Portable CommonLoops
  67.  
  68. (defvar *co-system-date* "3/10/87")
  69.  
  70. (defvar *co-pathname-defaults*
  71.         (pathname "/net/hplfs2/users/kempf/public/cool/")
  72.     
  73. )
  74.  
  75. (defvar *co-files*
  76.   (let ((xxx-low (or #+KCL       'kcl-low  ; placeholder
  77.              #+HP        'hp-low
  78.              nil)))
  79.     ;; file         load           compile         files which force
  80.     ;;              environment    environment     recompilations of
  81.     ;;                                             this file
  82.     `(
  83.       (pcl-patches  nil             nil            nil)
  84.       (co-macros    t               (pcl-patches
  85.                     (co-macros :source))  (pcl-patches))
  86.       (co-dmeth     t               (co-macros
  87.                      pcl-patches)
  88.                                                (co-macros pcl-patches))
  89.       (co-meta      t               (co-macros
  90.                      pcl-patches
  91.                     (co-meta :source))
  92.                            (co-macros pcl-patches))
  93.       (co-dtype     t               (co-macros
  94.                      pcl-patches)  (co-macros pcl-patches))
  95.       (co-sfun      t               (co-macros
  96.                      pcl-patches)  (co-macros))
  97.     )))
  98.  
  99. (defmacro wrong-pcl-version? () 
  100.   '(not (string-equal "2/24/87" pcl::*pcl-system-date*)))
  101.  
  102. (defmacro error-wrong-pcl ()
  103.   '(error 
  104. "This version of CommonObjects will only run with
  105. Portable CommonLoops Version 'System Date 2/24/87'.
  106. This version of PCL may be obtained by sending mail
  107. to commonobjects-request@hplabs.hp.com"))
  108.  
  109. (defun load-co (&optional (sources-p nil))
  110.   (when (wrong-pcl-version?) (error-wrong-pcl))
  111.   (pcl::load-system
  112.     (if sources-p :sources :load) *co-files* *co-pathname-defaults*)
  113.   (provide "co"))
  114.  
  115. (defun compile-co (&optional (force-p nil))
  116.   (when (wrong-pcl-version?) (error-wrong-pcl))
  117.   (pcl::load-system 
  118.       (if force-p ':force ':compile) *co-files* *co-pathname-defaults*))
  119.  
  120. (defun run-tests ()
  121.   (load "co-test.l")
  122.   (load "co-regress.l")
  123. )
  124.  
  125. ;;; end of co-defsys.l ;;;;;
  126.  
  127.