Add man page
This commit is contained in:
2
clash/.gitignore
vendored
2
clash/.gitignore
vendored
@ -1 +1,3 @@
|
|||||||
clash
|
clash
|
||||||
|
clash.md
|
||||||
|
clash.1
|
||||||
|
|||||||
@ -1,13 +1,28 @@
|
|||||||
LISP=sbcl
|
LISP=sbcl
|
||||||
|
|
||||||
all: clash
|
PREFIX=~/.local
|
||||||
|
|
||||||
|
all: clash clash.1
|
||||||
|
|
||||||
clash: clash.asd format.lisp parse-date.lisp clash.lisp
|
clash: clash.asd format.lisp parse-date.lisp clash.lisp
|
||||||
$(LISP) --eval '(ql:quickload :clash)' \
|
$(LISP) --eval '(ql:quickload :clash)' \
|
||||||
--eval '(asdf:make :clash)' \
|
--eval '(asdf:make :clash)' \
|
||||||
--eval '(uiop:quit)'
|
--eval '(uiop:quit)'
|
||||||
|
|
||||||
|
clash.md: clash.asd format.lisp parse-date.lisp clash.lisp
|
||||||
|
$(LISP) --eval '(ql:quickload :clash)' \
|
||||||
|
--eval '(clash:make-markdown-doc)' \
|
||||||
|
--eval '(uiop:quit)' \
|
||||||
|
-- clash.md
|
||||||
|
|
||||||
|
clash.1: clash.md
|
||||||
|
go-md2man <clash.md >clash.1
|
||||||
|
|
||||||
|
install: clash clash.1
|
||||||
|
install -D clash $(PREFIX)/bin/
|
||||||
|
install -D clash.1 $(PREFIX)/share/man/man1/
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f clash
|
rm -f clash clash.md clash.1
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|||||||
@ -15,7 +15,8 @@
|
|||||||
#:read-directorysizes-for-trash-directory
|
#:read-directorysizes-for-trash-directory
|
||||||
#:write-directorysizes-for-trash-directory)
|
#:write-directorysizes-for-trash-directory)
|
||||||
(:use #:cl #:clash/parse-date #:clash/format)
|
(:use #:cl #:clash/parse-date #:clash/format)
|
||||||
(:export #:toplevel))
|
(:export #:toplevel
|
||||||
|
#:make-markdown-doc))
|
||||||
|
|
||||||
(in-package :clash)
|
(in-package :clash)
|
||||||
|
|
||||||
@ -1041,3 +1042,13 @@ Args can be supplied to facilitate testing in SLIME."
|
|||||||
(clingon:run (toplevel/command) args)
|
(clingon:run (toplevel/command) args)
|
||||||
(clingon:run (toplevel/command)))
|
(clingon:run (toplevel/command)))
|
||||||
(flush-directorysizes-cache)))
|
(flush-directorysizes-cache)))
|
||||||
|
|
||||||
|
;; Used from the build system
|
||||||
|
(defun make-markdown-doc ()
|
||||||
|
"Generate documentation in a markdown format."
|
||||||
|
;; the first argument is "--"
|
||||||
|
(let ((target (second (uiop:command-line-arguments))))
|
||||||
|
(with-open-file (out target :direction :output
|
||||||
|
:if-exists :overwrite
|
||||||
|
:if-does-not-exist :create)
|
||||||
|
(clingon:print-documentation :markdown (toplevel/command) out))))
|
||||||
|
|||||||
Reference in New Issue
Block a user