chiark / gitweb /
src/classes.lisp: Fix `print-object' on `sod-initializer'.
[sod] / src / sod.1
CommitLineData
9ed8eb2a
MW
1.\" -*-nroff-*-
2.\"
3.\" The Sod translator
4.\"
5.\" (c) 2015 Straylight/Edgeware
6.\"
7.
8.\"----- Licensing notice ---------------------------------------------------
9.\"
e0808c47 10.\" This file is part of the Sensible Object Design, an object system for C.
9ed8eb2a
MW
11.\"
12.\" SOD is free software; you can redistribute it and/or modify
13.\" it under the terms of the GNU General Public License as published by
14.\" the Free Software Foundation; either version 2 of the License, or
15.\" (at your option) any later version.
16.\"
17.\" SOD is distributed in the hope that it will be useful,
18.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
19.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20.\" GNU General Public License for more details.
21.\"
22.\" You should have received a copy of the GNU General Public License
23.\" along with SOD; if not, write to the Free Software Foundation,
24.\" Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25.
26.\" Highlight using terminal escapes, rather than overstriking.
27.\"\X'tty: sgr 1'
28.
29.\" String definitions and font selection.
30.ie t \{\
31. ds o \(bu
32. if \n(.g .fam P
33.\}
34.el \{\
35. ds o o
36.\}
37.
38.\" .hP TEXT -- start an indented paragraph with TEXT hanging off to the left
39.de hP
40.IP
41\h'-\w'\fB\\$1\ \fP'u'\fB\\$1\ \fP\c
42..
43.
44.\"--------------------------------------------------------------------------
45.TH sod 1 "11 October 2015" "Straylight/Edgeware" "Sensible Object Design"
46.
47.SH NAME
48sod \- Sensible Object Design translator
49.
50.\"--------------------------------------------------------------------------
51.SH SYNOPSIS
52.B sod
53.RB [ \-p ]
54.RB [ \-\-builtins ]
55.RB [ \-d
56.IR dir ]
57.RB [ \-I
58.IR dir ]
59.RB [ \-t
60.IR out-type ]
61.IR sources ...
62.
63.\"--------------------------------------------------------------------------
64.SH DESCRIPTION
65.
66The
67.B sod
68program reads input files describing Sod modules,
69containing class definitions and other items,
70and generates output files,
71such as C source and header files.
72.
73.SS Command line
74The following command-line options are recognized.
75.TP
76.B "\-h, \-\-help"
77Write command-line help text to standard output,
78and exit successfully.
79.TP
80.B "\-V, \-\-version"
81Write Sod's version number to standard output,
82and exit successfully.
83.TP
84.B "\-u, \-\-usage"
85Write a brief usage message to standard output,
86and exit successfully.
87.TP
88.B "\-\-builtins"
89Generate output for to the built-in module,
90which defines the root classes
91.B SodObject
92and
93.BR SodClass .
94For the purpose of naming output files,
95the built-in module is named
96.BR sod-base .
97.TP
98.BI "\-I, \-\-include=" dir
99Look for imported modules and extension files in directory
100.IR dir .
101This option may be repeated:
102directories are searched in the order they were named.
103.TP
104.BI "\-d, \-\-directory=" dir
105Write output files to directory
106.IR dir ,
107instead of the current directory.
108.TP
109.B "\-p, \-\-stdout"
110Write output to standard output,
111instead of to files.
112.TP
113.BI "\-t, \-\-type=" out-type
114Produce output of type
115.IR out-type .
116Output types can be defined by extensions.
117The built-in output types are described below.
118.PP
119Each
120.I source
121file named on the command-line
122is read and parsed as a Sod module:
123see
124.BR sod-module (5)
125for the built-in syntax.
126An output file is written for each module read,
127and the built-in module if the
128.B \-\-builtins
129option was given,
130and for each output type requested using the
131.B \-t
132option.
133At least one output type must be provided.
134.
135.SS Output types
136If a module is read from a file named
137.IB name . ext
138where
139.I ext
140doesn't contain a dot
141.RB (` . '),
142or if the file has a simple
143.I name
144which doesn't contain a dot
145(except possibly an initial one),
146then the module's name is
147.IR name .
148It is conventional for module files to be named
149.IB name .sod \fR.
150Output file names are determined by the module name,
151the output type,
152and the output directory
153.I dir
154specified by the
155.B \-d
156option.
157.PP
158The following output types are defined.
159.TP
160.B c
161Write C source,
162suitable for standalone compilation,
163defining the necessary direct and effective method functions
164and static tables
165for the classes defined in the module.
166The output file is named
167.IB dir / name .c \fR.
168.TP
169.B h
170Write a C header file,
171suitable for inclusion using
172.BR #include ,
173declaring the necessary data structures and functions
174for the classes defined in the module.
175The output file is named
176.IB dir / name .h \fR.
177.
178.\"--------------------------------------------------------------------------
179.SH SEE ALSO
180.BR sod (3),
181.BR sod-structs (3),
182.BR sod-module (5).
183.
184.\"--------------------------------------------------------------------------
185.SH AUTHOR
186Mark Wooding, <mdw@distorted.org.uk>
187.
188.\"----- That's all, folks --------------------------------------------------