-
Notifications
You must be signed in to change notification settings - Fork 10
/
cl-store-xml.noasd
69 lines (52 loc) · 2.23 KB
/
cl-store-xml.noasd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*-
;; See the file LICENCE for licence information.
;; THIS BACKEND IS DEPRECATED AND WILL NOT WORK.
(in-package #:cl-user)
(defpackage #:cl-store-xml.system
(:use #:cl #:asdf))
(in-package #:cl-store-xml.system)
(defclass non-required-file (cl-source-file) ()
(:documentation
"File containing implementation dependent code which may or may not be there."))
(defun lisp-system-shortname ()
#+mcl mcl #+lispworks :lispworks #+cmu :cmucl #+clisp :clisp #+sbcl :sbcl)
(defmethod component-pathname ((component non-required-file))
(let ((pathname (call-next-method))
(name (string-downcase (lisp-system-shortname))))
(merge-pathnames
(make-pathname :directory (list :relative name))
pathname)))
(defmethod perform ((op compile-op) (component non-required-file))
(when (probe-file (component-pathname component))
(call-next-method)))
(defmethod perform ((op load-op) (component non-required-file))
(when (probe-file (component-pathname component))
(call-next-method)))
(defmethod operation-done-p ((o operation) (c non-required-file))
(when (probe-file (component-pathname c))
(call-next-method)))
(defsystem cl-store-xml
:name "CL-STORE-XML"
:author "Sean Ross <sdr@jhb.ucs.co.za>"
:maintainer "Sean Ross <sdr@jhb.ucs.co.za>"
:description "Xml Backend for cl-store"
:version "0.2.9"
:licence "MIT"
:components ((:file "xml-package")
(:file "xml-backend" :depends-on ("xml-package"))
(:non-required-file "custom-xml" :depends-on ("xml-backend")))
:depends-on (:cl-store :xmls))
(defmethod perform :after ((o load-op) (c (eql (find-system :cl-store-xml))))
(provide 'cl-store-xml))
(defmethod perform ((op test-op) (sys (eql (find-system :cl-store-xml))))
(oos 'load-op :cl-store-xml-tests)
(oos 'test-op :cl-store-xml-tests))
(defsystem cl-store-xml-tests
:components ((:file "xml-tests"))
:depends-on (cl-store-tests cl-store-xml))
(defmethod perform ((op test-op)
(sys (eql (find-system :cl-store-xml-tests))))
(or (funcall (find-symbol "RUN-TESTS" "CL-STORE-TESTS")
(symbol-value (find-symbol "*XML-BACKEND*" "CL-STORE-XML")))
(error "Test-op Failed.")))
;; EOF