From: Mark Wooding Date: Sun, 4 Aug 2019 17:23:15 +0000 (+0100) Subject: src/frontend.lisp: Add a function to update the `*usage*' list. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/commitdiff_plain/3a04cacb948350c09a467b7236fa6c8fbbbb80fe?ds=inline src/frontend.lisp: Add a function to update the `*usage*' list. --- 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 @@ (defopthandler dirpath (var arg) () (setf var path)))))) +(defun update-usage () + (setf *usage* (simple-usage *options* "SOURCES..."))) + (export 'main) (defun main () @@ -92,7 +95,6 @@ (defun main () (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 @@ (define-program (#\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)))