28 lines
824 B
Common Lisp
28 lines
824 B
Common Lisp
;;;; cl-scopes/config
|
|
|
|
;;;; Utilities for configuration of scopes services.
|
|
|
|
(defpackage :scopes/config
|
|
(:use :common-lisp)
|
|
(:export #:base #:make-system-path #:override-keys
|
|
#:config-path #:file-path
|
|
#:relative-path #:runtime-path #:system-path #:test-path))
|
|
|
|
(in-package :scopes/config)
|
|
|
|
(defun relative-path (name &rest dirs)
|
|
(make-pathname :name name :directory (cons :relative dirs)))
|
|
|
|
(defun system-path (sys name &rest dirs)
|
|
(asdf:system-relative-pathname sys (apply #'relative-path name dirs)))
|
|
|
|
(defun test-path (sys name)
|
|
(system-path sys name "test"))
|
|
|
|
(defun runtime-path (name &rest dirs)
|
|
(merge-pathnames (apply #'relative-path name dirs)))
|
|
|
|
(defclass base ()
|
|
((override-keys :reader override-keys
|
|
:initform nil
|
|
:allocation :class)))
|