Merge branch 'MatthewRock/ecl-deprecate-short-longflags' into develop

This commit is contained in:
MatthewRock 2016-09-17 22:50:27 +02:00
commit 2d8e7d6dbe
2 changed files with 69 additions and 24 deletions

View file

@ -1,4 +1,4 @@
.TH ECL 1 2016-06-18
.TH ECL 1 2016-09-17
.UC 4
.SH NAME
ecl \- Embeddable Common Lisp
@ -7,23 +7,28 @@ ecl \- Embeddable Common Lisp
\fBecl\fP
[\fB-?\fP | \fB--help\fP]
.br
[\fB-dir\fP \fIdir\fP] [\fB-load\fP \fIfile\fP] [\fB-shell\fP \fIfile\fP] [\fB-eval\fP \fIexpr\fP]
[\fB--dir\fP \fIdir\fP] [\fB--load\fP \fIfile\fP] [\fB--shell\fP \fIfile\fP] [\fB--eval\fP \fIexpr\fP]
.br
[\fB-norc\fP]
[\fB--norc\fP] [\fB--hp\fP | \fB--nohp\fP]
.br
[\fB--debug\fP | \fB--nodevbug\fP]
.br
[\fB--c-stack\fP \fIsize\fP] [\fB--lisp-stack\fP \fIsize\fP]
.br
[\fB--heap-size\fP \fIsize\fP] [\fB--frame-stack\fP \fIsize\fP]
.br
[[\fB-o\fP \fIofile\fP] [\fB-c\fP [\fIcfile\fP]] [\fB-h\fP [\fIhfile\fP]] [\fB-data\fP [\fIdatafile\fP]]
[[\fB-o\fP \fIofile\fP] [\fB-c\fP [\fIcfile\fP]] [\fB-h\fP [\fIhfile\fP]] [\fB--data\fP [\fIdatafile\fP]]
.br
[\fB-s\fP] [\fB-q\fP] \fB-compile\fP \fIfile\fP]
[\fB-s\fP] [\fB-q\fP] \fB--compile\fP \fIfile\fP]
.br
[[\fB-o\fP \fIofile\fP] \fB-link\fP \fIfile\fP+]
[[\fB-o\fP \fIofile\fP] \fB--link\fP \fIfile\fP+]
.br
[\fB--input-encoding\fP \fIexternal-format\fP] [\fB--output-encoding\fP \fIexternal-format\fP]
.br
[\fB--error-encoding\fP \fIexternal-format\fP] [\fB--encoding\fP \fIexternal-format\fP]
.br
\fBDEPRECATION NOTE:\fP one-dash versions of long flags(e.g. \fB-eval\fP or \fB-data\fP) are deprecated; you should use two-dash versions (e.g. \fB--eval\fP or \fB--data\fP) now.
.SH DESCRIPTION
.sp
@ -55,7 +60,7 @@ A reasonable license
.B \-?, \-\-help
Shows the help prompt without running the ECL.
.TP
.BI \-norc
.BI \-\-norc
Do not load configuration files at startup.
.TP
.BI \-\-version
@ -65,29 +70,29 @@ Prints the current version of ECL, without running the ECL.
Turned on by default, this enables the debugging in the setup phase,
so that you can debug your files.
.TP
.BI \-nodebug
.BI \-\-nodebug
Run without debugging setup phase, meaning that errors prevent ECL from starting up.
.TP
.BI \-eval " file"
.BI \-\-eval " file"
Evaluate the
.I file
before loading the .rc file and starting the Top Level.
.TP
.BI \-shell " file"
.BI \-\-shell " file"
Executes the given
.I file
and exits, without providing a read-eval-print loop.
If you want to use lisp as a scripting language, you can write
.BR "#!@bindir@/ecl -shell"
.BR "#!@bindir@/ecl --shell"
on the first line of the file to be executed, and then ECL will be
automatically invoked.
.TP
.BI \-load " file"
.BI \-\-load " file"
Load source
.I file
before loading the .rc file and starting the Top Level.
.TP
.BI \-dir " directory"
.BI \-\-dir " directory"
Use
.I directory
as a system directory.
@ -154,12 +159,12 @@ When compiling name the intermediary C file
.I cfile
and do not delete it afterwards.
.TP
.BI \-data " [datafile]"
.BI \-\-data " [datafile]"
Dumps compiler data into \fIdatafile\fP or, if not
supplied, into a file named after the source file, but
with .data as extension.
.TP
.BI \-compile " file"
.BI \-\-compile " file"
Translates
.I file
to C and invokes the local C compiler to produce a
@ -168,6 +173,12 @@ native code program.
.BI \-q
Short for quiet - produce less notes.
.TP
.BI \-\-hp
This option is deprecated and doesn't do anything.
.TP
.BI \-\-nodp
This option is deprecated and doesn't do anything.
.TP
.BI \-s
Produce a linkable object file. It cannot be loaded
with load, but it can be used to build libraries
@ -186,8 +197,8 @@ the ECL mailing list.
.TP
.BR "~/.ecl, ~/.eclrc"
Default initialization files loaded at startup unless the option
.BR \-norc
is provided
.BR \-\-norc
is provided.
(if they exist).
.SH SEE ALSO

