dump-runlisp-image.1.in, runlisp.1.in: Document the `-o' option.
[runlisp] / dump-runlisp-image.1.in
CommitLineData
10427eb2
MW
1.\" -*-nroff-*-
2.\"
3.\" Manual for `dump-runlisp-image'
4.\"
5.\" (c) 2020 Mark Wooding
6.\"
7.
8.\"----- Licensing notice ---------------------------------------------------
9.\"
10.\" This file is part of Runlisp, a tool for invoking Common Lisp scripts.
11.\"
12.\" Runlisp is free software: you can redistribute it and/or modify it
13.\" under the terms of the GNU General Public License as published by the
14.\" Free Software Foundation; either version 3 of the License, or (at your
15.\" option) any later version.
16.\"
17.\" Runlisp is distributed in the hope that it will be useful, but WITHOUT
18.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20.\" for more details.
21.\"
22.\" You should have received a copy of the GNU General Public License
23.\" along with Runlisp. If not, see <https://www.gnu.org/licenses/>.
24.
25.ie t \{\
26. ds o \(bu
27. if \n(.g \{\
28. fam P
29. ev an-1
30. fam P
31. ev
32. \}
33.\}
34.el \{\
35. ds o o
36.\}
37.
38.de hP
39.IP
40\h'-\w'\fB\\$1\ \fP'u'\fB\\$1\ \fP\c
41..
42.ds , \h'.16667m'
43.
44.\"--------------------------------------------------------------------------
45.TH dump-runlisp-image 1 "12 August 2020" "Mark Wooding"
46.SH NAME
47dump-runlisp-image \- dump Lisp images for faster script execution
48.
49.\"--------------------------------------------------------------------------
50.SH SYNOPSIS
51.
52.B dump-runlisp-image
53.RB [ \-RUafinqrv ]
54.RB [ +RUfinr ]
55.RB [ \-O
56.IR output ]
57.br
8ed4c352 58 \c
10427eb2
MW
59.RB [ \-c
60.IR conf ]
61.RB [ \-o
62.RI [ sect \c
63.BR : ] \c
64.IB var = \c
65.IR value ]
66.RB [ \-j
67.IR njobs ]
68.RI [ lisp
69\&...]
70.
71.\"--------------------------------------------------------------------------
72.SH DESCRIPTION
73.
74The
75.B dump-runlisp-image
76program builds custom images for use by
77.BR runlisp (1).
78For many Lisp implementation,
79a custom image,
80with ASDF already loaded,
81can start scripts much more quickly
82than the `vanilla' images installed by default.
83The downside is that custom images may be rather large.
84.
85.SS "Options"
86The following options are accepted on the command line.
87.
88.TP
89.BR "\-h" ", " "\-\-help"
90Write a synopsis of
91.BR dump-runlisp-image 's
92command-line syntax
93and a description of the command-line options
94to standard output
95and immediately exit with status 0.
96.
97.TP
98.BR "\-V" ", " "\-\-version"
99Write
100.BR dump-runlisp-image 's
101version number
102to standard output
103and immediately exit with status 0.
104.
105.TP
10427eb2
MW
106.BI "\-O" "\fR, " "\-\-output=" output
107If
108.I output
109names a directory,
110then write images to that directory
111with their default names as specified in the configuration file.
112Otherwise,
113exactly one Lisp implementation must be explicitly named,
114the
115.RB ` \-R '
116and
117.RB `\-U '
118options must not be set,
119and
120the image is written to a file named
121.IR output .
122By default,
123images are written to the directory in which
124.BR runlisp (1)
125will look in when checking for custom images:
126run
bf52b6ca 127.B query-runlisp-config \-x@image-dir
10427eb2
MW
128to see the default setting.
129.
130.TP
c88b892c
MW
131.BR "\-R" ", " "\-\-remove-other"
132After processing the selected Lisp implementations,
133delete all of the image files corresponding to other Lisps
134defined in the configuration.
135Negate with
136.B +R
137or
138.BR \-\-no-remove-other .
139.
140.TP
141.BR "\-U" ", " "\-\-remove-unknown"
142After processing the selected Lisp implementations,
143delete all of the files in the image directory which
144.I aren't
145image files of a configured Lisp implementation.
146Negate with
147.B +U
148or
149.BR \-\-no-remove-unknown .
150.
151.TP
10427eb2
MW
152.BR "\-a" ", " "\-\-all-configured"
153Select all configured Lisp implementations.
154You must either list Lisp implementations explicitly on the command line
155or set the
156.RB ` \- a'
157option,
158but not both.
159.
160.TP
161.BI "\-c" "\fR, " "\-\-config-file=" conf
162Read configuration from
163.IR conf .
164If
165.I conf
166is a directory, then all of the files within
167whose names end with
168.RB ` .conf ',
169are loaded, in ascending lexicographical order;
170otherwise,
171.I conf
172is opened as a file.
af677646 173All of the files are expected to be as described in
10427eb2
MW
174.BR runlisp.conf (5).
175.
176.TP
177.BR "\-f" ", " "\-\-force"
178Create fresh Lisp images
179even if a file with the appropriate name
180already exists.
181Negate with
182.B +f
183or
184.BR \-\-no-force .
185.
186.TP
187.BR "\-i" ", " "\-\-check-installed"
188Only select those Lisp implementations
189which are actually installed
190(and can be found).
191To count as `installed',
192the program named by
193.B command
194must exist and be executable in one of the directories listed in the
195.B PATH
196environment variable,
197as must the command named in the first word of the
198.B dump-image
199command line.
200Note that a Lisp implementation which fails this check
201is not counted as `selected' for the purposes of the
202.RB ` \-R '
203option above.
204For example, the command
205.B "dump-runlisp-image \-Rai"
206will dump images for Lisps which have been installed since the last run,
207and delete images for Lisps which have been uninstalled since then.
208Negate with
209.B +i
210or
211.BR \-\-no-check-installed .
212.
213.TP
214.BI "\-j" "\fR, " "\-\-jobs=" njobs
215Dump image for up to
216.I njobs
217Lisp implementations in parallel.
218The default is to run the jobs sequentially.
219.
220.TP
bf52b6ca 221.BR "\-n" ", " "\-\-dry-run"
10427eb2
MW
222Don't actually run any commands to dump images.
223This may be helpful for the curious,
224in conjunction with
225.RB ` \-v '
226to increase the verbosity.
227Negate with
228.B +n
229or
230.BR "\-\-no-dry-run" .
231.
232.TP
497e5a4a
MW
233.BI "\-o" "\fR, " "\-\-set-option=\fR[" sect "\fR]\fB:" var = value
234Assign
235.I value
236to the variable
237.I var
238in configuration section
239.IR sect ,
240or
241.B @CONFIG
242if no section is specified.
243The value is unexpandable,
244and overrides any similarly named setting
245from the configuration file(s).
246.
247.TP
10427eb2
MW
248.BR "\-q" ", " "\-\-quiet"
249Don't print warning messages.
250This option may be repeated:
251each use reduces verbosity by one step,
252counteracting one
253.RB ` \-v '
254option.
255The default verbosity level is 1,
256which prints only warning measages.
257.
258.TP
259.BR "\-r" ", " "\-\-remove-image"
260Delete image files for the selected Lisp implementations,
261rather than dumping them.
262Negate with
263.B +r
264or
265.BR \-\-no-remove-image .
266.
267.TP
268.BR "\-v" ", " "\-\-verbose"
269Be more verbose about the process of creating images.
270Lisp implementations can be rather noisy:
271by default,
272.B dump-runlisp-image
273runs silently unless something goes wrong,
274in which case it prints the failed Lisp command line
275and its output.
276If you set
277.B \-v
278then
279.B dump-runlisp-image
280will show Lisp implementation's noise immediately,
281without waiting to see whether it succeeds or fails.
282.
283.SS "Operation"
284The
285.B dump-runlisp-image
286program first determines a collection of
287.I selected
288Lisp implementations.
289If the
290.RB ` \-a '
291option is not set,
292then the selected Lisps are those named on the command line.
293If
294.RB ` \-a '
295is set,
296and the configuration contains a setting for
297.B dump
298in the
299.B @CONFIG
300section,
301then its (expanded) value is taken to be
302a list of Lisp implementation names
303separated by commas and/or one or more whitespace characters,
304and these named Lisp implementations are selected;
305if there is no
306.B dump
307setting, then
308.I all
309configured Lisp implementations which claim support for custom images
310\(en i.e., configuration sections with settings for
311.B run-script
312and
313.B image-file
314\(en are selected, and the
315.RB ` \-i '
316option is forced on.
317If the
318.RB ` \-i '
319option is set,
320then only those Lisp implementations which are actually installed
321are selected.
322.PP
323Having established the selected Lisps,
324.B dump-runlisp-image
325proceeds to act on them:
326in the absence of the
327.RB ` \-r '
328option,
329it attempts to dump a custom image
330for each selected Lisp implementation,
331unless an image file already exists
332or the
333.RB ` \-f '
334option is set.
335(Note that
336.RB ` \-f '
337is an optimization of image dumping,
338and does not affect selection.)
339On the other hand, if
340.RB ` \-r '
341is set,
342then the custom image files of the selected Lisp implementations
343are deleted.
344.PP
345Next, if the
346.RB ` \-R '
347option is set,
348then all the images for Lisp implementations
349which are defined in the configuration
350but were
351.I not
352selected
353are deleted.
354.PP
355Finally, if the
356.RB ` \-U '
357option is set,
358then all files in the image directory
359which aren't recognized as being
360the custom image of some Lisp implementation
361are deleted.
362.PP
363If all of these operations are successfully performed
364then
365.B dump-runlisp-image
366exits with status 0;
367if there was a problem with the command line,
368or if any jobs fail,
369then it exits with status 127.
370.
371.\"--------------------------------------------------------------------------
372.
373.SH SEE ALSO
374.BR query-runlisp-config (1),
375.BR runlisp (1),
376.BR runlisp.conf (5).
377.
378.SH AUTHOR
379Mark Wooding, <mdw@distorted.org.uk>
380.
381.\"----- That's all, folks --------------------------------------------------