-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME.developers
168 lines (143 loc) · 5.61 KB
/
README.developers
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
===========================
RANDOM NOTES FOR DEVELOPERS
===========================
build system
------------
configure checks for each lisp interpretor on existence, and
exports `<NAME>_interp', `<NAME>_dump', and the list of requested
in `lisp'.
configure generates the following files:
Makefile <- Makefile.in
make-cafeobj.lisp <- make-cafeobj.lisp.in
xbin/cafeobj.in <- xbin/cafeobj.in.in
doc/Makefile.in <- doc/Makefile
After that, xbin/cafeobj is created from the Makefile by a sed command.
other lisp interpreters
-----------------------
Although by default only acl, sbcl, clisp is checked and build for,
the following lisp implementations can also be used, but are
currently not supported. Builds will fail.
configure argument program name
cmu lisp -- CMU-CL
gcl gcl -- GNU Common Lisp
ccl ccl -- openmcl
ccl64 ccl64 -- openmcl 64 bit
adding a lisp interpreter
-------------------------
Adding a new interpreter requires (at least) changes to the following
files (more or less symmetric to all the others):
- configure.ac
- Makefile.in
- xbin/cafeobj.in.in
- make-cafeobj.lisp.in
building using SBCL for windows
-------------------------------
If Wine is installed, and within wine sbcl is installed, one can create
a dump for Windows with
./configure --enable-windows
make
One can set the used wine prefix with WINEPREFIX. This creates already
release ready .zip (currently broken?).
Comments: 64bit version works, but it seems that the 32bit SBCL version
has problems running on a 64bit Wine. In this case:
- configure as usual with ./configure --with-lisp=sbcl on Linux
- move the files to Windows
- create dumps/sbcl/ directory
- run there in cmd.exe (not powershell!): sbcl < make-cafeobj.lisp
- use the CafeOBJ.exe from the dump/sbcl/ directory
building using ACL on Windows
-----------------------------
Building distribution tarballs on Windows using ACL requires a few more steps:
- configure CafeOBJ sources on Linux with
./configure
no special argument is necessary.
- transfer the files to Windows
- start ACL (alisp.exe) in the CafeOBJ source directory and type
:ld make-deliv
This will create the necessary files in
dist/cafeobj-N.M
but all the support files are missing.
- add the support files
best way is to use an SBCL build, remove the SBCL dump and add the files
from dist/cafeobj-N.M as above
- replace the binary
by default, the ACL created CafeOBJ.exe opens a dedicated Window for the
execution. If this is not acceptable (ie, this is what the CafeOBJ team
does during preparation of release packages):
Replace CafeOBJ.exe in dist/cafeobj-N.M
with buildi.exe from the respective ACL directory
This ensures that the interpreter is just opened in the current terminal
window.
building using SBCL on MacOS
----------------------------
homebrew's sbcl installs are now linked dynamically against libzstd from
homebrew, which makes it impossible to redistribute a CafeOBJ dump that
runs on MacOS systems without homebrew/zstd being installed.
To work around this, sbcl needs to be recompiled without
--with-sb-core-compression
by removing it from the `args` variable in the
[sbcl.rb](https://github.com/Homebrew/homebrew-core/blob/71faebdc06362578ff8d2a92974348da74d26c9a/Formula/s/sbcl.rb#L39C8-L39C34).
Save the modified `sbcl.rb` in a local directory, then run
```
brew remove sbcl
brew install ./sbcl.rb
```
which should create a sbcl version that has no dependency on homebrew.
After that, the usual `./configure --with-lisp=sbcl --enable-distribution`
works as expected, see next section.
Depending on the used hardware, this will give a X86_64 or Arm64 version.
On a modern Mac device, this will most likely be ARM.
To build SBCL and CafeOBJ for x86_84 Darwin, one can proceed as follow:
- install a x86_64 version of brew (this is independent from the ARM
version, which is installed in /opt/brew) by doing:
```
arch -x86_64 /bin/bash -c "$(curl fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
- add `/usr/local/bin` to the **front** of your `PATH`
```
export PATH=/usr/local/bin:$PATH
```
- check that `which brew` returns `/usr/local/bin/brew`
- run `brew install ./sbcl.rb` as above as well as the configure/make for CafeOBJ.
building for distribution
-------------------------
For the binary distributions there is a switch
./configure --enable-distribution
which builds all requested cafeobj/lisp combinations (see above) and
installs them into the prefix=./dist, followed by the necessary calls
to make-release-tarballs.
See above for getting release zips for Windows/sbcl
making a release
----------------
(tentative)
- update version number in
. configure.ac
. macport/ports/lang/cafeobj/Portfile
. doc/refman/reference-manual.md
- run autoreconf
- update the NEWS file
- commit the changes
- clean up the git repository (git status --ignored)
eg - but be careful, it removes ALL untracked files!
git clean -f -x
- build the source code tarball
. make-source-tarball
- build the binary packages:
. unpack the source tarball
. run (on 64bit and 32bit systems)
./configure --with-lisp=acl-standalone --enable-distribution
make
make distclean
./configure --with-lisp=sbcl --enable-distribution
make
make distclean
. for Windows/SBCL via wine
./configure --enable-windows --enable-distribution --enable-wine
make
. on Windows systems, one must drop the --enable-wine
- update the ports
. cd macport/ports && portindex
- upload all files to cafeobj.org/files/A.B.C/
- update the "Download" page on cafeobj.org
- prepare a release post
-- EOF