/
BUILD.txt
110 lines (83 loc) · 3.06 KB
/
BUILD.txt
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
Algol-68RS Build Notes for Linux and macOS
------------------------------------------
Linux
-----
Installation dependencies as documented in original 1.15 i386.deb Linux package and packages that provide them:
fakeroot: fakeroot
make: make
ld, ar, ranlib: binutils
gcc: gcc
makeinfo, texindex: texinfo
tex, texindex: texlive texlive-extra-utils
latex: texlive-latex-base texlive-latex-extra
install-info: install-info
dpkg-buildpackage: dpkg-dev debhelper
libc6-dev: linux-libc-dev
info: info
ldconfig, cp, mv, rm, find, sh, tar: <installed by default>
Install these original dependencies:
$ sudo apt install fakeroot make binutils gcc texinfo texlive texlive-extra-utils texlive-latex-base texlive-latex-extra install-info dpkg-dev debhelper linux-libc-dev info
-----
macOS
-----
The GitHub files contain already-processed documentation files, so it is not necessary to install the TeX packages.
The build requires a C compiler. It has been tested with Xcode 12 (clang 12.0.5) with command-line tools installed.
It should also work with homebrew installed gcc and libc6-dev
-----
To build, run
$ export A68_NAMESEED=nameseed
$ make dist-clean
$ make
This will make a first-stage algol68toc from already-translated .c files.
To build a self-hosted compiler, use the first-stage compiler to translate the .a68 source files to new .c files
$ make Translate
Build a second-stage compiler from the .c files made from the first-stage compiler
$ make dist-clean
$ make
The resulting algol68toc is a compiler built with sources it made for itself.
For absolute assurance of self-hosting, you can translate and re-build again and verify output files are identical.
To read generated documentation a dvi reader is needed, such as xdvi, installed with texlive
Install the resulting complier, examples, documentation, utilities and libraries.
$ sudo make install
This install the following(*):
/usr/share/algol68toc/Afirst.o
a68config.m
standard.m
Algol68.mk
/usr/share/doc/algol68toc/rscompiler.dvi.gz
ctrans.dvi.gz
compl.taylour
star.txt
pame/*
lf.a68
test.lf
algol68.ssh
sheets.entry
examples/*
/usr/share/info/ctrans.info.gz
/usr/share/man/man1/a68toc.1.gz
ca.1.gz
resetseed.1.gz
/usr/share/applications/a68toc.desktop
/usr/include/algol68/*
/usr/lib/liba68.a
liba68s.a
liba68gc.a
/usr/bin/a68toc
resetseed
ca
(*) on macOS /usr/local/ is used in place of /usr
Compile a test program with
$ cd examples
$ ca Abundant_odd_numbers.a68
$ ./Abundant_odd_numbers
Building a Debian package on Linux
compatability needs to be set to minimum of 10 in debian/compat
architecture needs to be set to amd64 in debian/control
$ dpkg-buildpackage -F
NOTE
----
Glyn Webster has kindly contributed:
- An excellent example program that enumerates truth tables for boolean logic expression (examples/logic)
- An example of building Algol68-RS libraries and using separate compilation (examples/tests), which includes
- A usable approximation to C's sprintf in Algol-68