-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgenerate-api-docs
More file actions
executable file
·42 lines (39 loc) · 1.45 KB
/
generate-api-docs
File metadata and controls
executable file
·42 lines (39 loc) · 1.45 KB
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
#!/usr/bin/sbcl --script
;; -*- lisp -*-
;;
;; Build the texinfo API documentation for the repository.
;;
;; This uses the included (slightly tweaked) version of sb-texinfo.
;; Call this script to build/update the texi documentation files for
;; every exported symbol.
;;
;; Call this script with the argument "packages" to rebuild the
;; doc/*-api.texi files to include newly documented exported symbols.
;; (By default sb-texinfo doesn't create any output for symbols without
;; documentation in the source.) Note that some manual "fixing up"
;; is often required after re-running with the package argument and
;; the results should be committed.
;;
(load "~/.sbclrc" :if-does-not-exist nil)
(require :uiop)
(setf uiop/lisp-build:*uninteresting-conditions*
uiop/lisp-build:*usual-uninteresting-conditions*)
(require :sb-introspect)
(require :alexandria)
(require :split-sequence)
(require :cl-ppcre)
(load ".cl-make/sb-texinfo/docstrings.lisp")
(in-package :sb-texinfo)
(pop sb-ext:*posix-argv*)
(unless (> (length sb-ext:*posix-argv*) 1)
(write-line
"USAGE: generate-api-docs title next previous packages...")
(sb-ext:exit :code 1))
(format t "Wrote documentation to ~A.~%"
(document-system
(first sb-ext:*posix-argv*)
(mapcar #'alexandria:make-keyword (mapcar #'string-upcase (cdddr sb-ext:*posix-argv*)))
:next (second sb-ext:*posix-argv*)
:previous (third sb-ext:*posix-argv*)
:top "Top"
:dir "doc/"))