From 3a04cacb948350c09a467b7236fa6c8fbbbb80fe Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 4 Aug 2019 18:23:15 +0100 Subject: [PATCH] src/frontend.lisp: Add a function to update the `*usage*' list. --- src/frontend.lisp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/frontend.lisp b/src/frontend.lisp index d3d9d9d..06311a3 100644 --- a/src/frontend.lisp +++ b/src/frontend.lisp @@ -74,6 +74,9 @@ (setf var path)))))) +(defun update-usage () + (setf *usage* (simple-usage *options* "SOURCES..."))) + (export 'main) (defun main () @@ -92,7 +95,6 @@ (define-program :help "Process SOD input files to produce (e.g.) C output." :version *sod-version* - :usage "SOURCES..." :options (options (help-options :short-version #\V) "Translator options" @@ -114,6 +116,7 @@ (#\t "type" (:arg "OUT-TYPE") ("Produce output of type OUT-TYPE.") (list output-reasons 'keyword)))) + (update-usage) ;; Actually parse the options. (let ((*option-parser* (make-option-parser))) -- 2.11.0