src/frontend.lisp: Add a function to update the `*usage*' list.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 4 Aug 2019 17:23:15 +0000 (18:23 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 4 Aug 2019 17:23:15 +0000 (18:23 +0100)
src/frontend.lisp

index d3d9d9d..06311a3 100644 (file)
@@ -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"
                (#\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)))