Skip to content

Commit 73cf279

Browse files
committed
Formatting README.md and HACKING.md
1 parent 615ebdc commit 73cf279

File tree

2 files changed

+81
-50
lines changed

2 files changed

+81
-50
lines changed

HACKING renamed to HACKING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ you run the command.
116116
- SpecialCasing.txt
117117
- UnicodeData.txt
118118
- WordBreakProperty.txt
119+
- emoji-data.txt
119120

120121
Above Unicode files can be downloaded from the Unicode FTP site:
121122
[ftp.unicode.org](ftp://ftp.unicode.org/Public/17.0.0/). Currently,

README.md

Lines changed: 80 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
[![Sagittarius CI](https://github.com/ktakashi/sagittarius-scheme/actions/workflows/ci.yml/badge.svg)](https://github.com/ktakashi/sagittarius-scheme/actions/workflows/ci.yml)
44
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/ktakashi/sagittarius-scheme/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/ktakashi/sagittarius-scheme/tree/master)
55

6-
# What is this?
7-
8-
This is a free Scheme implementation, supporting R6RS and R7RS
9-
specification.
6+
This is a Scheme implementation, supporting R6RS and R7RS specification.
107

118
# How to build and install?
129

@@ -25,9 +22,11 @@ install to default location, run the following commands in the
2522
directory where all distributed files are expanded (c.f. By default
2623
it'd be `sagittarius-X.X.X`, `X.X.X` is the version you downloaded):
2724

28-
% cmake .
29-
% make
30-
% make install
25+
```shell
26+
cmake .
27+
make
28+
make install
29+
```
3130

3231
Following sections describes more details.
3332

@@ -43,7 +42,9 @@ Sagittarius depends on the following libraries.
4342
If you are using Linux which supports `apt`, then you can simply
4443
execute the following command:
4544

46-
% apt install libgc-dev, zlib1g-dev libffi-dev libssl-dev libpam0g-dev
45+
```shell
46+
apt install libgc-dev, zlib1g-dev libffi-dev libssl-dev libpam0g-dev
47+
```
4748

4849
### Manual installation of Boehm GC
4950

@@ -55,12 +56,14 @@ If you are too lazy to download the archive file of GC, CMake will
5556
download it for you. Make sure to run the following commands from in
5657
GC directory:
5758

58-
% ./configure \
59-
--enable-threads=pthreads \
60-
--enable-parallel-mark \
61-
--enable-large-config
62-
% make
63-
% make install
59+
```shell
60+
./configure \
61+
--enable-threads=pthreads \
62+
--enable-parallel-mark \
63+
--enable-large-config
64+
make
65+
make install
66+
```
6467

6568
Note: most of the Linux distributions already have Boehm GC in their
6669
package management system, such as `apt-get`. I recommend to use it
@@ -71,36 +74,46 @@ for security reason.
7174
After installing CMake and dependent libraries, you are ready to build
7275
Sagittarius; type the following command:
7376

74-
% cmake .
77+
```shell
78+
cmake .
79+
```
7580

7681
Note: The above command assumes you are in the source directory.
7782

7883
It is possible to build Sagittarius in a directory that is not the top
7984
source directory of the distributed package (out-of-tree building);
8085
for example:
8186

82-
% mkdir build
83-
% cd build
84-
% cmake ${path to Sagittarius' source directory}
85-
% make
87+
```shell
88+
mkdir build
89+
cd build
90+
cmake ${path to Sagittarius' source directory}
91+
make
92+
```
8693
8794
To run the tests, specify `test` target.
8895
89-
% make test
96+
```shell
97+
make test
98+
```
9099
91100
Or, alternatively, you can also use `ctest`. This is convenient to
92101
test individual tests.
93102
94103
To install Sagittarius non default location, you need to specify
95104
`CMAKE_INSTALL_PREFIX` variable.
96105
97-
% cmake . -DCMAKE_INSTALL_PREFIX=/path/to/install
106+
```shell
107+
cmake . -DCMAKE_INSTALL_PREFIX=/path/to/install
108+
```
98109
99110
On some environment, there are 64 bits runtime specific directories
100111
such as `lib64`. To install Sagittarius runtime in the directory, then
101112
you can specify `LIB_DIR` variable as the following:
102113
103-
% cmake . -DLIB_DIR=lib64
114+
```shell
115+
cmake . -DLIB_DIR=lib64
116+
```
104117
105118
Then the runtime install directoy will be
106119
`CMAKE_INSTALL_PREFIX/LIB_DIR`. There are also the variables to
@@ -112,23 +125,29 @@ Since 0.5.6, Sagittarius's REPL is renamed to `sagittarius` and legacy
112125
`sash` is kept as a symbolic link. If you don't need the symbolic link
113126
then you can put the `INSTALL_SYMLINK` option off as the following:
114127
115-
% cmake . -DINSTALL_SYMLINK=0
128+
```shell
129+
cmake . -DINSTALL_SYMLINK=0
130+
```
116131
117132
After a successful compilation, it is possible to install Sagittarius
118133
to the location specified by `CMAKE_INSTALL_PREFIX` or default system
119134
location if it's not specified with the command:
120135
121-
% make install
136+
```shell
137+
make install
138+
```
122139
123140
After installation, you might need to run `ldconfig` to run
124141
Sagittarius properly.
125142
126143
Note: For some reason, you might want to build a 32-bit runtime on a
127144
64-bit platform. The following command can be used for this purpose;
128145
129-
% cmake . \
130-
-DCMAKE_CXX_COMPILER=${your 32 bit C++ compiler} \
131-
-DCMAKE_C_COMPILER={your 32 bit C compiler}
146+
```shell
147+
cmake . \
148+
-DCMAKE_CXX_COMPILER=${your 32 bit C++ compiler} \
149+
-DCMAKE_C_COMPILER={your 32 bit C compiler}
150+
```
132151

133152
Make sure you have all the required 32-bit executables and libraries.
134153

@@ -137,22 +156,28 @@ Make sure you have all the required 32-bit executables and libraries.
137156
Only with Homebrew is tested. A user can install sagittarius directly with
138157
homebrew, via
139158

140-
$ brew install sagittarius-scheme
159+
```shell
160+
brew install sagittarius-scheme
161+
```
141162

142163
Alternately, the user can install the following dependencies and then make
143164
sagittarius locally.
144165

145166
Installing libffi, CMake, Boehm GC and OpenSSL.
146167

147-
$ brew install libffi cmake bdw-gc openssl
168+
```shell
169+
brew install libffi cmake bdw-gc openssl
170+
```
148171

149172
After installing dependent libraries, the rest of the process are the same
150173
as Unix-like environment.
151174

152175
If `cmake` can't find `libffi`, then you can specify the location via
153176
`FFI_LIBRARY_DIR` option like the following.
154177

155-
$ cmake . -DFFI_LIBRARY_DIR=/opt/homebrew/Cellar/libffi/3.4.6/lib
178+
```shell
179+
cmake . -DFFI_LIBRARY_DIR=/opt/homebrew/Cellar/libffi/3.4.6/lib
180+
```
156181

157182
Note: some Mac OS X environment may not be able to find `ar` command
158183
because `/usr/bin/gcc` is identical as `/usr/bin/clang`. In that case,
@@ -190,22 +215,31 @@ innosetup for it. Please install it.
190215

191216
- [Inno Setup](http://www.jrsoftware.org/)
192217

193-
You need to install MSVC preferably Visual Studio 2010 or higher. And
194-
if you use `cmake-gui`, it will be much easier. Run `Visual Studio
195-
Command Prompt` and go to the directory which Sagittarius source codes
196-
are expanded.
218+
You need to install MSVC preferably Visual Studio 2010 or higher. Run
219+
`Visual Studio Command Prompt` and go to the directory which Sagittarius
220+
source codes are expanded.
197221

198-
If you prefer to use `cmake` instead of `cmake-gui`, then the
199-
following command needs to be executed:
222+
### For NMake
200223

201-
% cmake . -G"NMake Makefiles"
224+
```bat
225+
cmake . -G"NMake Makefiles"
226+
nmake
227+
nmake test
228+
```
202229

203-
Specifying `-DDEBUG_VERSION=OFF` enables MSVC optimisations.
230+
### For Ninja
204231

205-
The final commands are almost the same as in Unix-like environments.
232+
```bat
233+
cmake . -G"Ninja"
234+
ninja
235+
```
206236

207-
% nmake
208-
% nmake test
237+
For Ninja, you can build with multiple processor by specifying `-j` option.
238+
For example:
239+
```bat
240+
rem This build Sagittarius with 8 processes
241+
ninja -j8
242+
```
209243

210244
After these commands, you move to the `win/` directory and double
211245
click the file `innosetup.iss`. Go to [Build] - [Compile], then it
@@ -218,15 +252,11 @@ Experimentally, we support other build tools. Below are the supported ones:
218252

219253
- MSBuild
220254
```bat
221-
% cmake .
222-
% msbuild /p:Configuration=Release Sagittarius.sln
223-
```
224-
- Ninja
225-
```bat
226-
% cmake . -G"Ninja"
227-
% ninja
255+
cmake .
256+
msbuild /p:Configuration=Release Sagittarius.sln
228257
```
229258

259+
230260
### Supporting platform
231261

232262
| OS | x86 | amd64 | ARM64 | ARM | ppc64le |
@@ -248,7 +278,7 @@ you can use `ctest` command. For example, the below command shows the output
248278
of the test execution when the test failed.
249279

250280
```shell
251-
% ctest --output-on-failure
281+
ctest --output-on-failure
252282
```
253283

254284
For more options, please refer the official document of the
@@ -268,7 +298,7 @@ Or you can report it on Google group.
268298

269299
# How to develop it?
270300

271-
See HACKING file.
301+
See [HACKING.md](HACKING.md) file.
272302

273303
<!-- end of file
274304
Local Variables:

0 commit comments

Comments
 (0)