|
| 1 | +Algol-68RS Build Notes for Linux and macOS |
| 2 | +------------------------------------------ |
| 3 | + |
| 4 | +Linux |
| 5 | +----- |
| 6 | +Installation dependencies as documented in original 1.15 i386.deb Linux package and packages that provide them: |
| 7 | + |
| 8 | +fakeroot: fakeroot |
| 9 | +make: make |
| 10 | +ld, ar, ranlib: binutils |
| 11 | +gcc: gcc |
| 12 | +makeinfo, texindex: texinfo |
| 13 | +tex, texindex: texlive |
| 14 | +latex: texlive-latex-base |
| 15 | +install-info: install-info |
| 16 | +dpkg-buildpackage: dpkg-dev debhelper |
| 17 | +libc6-dev: linux-libc-dev |
| 18 | +info: info |
| 19 | +ldconfig, cp, mv, rm, find, sh, tar: <installed by default> |
| 20 | + |
| 21 | +Install these original dependencies: |
| 22 | + |
| 23 | +$ sudo apt install fakeroot make binutils gcc texinfo texlive texlive-latex-base install-info dpkg-dev debhelper linux-libc-dev info |
| 24 | +----- |
| 25 | + |
| 26 | +macOS |
| 27 | +----- |
| 28 | +The GitHub files contain already-processed documentation files, so it is not necessary to install the TeX packages. |
| 29 | +The build requires a C compiler. It has been tested with Xcode 12 (clang 12.0.5) with command-line tools installed. |
| 30 | +It should also work with homebrew installed gcc and libc6-dev |
| 31 | +----- |
| 32 | + |
| 33 | + |
| 34 | +To build, run |
| 35 | + |
| 36 | +$ export A68_NAMESEED=nameseed |
| 37 | +$ make dist-clean |
| 38 | +$ make |
| 39 | + |
| 40 | +This will make a first-stage algol68toc from already-translated .c files. |
| 41 | +To build a self-hosted compiler, use the first-stage compiler to translate the .a68 source files to new .c files |
| 42 | + |
| 43 | +$ make Translate |
| 44 | + |
| 45 | +Build a second-stage compiler from the .c files made from the first-stage compiler |
| 46 | +$ make dist-clean |
| 47 | +$ make |
| 48 | + |
| 49 | +The resulting algol68toc is a compiler built with sources it made for itself. |
| 50 | +For absolute assurance of self-hosting, you can translate and re-build again and verify output files are identical. |
| 51 | + |
| 52 | +To read generated documentation a dvi reader is needed, such as xdvi, installed with texlive |
| 53 | + |
| 54 | +Install the resulting complier, examples, documentation, utilities and libraries. |
| 55 | + |
| 56 | +$ sudo make install |
| 57 | + |
| 58 | +This install the following(*): |
| 59 | + |
| 60 | +/usr/share/algol68toc/Afirst.o |
| 61 | + a68config.m |
| 62 | + standard.m |
| 63 | + Algol68.mk |
| 64 | +/usr/share/doc/algol68toc/rscompiler.dvi.gz |
| 65 | + ctrans.dvi.gz |
| 66 | + compl.taylour |
| 67 | + star.txt |
| 68 | + pame/* |
| 69 | + lf.a68 |
| 70 | + test.lf |
| 71 | + algol68.ssh |
| 72 | + sheets.entry |
| 73 | + examples/* |
| 74 | +/usr/share/info/ctrans.info.gz |
| 75 | +/usr/share/man/man1/a68toc.1.gz |
| 76 | + ca.1.gz |
| 77 | + resetseed.1.gz |
| 78 | +/usr/share/applications/a68toc.desktop |
| 79 | +/usr/include/algol68/* |
| 80 | +/usr/lib/liba68.a |
| 81 | + liba68s.a |
| 82 | + liba68gc.a |
| 83 | +/usr/bin/a68toc |
| 84 | + resetseed |
| 85 | + ca |
| 86 | + |
| 87 | +(*) on macOS /usr/local/ is used in place of /usr |
| 88 | + |
| 89 | +Compile a test program with |
| 90 | + |
| 91 | +$ cd examples |
| 92 | +$ ca Abundant_odd_numbers.a68 |
| 93 | +$ ./Abundant_odd_numbers |
| 94 | + |
| 95 | +Building a Debian package on Linux |
| 96 | + |
| 97 | +compatability needs to be set to minimum of 10 in debian/compat |
| 98 | +architecture needs to be set to amd64 in debian/control |
| 99 | + |
| 100 | +$ dpkg-buildpackage -F |
| 101 | + |
| 102 | + |
| 103 | +NOTE |
| 104 | +---- |
| 105 | +The example programs server{1,2} and client{1,2} that communicate using sockets do not currently work, |
| 106 | +either in the original i386 build or the ported architectures. I haven't figured this out yet. |
| 107 | + |
| 108 | +Glyn Webster has kindly contributed: |
| 109 | + - An excellent example program that enumerates truth tables for boolean logic expression (examples/logic) |
| 110 | + - An example of building Algol68-RS libraries and using separate compilation (examples/tests), which includes |
| 111 | + - A usable approximation to C's sprintf in Algol-68 |
| 112 | + |
| 113 | + |
0 commit comments