-
Notifications
You must be signed in to change notification settings - Fork 3
/
INSTALL
190 lines (120 loc) · 5.43 KB
/
INSTALL
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
28oct17abu
(c) Software Lab. Alexander Burger
PicoLisp Installation
=====================
There is no 'configure' procedure, but the PicoLisp file structure is simple
enough to get along without it (we hope). It should compile and run on
GNU/Linux, FreeBSD, OpenBSD, and possibly other systems without problems.
PicoLisp supports two installation strategies: Local and Global.
The default (if you just download, unpack and compile the release) is a local
installation. It will not interfere in any way with the world outside its
directory. There is no need to touch any system locations, and you don't have to
be root to install it. Many different versions - or local modifications - of
PicoLisp can co-exist on a single machine.
For a global installation, allowing system-wide access to the executable and
library/documentation files, you can either install it from a ready-made
distribution, or set some symbolic links to one of the local installation
directories as described below.
Note that you are still free to have local installations along with a global
installation, and invoke them explicitly as desired.
Local Installation
------------------
1. Unpack the distribution
$ wget https://software-lab.de/picoLisp.tgz
$ tar xfz picoLisp.tgz
2. Change the directory
$ cd picoLisp
3. Compile the PicoLisp interpreter
$ (cd src; make)
or - if you have an arm64, x86-64 or ppc64 system under Linux, or a x86-64
system under FreeBSD, OpenBSD or SunOS - build the 64-bit version
$ (cd src64; make)
To use the 64-bit version also on systems which are not natively supported,
you can build the emulator
$ (cd src64; make emu)
Note that the emulator's execution speed is 10 to 20 times slower than the
native versions.
In all three cases (32-bits, 64-bits, or emulator), the executable
bin/picolisp will be created.
To build the 64-bit version the first time (bootstrapping), you have the
following three options:
- If a Java runtime system (version 1.6 or higher) is installed, it will
build right out of the box.
- Otherwise, download one of the pre-generated "*.s" file packages
- https://software-lab.de/arm64.linux.tgz
- https://software-lab.de/x86-64.linux.tgz
- https://software-lab.de/ppc64.linux.tgz
- https://software-lab.de/x86-64.freeBsd.tgz
- https://software-lab.de/x86-64.openBsd.tgz
- https://software-lab.de/x86-64.sunOs.tgz
- Else, build a 32-bit version first, and use the resulting bin/picolisp to
generate the "*.s" files:
$ (cd src; make)
$ (cd src64; make x86-64.linux)
After that, the 64-bit binary can be used to rebuild itself.
After a 64-bit build, the runtime tools - if needed - must be built
separately:
$ (cd src; make tools gate)
Note that on the BSD family of operating systems, 'gmake' must be used
instead of 'make'.
Global Installation
-------------------
The recommended way for a global installation is to use a picolisp package from
the OS distribution.
If that is not available, you can (as root) create symbolic links from /usr/lib
and /usr/bin to a local installation directory:
# ln -s /<installdir> /usr/local/lib/picolisp
# ln -s /usr/local/lib/picolisp/bin/picolisp /usr/local/bin
# ln -s /usr/local/lib/picolisp/bin/pil /usr/local/bin
For additional access to the man pages and some examples:
# ln -s /<installdir>/man/man1/picolisp.1 /usr/local/share/man/man1
# ln -s /<installdir>/man/man1/pil.1 /usr/local/share/man/man1
# ln -s /<installdir> /usr/local/share/picolisp
Invocation
----------
In a global installation, the 'pil' command should be used. You can either start
in plain or in debug mode. The difference is that for debug mode the command is
followed by single plus ('+') sign. The '+' must be the very last argument on
the command line.
$ pil # Plain mode
:
$ pil + # Debug mode
:
In both cases, the colon ':' is PicoLisp's prompt. You may enter some Lisp
expression,
: (+ 1 2 3)
-> 6
To exit the interpreter, enter
: (bye)
or just type Ctrl-D.
For a local invocation, specify a path name, e.g.
$ ./pil # Plain mode
:
$ ./pil + # Debug mode
:
or
$ /home/app/pil # Invoking a local installation from some other directory
Note that 'pil' can also serve as a template for your own stand-alone scripts.
If you just want to test the ready-to-run Ersatz PicoLisp (it needs a Java
runtime system), use
$ ersatz/pil +
:
instead of './pil +'.
Documentation
-------------
For further information, please look at "doc/index.html". There you find the
PicoLisp Reference Manual ("doc/ref.html"), the PicoLisp tutorials
("doc/tut.html", "doc/app.html", "doc/select.html" and "doc/native.html"), and
the frequently asked questions ("doc/faq.html").
For details about the 64-bit version, refer to "doc64/README", "doc64/asm" and
"doc64/structures".
As always, the most accurate and complete documentation is the source code ;-)
Included in the distribution are many utilities and pet projects, including
tests, demo databases and servers, games (chess, minesweeper), and more.
Any feedback is welcome!
Hope you enjoy :-)
--------------------------------------------------------------------------------
Alexander Burger
Software Lab. / 7fach GmbH
Bahnhofstr. 24a, D-86462 Langweid
abu@software-lab.de, https://www.software-lab.de, +49 8230 5060