From 4301724b98cb2fc0dcf2d14fd0c5693705ec4572 Mon Sep 17 00:00:00 2001 From: AJ Rossini Date: Wed, 23 Dec 2009 08:41:34 +0100 Subject: [PATCH] migrate last of system definitions into cls.asd. We now need to be careful that any other system loader do similar CLS software system configuration Signed-off-by: AJ Rossini --- cls.asd | 45 +++++++++++++++++++++++++++++------------ src/basics/defsys.lsp | 56 --------------------------------------------------- src/packages.lisp | 22 +++++++++++++------- 3 files changed, 47 insertions(+), 76 deletions(-) delete mode 100644 src/basics/defsys.lsp diff --git a/cls.asd b/cls.asd index 7648315..1495dd2 100644 --- a/cls.asd +++ b/cls.asd @@ -1,5 +1,5 @@ ;; -*- mode: lisp -*- -;;; Time-stamp: <2009-12-20 22:30:50 tony> +;;; Time-stamp: <2009-12-23 08:40:18 tony> ;;; Created: <2005-05-30 17:09:47 blindglobe> ;;; File: cls.asd ;;; Author: AJ Rossini @@ -11,42 +11,62 @@ ;;; 'releases'. Our software 'escapes', leaving a bloody trail of ;;; designers and quality assurance people in its wake. +;; Load ASDF if it isn't loaded +#-asdf(load (pathname (concatenate 'string (namestring *cls-external-dir*) "asdf"))) + (in-package :cl-user) +;;; enforce all floating reads as doubles +;; (setf *read-default-float-format* 'double-float) + +;;; optimization settings +;; (proclaim '(optimize (safety 2) (space 3) (speed 3))) + (defpackage :lisp-stat-config + (:documentation "holds configuration variables, support functions, and ASDF structure.") (:use :common-lisp) - (:export *default-path* + (:export *common-lisp-stat-version* + *default-path* *lsos-files* *basic-files* *ls-files* *cls-home-dir* *cls-data-dir* *cls-examples-dir*)) (in-package :lisp-stat-config) + + +(defvar *common-lisp-stat-version* "1.0 Alpha 1") +(defvar *default-path* "./") + + (defparameter *cls-home-dir* (directory-namestring (truename (asdf:system-definition-pathname :cls))) "Value considered \"home\" for our data") +#| +(setf *cls-home-dir* + ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"w + ;; #p"/home/tony/sandbox/CommonLispStat.git/" + #p"/home/tony/sandbox/CLS.git/") +|# + (macrolet ((ls-dir (root-str) `(pathname (concatenate 'string (namestring *cls-home-dir*) ,root-str))) (ls-defdir (target-dir-var root-str) `(defvar ,target-dir-var (ls-dir ,root-str)))) - + (ls-defdir *cls-asdf-dir* "ASDF/") + (ls-defdir *cls-data-dir* "Data/") + (ls-defdir *cls-external-dir* "external/") ;; reminder of testing ;;(macroexpand '(ls-defdir *cls-asdf-dir* "ASDF")) ;;(macroexpand-1 '(ls-defdir *cls-asdf-dir* "ASDF")) ;;(macroexpand-1 '(ls-dir "ASDF")) - - (ls-defdir *cls-asdf-dir* "ASDF/") - (ls-defdir *cls-data-dir* "Data/") - (ls-defdir *cls-external-dir* "external/")) + ) ;;(pushnew *cls-asdf-dir* asdf:*central-registry*) - -;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft - -(in-package :cl-user) +;;(pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) ; eg for Microsoft (defpackage #:cls-system (:use :common-lisp :asdf)) @@ -123,8 +143,7 @@ :serial t :depends-on ("packaging" "proto-objects") :components - (;(:cls-lsp-source-file "defsys") ; XLS compat? - (:cls-lsp-source-file "lstypes") + ((:cls-lsp-source-file "lstypes") (:cls-lsp-source-file "lsfloat") (:cls-lsp-source-file "compound") diff --git a/src/basics/defsys.lsp b/src/basics/defsys.lsp deleted file mode 100644 index 2cddb63..0000000 --- a/src/basics/defsys.lsp +++ /dev/null @@ -1,56 +0,0 @@ -;;; -*- mode: lisp -*- - -;;; Time-stamp: <2009-12-13 18:08:35 tony> -;;; Creation: <2009-08-26 13:48:13 tony> -;;; File: defsys.lsp -;;; Author: AJ Rossini -;;; Copyright: (c)2009--, AJ Rossini. BSD license -;;; Purpose: basic settings for localization to for use. - -;;; What is this talk of 'release'? Klingons do not make software -;;; 'releases'. Our software 'escapes', leaving a bloody trail of -;;; designers and quality assurance people in its wake. - -;;; This organization and structure is new to the 21st Century -;;; version... Think, "21st Century Schizoid Man". - -(in-package :lisp-stat-config) - -;;; optimization settings -;; (proclaim '(optimize (safety 2) (space 3) (speed 3))) - -;;; enforce all floating reads as doubles -;; (setf *read-default-float-format* 'double-float) - -(defvar *common-lisp-stat-version* "1.0 Alpha 1") - -(defvar *default-path* "./") - -(defvar *cls-home-dir* #p"/usr/share/cls/" - "Value considered \"home\" for our data") - -(setf *cls-home-dir* - ;; #p"/cygdrive/c/local/sandbox/Lisp/CommonLispStat/"w - ;; #p"/home/tony/sandbox/CommonLispStat.git/" - #p"/home/tony/sandbox/CLS.git/") - -(defmacro ls-dir (root-str) - `(pathname (concatenate 'string (namestring *cls-home-dir*) ,root-str))) - -(defmacro ls-defdir (target-dir-var root-str) - `(defvar ,target-dir-var (ls-dir ,root-str))) - -;;(macroexpand '(ls-defdir *cls-asdf-dir* "ASDF")) -;;(macroexpand-1 '(ls-defdir *cls-asdf-dir* "ASDF")) -;;(macroexpand-1 '(ls-dir "ASDF")) - -(ls-defdir *cls-asdf-dir* "ASDF/") -(ls-defdir *cls-data-dir* "Data/") -(ls-defdir *cls-external-dir* "external/") -(ls-defdir *cls-examples-dir* "examples/") - -;; Load ASDF if it isn't loaded -#-asdf(load (pathname (concatenate 'string (namestring *cls-external-dir*) "asdf"))) - -;; (pushnew #p"C:/Lisp/libs/" asdf-util:*source-dirs* :test #'equal) -;;(pushnew *cls-asdf-dir* asdf:*central-registry*)) diff --git a/src/packages.lisp b/src/packages.lisp index c8c43a2..928f6e8 100644 --- a/src/packages.lisp +++ b/src/packages.lisp @@ -1,6 +1,6 @@ ;;; -*- mode: lisp -*- -;;; Time-stamp: <2009-12-22 22:38:17 tony> +;;; Time-stamp: <2009-12-23 08:33:58 tony> ;;; Creation: <2008-03-11 19:18:34 user> ;;; File: packages.lisp ;;; Author: AJ Rossini @@ -29,6 +29,11 @@ ;;; Basics +#| + + This is setup in cls.asd upon ASDF-style loading. For any other + system loader, we will need to ensure the same. + (defpackage :lisp-stat-config (:documentation "global settings and variables. Probably need a localization tool as well.") @@ -38,6 +43,8 @@ *cls-data-dir* *cls-home-dir* *cls-examples-dir*)) +|# + (defpackage :lisp-stat-object-system (:nicknames :ls-objects :lsos) (:use :common-lisp) @@ -501,18 +508,19 @@ l *cls-home-dir* *cls-data-dir* *cls-examples-dir* ;; optimize.lsp newtonmax nelmeadmax - ;; lispstat-macros + ;; package LISPSTAT-MACROS make-rv-function make-rv-function-1 - ;; xarray + ;; package XARRAY xref xtype xdims xdim xdims* - ;; listoflist + ;; package LISTOFLIST sublists-of-same-size-p equal-listoflist transpose-listoflist - ;; data - ;; need to take this list and make it strings... specs could mean - ;; that we process the strings in different ways? + ;; package DATA + ;; need to take this list and make it symbols... specs could mean + ;; that we process the strings in different ways? Create such a + ;; macro to enable export within this package? #| (let ((lst ())) (unlist -- 2.11.4.GIT