diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-06-04 05:44:36 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-06-04 05:44:36 -0700 |
commit | acff34d5223eb884aa00a4a77b44c2ad8f262829 (patch) | |
tree | 76d55db8f6d4d92bb2e7dcc9dea990d8704dec8a | |
parent | d236509b8878afb3a6e33aa9e50f0a106e040b29 (diff) | |
download | tl-who-acff34d5223eb884aa00a4a77b44c2ad8f262829.tar.gz tl-who-acff34d5223eb884aa00a4a77b44c2ad8f262829.tar.bz2 tl-who-acff34d5223eb884aa00a4a77b44c2ad8f262829.zip |
Support compilation.
* packages.tl: Add workaround for a newly discovered bug
in compile-file.
* tl.who.tl: Replace loads with a form that does different
things based on *load-args*, the default being to load
everything when *load-args* are empty.
-rw-r--r-- | packages.tl | 2 | ||||
-rw-r--r-- | tl-who.tl | 52 |
2 files changed, 50 insertions, 4 deletions
diff --git a/packages.tl b/packages.tl index 0eaca09..f2d0dfc 100644 --- a/packages.tl +++ b/packages.tl @@ -53,3 +53,5 @@ (defpackage "tl-who-priv" (:fallback "tl-who" "usr")) + +(list) ;; workaround for compile-file bug present up to TXR 287 @@ -1,4 +1,48 @@ -(load "packages") -(load "specials") -(load "util") -(load "who") +;; Copyright (c) 2023, Kaz Kylheku. All rights reserved. +;; +;; Redistribution and use in source and binary forms, with or without +;; modification, are permitted provided that the following conditions +;; are met: +;; +;; * Redistributions of source code must retain the above copyright +;; notice, this list of conditions and the following disclaimer. +;; +;; * Redistributions in binary form must reproduce the above +;; copyright notice, this list of conditions and the following +;; disclaimer in the documentation and/or other materials +;; provided with the distribution. +;; +;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED +;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +;; ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +;; +;; New, experimental system construction method for TXR Lisp. +;; Using the *load-args* feature introduced in Version 287, +;; we can have a top-level entry point which responds to commands. +;; +;; (load "path/to/tl-who" :compile) ;; compile out-of-date files +;; (load "path/to/tl-who" :clean) ;; remove compiled files +;; (load "path/to/tl-who") ;; load files, compiled or source +;; + +(compile-only + (let ((files '#"tl-who packages specials util who")) + (match-case *load-args* + (() + [mapdo load (cdr files)]) ;; avoid tl-who, this file! + ((:compile) + [mapdo compile-update-file files]) + ((:clean) + [mapdo (op remove-path + (path-cat (dir-name *load-path*) `@1.tlo`) + nil) + files])))) |