View file

@ -23,11 +23,11 @@
(defparameter *help-message* "
Usage: ecl [-? | --help]
[-dir dir] [-load file] [-shell file] [-eval expr] [-rc | -norc] [-hp | -nohp]
[--dir dir] [--load file] [--shell file] [--eval expr] [--rc | --norc] [--hp | --nohp]
[--c-stack size] [--lisp-stack size] [--heap-size size] [--frame-stack size]
[[-o ofile] [-c [cfile]] [-h [hfile]] [-data [datafile]] [-s] [-q]
-compile file]
[[-o ofile] -link file+]
[[-o ofile] [-c [cfile]] [-h [hfile]] [--data [datafile]] [-s] [-q]
--compile file]
[[-o ofile] --link file+]
[--input-encoding external-format] [--output-encoding external-format]
[--error-encoding external-format] [--encoding external-format]
[--trap-fpe | --no-trap-fpe]
@ -59,20 +59,31 @@ appeared after a '--'.")
'(("--help" 0 #0=(progn (princ *help-message* *standard-output*) (quit)) :noloadrc)
("-?" 0 #0# :noloadrc)
("-norc" 0 nil :noloadrc)
("--norc" 0 nil :noloadrc)
("--version" 0
(progn (setf quit 0)
(format *standard-output* "ECL ~A~%" (lisp-implementation-version)))
:noloadrc)
("-debug" 0 (setf *command-break-enable* t))
("--debug" 0 (setf *command-break-enable* t))
("-nodebug" 0 (setf *command-break-enable* nil))
("--nodebug" 0 (setf *command-break-enable* nil))
("-eval" 1 (eval (read-from-string 1)))
("--eval" 1 (eval (read-from-string 1)))
("-shell" 1 (progn (setq quit 0)
(setq ext:*unprocessed-ecl-command-args* (rest 1))
(load (first (rest 1)) :verbose nil))
:stop)
("--shell" 1 (progn (setq quit 0)
(setq ext:*unprocessed-ecl-command-args* (rest 1))
(load (first (rest 1)) :verbose nil))
:stop)
("-load" 1 (load 1 :verbose verbose))
("--load" 1 (load 1 :verbose verbose))
("-dir" 1 (setf (logical-pathname-translations "SYS")
`(("**;*.*" ,(merge-pathnames "**/*.*" (truename 1))))))
("--dir" 1 (setf (logical-pathname-translations "SYS")
`(("**;*.*" ,(merge-pathnames "**/*.*" (truename 1))))))
("--heap-size" 1 (ext:set-limit 'ext:heap-size (read-from-string 1)))
("--lisp-stack" 1 (ext:set-limit 'ext:lisp-stack (read-from-string 1)))
("--frame-stack" 1 (ext:set-limit 'ext:frame-stack (read-from-string 1)))
@ -92,9 +103,23 @@ appeared after a '--'.")
(progn
(setq quit
(if (nth-value 3
(compile-file 1 :output-file output-file :c-file c-file
:h-file h-file :data-file data-file
:verbose verbose :system-p system-p))
(compile-file 1 :output-file output-file :c-file c-file
:h-file h-file :data-file data-file
:verbose verbose :system-p system-p))
1
0)
output-file t
c-file nil
h-file nil
data-file nil
system-p nil)))
("--compile" 1
(progn
(setq quit
(if (nth-value 3
(compile-file 1 :output-file output-file :c-file c-file
:h-file h-file :data-file data-file
:verbose verbose :system-p system-p))
1
0)
output-file t
@ -108,13 +133,22 @@ appeared after a '--'.")
(funcall (read-from-string "c::build-program")
(or output-file "lisp.exe") :lisp-files '&rest)
(setq output-file t quit t)))
("--link" &rest
(progn
(require 'cmp)
(funcall (read-from-string "c::build-program")
(or output-file "lisp.exe") :lisp-files '&rest)
(setq output-file t quit t)))
("-o" &optional (setq output-file 1))
("-c" &optional (setq c-file 1))
("-h" &optional (setq h-file 1))
("-data" 1 (setq data-file 1))
("--data" 1 (setq data-file 1))
("-q" 0 (setq verbose nil))
("-hp" 0 (setf *relative-package-names* t))
("--hp" 0 (setf *relative-package-names* t))
("-nohp" 0 (setf *relative-package-names* nil))
("--nohp" 0 (setf *relative-package-names* nil))
("-s" 0 (setq system-p t))
("--" 1 (setf ext:*unprocessed-ecl-command-args* (rest 1)) :stop)))