chiark
/
gitweb
/
~mdw
/
sod
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
abbdf02
)
src/frontend.lisp: Add a function to update the `*usage*' list.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 4 Aug 2019 17:23:15 +0000
(18:23 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 4 Aug 2019 17:23:15 +0000
(18:23 +0100)
src/frontend.lisp
patch
|
blob
|
blame
|
history
diff --git
a/src/frontend.lisp
b/src/frontend.lisp
index d3d9d9db2bddc7573b6920c75ebcac42817cb6ee..06311a339014142e68be94a0092de966d37f0e38 100644
(file)
--- a/
src/frontend.lisp
+++ b/
src/frontend.lisp
@@
-74,6
+74,9
@@
(defopthandler dirpath (var arg) ()
(setf var path))))))
(setf var path))))))
+(defun update-usage ()
+ (setf *usage* (simple-usage *options* "SOURCES...")))
+
(export 'main)
(defun main ()
(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*
(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"
: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))))
(#\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)))
;; Actually parse the options.
(let ((*option-parser* (make-option-parser)))