forked from barak/scheme2c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
204 lines (138 loc) · 5.92 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
Overview of the DEC Scheme->C Compiler.
;* Copyright (c) 1989-1993 Hewlett-Packard Development Company, L.P.
;* All Rights Reserved
;* Permission is hereby granted, free of charge, to any person obtaining a
;* copy of this software and associated documentation files (the "Software"),
;* to deal in the Software without restriction, including without limitation
;* the rights to use, copy, modify, merge, publish, distribute, sublicense,
;* and/or sell copies of the Software, and to permit persons to whom the
;* Software is furnished to do so, subject to the following conditions:
;*
;* The above copyright notice and this permission notice shall be included in
;* all copies or substantial portions of the Software.
;*
;* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
;* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;* DEALINGS IN THE SOFTWARE.
(Copyright was changed 4/28/08. Note that I did not change the copyright
messages included in various examples, in spite of the fact that the copyright
holder was changed from DEC to HP. If someone wants to fix the initial
prompt in various examples in the documentation, feel free ... Hans Boehm)
This is the root directory for the Scheme-to-C compiler which was done at
Digital Equipment Corporation's Western Research Laboratory.
Changes from the previous release are noted in the file CHANGES found in this
directory.
The compiler distribution consists of several directories:
doc contains documentation.
ports contains implementation specific files.
scrt contains the runtime system.
scsc contains the compiler.
test contains compiler and runtime test programs.
cdecl a C declaration compiler written in Scheme.
xlib X11 Xlib stubs for Scheme->C.
In order to install the compiler and interpreter on a system, the following
steps must be done. These instructions assume you're working on a
workstation with a "unix-like" operating system such as a DECstation 5000
running ULTRIX.
1. Verify that this directory contains the previously mentioned directories.
2. Create directories for the processor(s) desired:
For Alpha AXP OSF/1:
1 > make forAOSF
For Apple's macOS:
1 > make forMACOS
For Apple Macintosh system 7.1 with Think-C 5.0:
1 > make forMAC_CLASSIC
For ULTRIX DECstations:
1 > make forDECMIPS
For SGI systems based on Rx000 MIPS processors:
1 > make forSGIMIPS
For ULTRIX VAX systems:
1 > make forVAX
For Microsoft Windows 3.1 with Microsoft C 7.0:
1 > make forWIN16
3. Build Scheme->C for a specific processor:
For Alpha AXP OSF/1:
2 > cd AOSF;make port
N.B.: During the compilation, uopt warnings of the form "this procedure
not optimized because it exceeds size threshold" may occur. These
warnings may be ignored.
For Apple's macOS:
2 > cd MACOS;make port
For Apple Macintosh system 7.1 with Think-C 5.0:
No further steps are done on the workstation. Follow the
instructions in MAC_CLASSIC/README to transfer files to a Macintosh
and complete the build.
For ULTRIX DECstations:
2 > cd DECMIPS;make port
N.B.: During the compilation, uopt warnings of the form "this procedure
not optimized because it exceeds size threshold" may occur. These
warnings may be ignored.
For SGI systems:
2 > cd SGIMIPS;make port
N.B.: During the compilation, uopt warnings of the form "this procedure
not optimized because it exceeds size threshold" may occur. These
warnings may be ignored.
For VAX systems:
2 > cd VAX;make port
N.B.: During the compilation of scrt/scinit.c, one will get the
warnings:
"scinit.c", line 314: warning: illegal pointer combination
"scinit.c", line 316: warning: illegal pointer combination
"scinit.c", line 318: warning: illegal pointer combination
They may be ignored.
During the compilation of scrt/objects.c, one will get the following
warnings:
"objects.c", line 605: warning: illegal pointer combination
"objects.c", line 611: warning: illegal pointer combination
"objects.c", line 614: warning: illegal pointer combination
"objects.c", line 619: warning: illegal pointer combination
"objects.c", line 622: warning: illegal pointer combination
They may be ignored.
For Microsoft Windows 3.1 with Microsoft C 7.0:
No further steps are done on the workstation. Follow the
instructions in WIN16/README to transfer files to a PC and
complete the build.
4. Verify that the interpreter and compiler were correctly built:
4 >cd test
5 >../scrt/s2ci
SCHEME->C -- ...
> (load "test51.sc")
MODULE form ignored
TEST51
"test51.sc"
> (test51 '())
Hello world!
#F
> ^D
6 >make test51
../scsc/s2ccomp -schf ../scsc/s2ccomp.heap -C test51.sc
test51.sc:
../scsc/s2ccomp -schf ../scsc/s2ccomp.heap -c -g test51.c
cc -o test51 -g test51.o ../scrt/libs2c.a -lm
7 >test51
Hello world!
5. Install the libraries, compiler, and interpreter in some directory
such as ~/bin:
8 >cd ..
9 >make prefix=$HOME/s2c BINDIR=. LIBDIR=. LIBSUBDIR=. install
10 >rehash
Given that this directory in the current search path, the compiler can
now be accessed by "s2cc" and the interpreter by "s2ci".
N.B. Some users will see two or three sequences of error messages
ending with "*** Error code 1 (ignored)." These errors may be ignored.
6. At this point, the source in cdecl and xlib can now be compiled if
desired:
11 > cd cdecl
12 > make all
13 > cd ../xlib
14 > make all
Documentation for cdecl and xlib is contained in files found in their
respective directories.
7. If desired, the embedded server sample program and library is
constructed as follows:
15 > cd ../server
16 > make embedded libs2csrv.a