Commit cc275e02 authored by Antoine Martin's avatar Antoine Martin
Browse files

Make removing cache optional

parent ba675541
;;;; This file has to be run through qlmapper:map-releases "file"
(when cl-user::*remove-cache*
(sb-ext:run-program "/bin/rm"
(list "-rf"
(namestring
(merge-pathnames ".cache/common-lisp"
(user-homedir-pathname))))))
(ql:quickload "quickref")
(ql:quickload "net.didierverna.declt")
(net.didierverna.declt:nickname-package)
......
......@@ -74,7 +74,9 @@
(run-sbcl :file file
:pre-file pre-file
:environment-pairs (list "*qrmapper-object-name*"
name)
name
"*remove-cache*"
*remove-cache*)
:evals evals))))))))
(defun map-releases (file &key (dist-name "quicklisp") (filter 'identity)
......
......@@ -53,15 +53,16 @@
;; #### FIXME: consider creating a directory tree with top/logs/[declt|texi]
;; etc. Also maybe make the root directory customizable.
(defun build-releases ()
(defun build-releases (&key (remove-cache *remove-cache*))
"Calls NET.DIDIERVERNA.DECLT:DECLT on the primary system of each Quicklisp
release.
The resulting .texi file is placed inside the release's directory, in
~/quicklisp/dists/quicklisp/software/."
(setup-quickref-dir :declt t)
(map-releases
(merge-pathnames "map-declt.lisp"
(asdf:system-source-directory "quickref"))))
(let ((*remove-cache* remove-cache))
(setup-quickref-dir :declt t)
(map-releases
(merge-pathnames "map-declt.lisp"
(asdf:system-source-directory "quickref")))))
(defun uninstall-releases ()
(dolist (release (ql-dist:provided-releases t))
......@@ -69,8 +70,13 @@ The resulting .texi file is placed inside the release's directory, in
(defparameter *makeinfo-path* "/usr/local/bin/makeinfo")
(defparameter *log-errors* t)
(defparameter *remove-cache* nil)
(defun refresh (&key (makeinfo-path *makeinfo-path*) (log-errors *log-errors*) uninstall)
(defun refresh (&key
(makeinfo-path *makeinfo-path*)
(log-errors *log-errors*)
(remove-cache *remove-cache*)
uninstall)
"Run the whole Quickref process, from generating the .texi files with Declt
to creating the corresponding html files with makeinfo.
......@@ -78,6 +84,8 @@ to creating the corresponding html files with makeinfo.
use to build the .html files from the .texi ones.
- LOG-ERRORS: boolean, determines whether the various errors encountered are
logged or not.
- REMOVE-CACHE: boolean, whether the cache is cleaned between each call to
Declt on a system or not.
- UNINSTALL: boolean, determines whether we should uninstall all the
Quicklisp releases before running everything, to start from a clean state.
......@@ -86,7 +94,8 @@ be found in ~/texi-logfiles/ and ~/declt-logfiles/ for now."
(setup-quickref-dir :declt t :makeinfo t)
(let ((*makeinfo-path* makeinfo-path)
(*log-errors* log-errors))
(*log-errors* log-errors)
(*remove-cache* remove-cache))
(when uninstall
(uninstall-releases))
(ql:update-all-dists :prompt nil)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment