build.lisp 1.29 KB
Newer Older
1 2
(in-package :asdf-tools)

3
(deftestcmd build-asdf ()
4
  "make sure asdf.lisp is built"
5
  (load-system :asdf))
6 7

;;; Documentation
8
(deftestcmd doc ()
9
  "build documentation in doc/ directory"
10
  (with-failure-context (:name "in doc/ directory")
11
    (run* '(make) :directory (pn "doc/"))))
12

13
(deftestcmd website ()
14
  "publish documentation onto the public website"
15
  (with-failure-context (:name "in doc/ directory")
16
    (run* '(make website) :directory (pn "doc/"))))
17 18 19


;;; Line counting
20
(deftestcmd wc ()
21
  "count lines of lisp code in asdf and uiop"
22
  (with-asdf-dir ()
23 24 25
    (flet ((lisp-only (x) (remove "lisp" x :test-not 'equal :key 'pathname-type)))
      (let ((driver-files (mapcar #'(lambda (x) (subpathname "uiop/" x)) (lisp-only (uiop-files))))
            (defsystem-files (lisp-only (asdf-defsystem-files))))
26
        (run* `(pipe (wc ,@driver-files) (sort -n)))
27
        (terpri)
28
        (run* `(pipe (wc header.lisp ,@defsystem-files) (sort -n)))
29
        (terpri)
30
        (run* `(pipe (wc header.lisp ,@driver-files ,@defsystem-files) (tail -n 1)))))))
31 32 33


;;; debug the source registry that is being used to execute these tools.
34
(deftestcmd list-source-registry ()
35 36
  "Display the source-registry cache"
  (writeln (sort (alexandria:hash-table-alist asdf::*source-registry*)
37
                 'string< :key 'car)))