diff options
author | Guillaume LE VAILLANT <glv@posteo.net> | 2017-11-17 10:01:57 +0100 |
---|---|---|
committer | Guillaume LE VAILLANT <glv@posteo.net> | 2017-11-17 10:01:57 +0100 |
commit | 6f1264f29acf79ed70516948581df6a9a2e156e3 (patch) | |
tree | ca900b3bfe6aad36503d39208175785fcee60303 | |
parent | 6ad98f3c6c67ceef3cfb066fd875b3ffeb1b16f8 (diff) |
Simplify ASDF system definitions a little
-rw-r--r-- | ironclad.asd | 53 | ||||
-rw-r--r-- | testing/testfuns.lisp | 1 |
2 files changed, 25 insertions, 29 deletions
diff --git a/ironclad.asd b/ironclad.asd index f7af8ba..66d9048 100644 --- a/ironclad.asd +++ b/ironclad.asd @@ -1,6 +1,7 @@ ;;;; -*- mode: lisp; indent-tabs-mode: nil -*- + (cl:defpackage #:ironclad-system - (:use :cl)) + (:use :cl :asdf)) (cl:in-package #:ironclad-system) @@ -19,16 +20,17 @@ (set-dispatch-macro-character #\# #\@ #'array-reader readtable) readtable)) -(defclass ironclad-source-file (asdf:cl-source-file) ()) +(defclass ironclad-source-file (cl-source-file) ()) -(asdf:defsystem :ironclad +(defsystem "ironclad" :version "0.36" :author "Nathan Froyd <froydnj@gmail.com>" :maintainer "Guillaume LE VAILLANT <glv@posteo.net>" :description "A cryptographic toolkit written in pure Common Lisp" :license "BSD 3-Clause" :default-component-class ironclad-source-file - :depends-on (#+sbcl sb-rotate-byte #+sbcl sb-posix nibbles) + :depends-on (#+sbcl "sb-rotate-byte" #+sbcl "sb-posix" "nibbles") + :in-order-to ((test-op (test-op "ironclad/tests"))) :components ((:static-file "LICENSE") (:static-file "NEWS") (:static-file "README.org") @@ -187,40 +189,38 @@ ;; anyway... #+sbcl (sb-ext:compiler-note #'muffle-warning)) ,@body))) -(defmethod asdf:perform :around ((op asdf:compile-op) (c ironclad-source-file)) - (let ((*readtable* *ironclad-readtable*) - (*print-base* 10) ; INTERN'ing FORMAT'd symbols - (*print-case* :upcase) - #+sbcl (sb-ext:*inline-expansion-limit* (max sb-ext:*inline-expansion-limit* 1000)) - #+cmu (ext:*inline-expansion-limit* (max ext:*inline-expansion-limit* 1000)) - (*features* (append (ironclad-implementation-features) *features*))) - (do-silently (call-next-method)))) + (defmethod perform :around ((op compile-op) (c ironclad-source-file)) + (let ((*readtable* *ironclad-readtable*) + (*print-base* 10) ; INTERN'ing FORMAT'd symbols + (*print-case* :upcase) + #+sbcl (sb-ext:*inline-expansion-limit* (max sb-ext:*inline-expansion-limit* 1000)) + #+cmu (ext:*inline-expansion-limit* (max ext:*inline-expansion-limit* 1000)) + (*features* (append (ironclad-implementation-features) *features*))) + (do-silently (call-next-method)))) -(defmethod asdf:perform :around ((op asdf:load-op) (c ironclad-source-file)) - (do-silently (call-next-method)))) + (defmethod perform :around ((op load-op) (c ironclad-source-file)) + (do-silently (call-next-method)))) -(defmethod asdf:perform :after ((op asdf:load-op) - (c (eql (asdf:find-system :ironclad)))) +(defmethod perform :after ((op load-op) (c (eql (find-system "ironclad")))) (provide :ironclad)) ;;; testing -(defclass test-vector-file (asdf:static-file) +(defclass test-vector-file (static-file) ((type :initform "testvec"))) (defpackage :ironclad-tests (:nicknames :crypto-tests) (:use :cl)) -(defmethod asdf:perform ((op asdf:test-op) - (c (eql (asdf:find-system :ironclad)))) - (asdf:oos 'asdf:test-op 'ironclad/tests)) - -(asdf:defsystem ironclad/tests - :depends-on (ironclad) +(defsystem "ironclad/tests" + :depends-on ("ironclad") :version "0.36" - :in-order-to ((asdf:test-op (asdf:load-op :ironclad/tests))) + :in-order-to ((test-op (load-op "ironclad/tests"))) + :perform (test-op (o s) + (or (funcall (intern "DO-TESTS" (find-package "RTEST"))) + (error "TEST-OP failed for IRONCLAD/TESTS"))) :components ((:module "testing" :components ((:file "rt") (:file "testfuns" :depends-on ("rt")) @@ -350,8 +350,3 @@ (:test-vector-file "elgamal-sig") (:test-vector-file "rsa-enc") (:test-vector-file "rsa-sig"))))))) - -(defmethod asdf:perform ((op asdf:test-op) - (c (eql (asdf:find-system :ironclad/tests)))) - (or (funcall (intern "DO-TESTS" (find-package "RTEST"))) - (error "TEST-OP failed for IRONCLAD/TESTS"))) diff --git a/testing/testfuns.lisp b/testing/testfuns.lisp index 41fe95e..9babd4f 100644 --- a/testing/testfuns.lisp +++ b/testing/testfuns.lisp @@ -291,6 +291,7 @@ (result1 (progn (crypto:update-mac mac data) (crypto:produce-mac mac)))) + (declare (ignorable result1)) (reinitialize-instance mac :key key) (let ((result2 (progn (crypto:update-mac mac data) |