The manual pages together raz(1) points to raz-lib(3), raz-tutorial(7) and raz(7); make install puts all four where man looks, and make uninstall takes them away; README and the guide to the compiler name them. The desktop guide has raz among our own tools.
| @@ -97,17 +97,21 @@ | ||
| 97 | 97 | |
| 98 | 98 | # raz and its library go together under $(PREFIX)/lib/raz; the link |
| 99 | 99 | # on PATH works since raz finds lib/ beside its real path. The manual |
| 100 | -# page goes where man looks, beside bin. | |
| 100 | +# pages go where man looks, beside bin. | |
| 101 | 101 | PREFIX = $(HOME)/.local |
| 102 | +MAN = $(PREFIX)/share/man | |
| 102 | 103 | |
| 103 | -install: raz | |
| 104 | +install: raz build/raz-lib.3 | |
| 104 | 105 | rm -rf $(PREFIX)/lib/raz |
| 105 | - mkdir -p $(PREFIX)/lib/raz $(PREFIX)/bin $(PREFIX)/share/man/man1 | |
| 106 | + mkdir -p $(PREFIX)/lib/raz $(PREFIX)/bin $(MAN)/man1 $(MAN)/man3 $(MAN)/man7 | |
| 106 | 107 | cp -r raz lib $(PREFIX)/lib/raz |
| 107 | 108 | ln -sf $(PREFIX)/lib/raz/raz $(PREFIX)/bin/raz |
| 108 | - cp doc/raz.1 $(PREFIX)/share/man/man1/raz.1 | |
| 109 | + cp doc/raz.1 $(MAN)/man1/raz.1 | |
| 110 | + cp build/raz-lib.3 $(MAN)/man3/raz-lib.3 | |
| 111 | + cp doc/raz.7 doc/raz-tutorial.7 $(MAN)/man7 | |
| 109 | 112 | |
| 110 | 113 | uninstall: |
| 111 | - rm -rf $(PREFIX)/lib/raz $(PREFIX)/bin/raz $(PREFIX)/share/man/man1/raz.1 | |
| 114 | + rm -rf $(PREFIX)/lib/raz $(PREFIX)/bin/raz $(MAN)/man1/raz.1 $(MAN)/man3/raz-lib.3 \ | |
| 115 | + $(MAN)/man7/raz.7 $(MAN)/man7/raz-tutorial.7 | |
| 112 | 116 | |
| 113 | 117 | .PHONY: units tests check gdb bench stress fmt loc man pdf clean install uninstall |
| @@ -44,7 +44,7 @@ | ||
| 44 | 44 | their order, the built-in procedures, the statements, what is |
| 45 | 45 | checked, and the limits; each pointing to the report's section for |
| 46 | 46 | the whole of it. About 400 lines. |
| 47 | -4. **`raz(1)` again, and the pages together.** The command's page | |
| 47 | +4. Done: **`raz(1)` again, and the pages together.** The command's page | |
| 48 | 48 | points into the others; `make install` installs all four, and |
| 49 | 49 | `make uninstall` removes them; README and `doc/compiler.md` name |
| 50 | 50 | them; the desktop guide gets an entry for raz as one of our own |
| @@ -35,6 +35,7 @@ | ||
| 35 | 35 | |---|---| |
| 36 | 36 | | `doc/raz.md` | The language report: the definition of raz | |
| 37 | 37 | | `doc/compiler.md` | A guide to reading the compiler, file by file | |
| 38 | +| `doc/raz.1`, `doc/raz.7`, `doc/raz-tutorial.7` | The manual pages: the command, the language at a glance, a tour; `make man` makes the library's, raz-lib(3), from `lib/` | | |
| 38 | 39 | | `src/` | The compiler, in Free Pascal | |
| 39 | 40 | | `lib/` | The library, in raz; the compiler finds it beside itself | |
| 40 | 41 | | `examples/` | Small programs, each with the output it should give | |
| @@ -52,7 +53,8 @@ | ||
| 52 | 53 | |
| 53 | 54 | make # ./raz |
| 54 | 55 | make install # ~/.local/bin/raz, its library in ~/.local/lib/raz, |
| 55 | - # and its manual page, raz(1) | |
| 56 | + # and its manual pages, raz(1), raz(7), | |
| 57 | + # raz-tutorial(7) and raz-lib(3) | |
| 56 | 58 | make uninstall # removes them again |
| 57 | 59 | |
| 58 | 60 | Both take `PREFIX=/usr/local` (or another place) instead of `~/.local`. |
| @@ -76,7 +78,9 @@ | ||
| 76 | 78 | raz -h |
| 77 | 79 | raz --version |
| 78 | 80 | |
| 79 | -`raz -h` says the options, and `man raz` says more. | |
| 81 | +`raz -h` says the options, and `man raz` says more. `man | |
| 82 | +raz-tutorial` is a tour of the language, `man 7 raz` the language at | |
| 83 | +a glance, and `man raz-lib` the library, made from its sources. | |
| 80 | 84 | |
| 81 | 85 | `raz Main.raz` compiles module `Main` and every module it imports, and |
| 82 | 86 | writes the executable `Main`. A module `Name` lives in `Name.raz`, found |
| @@ -4,7 +4,9 @@ | ||
| 4 | 4 | This guide walks through them in the order they are best read: from the |
| 5 | 5 | characters of a source file to the bytes of an executable. It assumes |
| 6 | 6 | you know the language from `doc/raz.md`, and enough x86-64 to read a |
| 7 | -disassembly. | |
| 7 | +disassembly. The manual pages say the rest: `raz(1)` the command, | |
| 8 | +`raz-tutorial(7)` and `raz(7)` the language, and `raz-lib(3)` the | |
| 9 | +library, made from `lib/` by `tools/Doc.raz`. | |
| 8 | 10 | |
| 9 | 11 | | File | Lines | Code | What | |
| 10 | 12 | |---|---|---|---| |
| @@ -40,7 +40,9 @@ | ||
| 40 | 40 | .Pa lib/ |
| 41 | 41 | beside the |
| 42 | 42 | .Nm |
| 43 | -executable. | |
| 43 | +executable, whose modules | |
| 44 | +.Xr raz-lib 3 | |
| 45 | +says. | |
| 44 | 46 | A program has one module of each name: a module found in two of these |
| 45 | 47 | places is an error, unless one of the files is a symbolic link to the |
| 46 | 48 | other, which chooses it. |
| @@ -148,9 +150,15 @@ | ||
| 148 | 150 | raz -o prog Prog.raz && RAZ_PROFILE=1 ./prog |
| 149 | 151 | .Ed |
| 150 | 152 | .Sh SEE ALSO |
| 151 | -.Xr gdb 1 ; | |
| 152 | -the language, | |
| 153 | +.Xr raz-lib 3 , | |
| 154 | +the library; | |
| 155 | +.Xr raz-tutorial 7 , | |
| 156 | +a tour of the language; | |
| 157 | +.Xr raz 7 , | |
| 158 | +the language at a glance; | |
| 159 | +.Xr gdb 1 . | |
| 160 | +The report, | |
| 153 | 161 | .Pa doc/raz.md , |
| 154 | -and the guide to the compiler, | |
| 162 | +defines the language, and the guide to the compiler, | |
| 155 | 163 | .Pa doc/compiler.md , |
| 156 | -in raz's sources. | |
| 164 | +walks through its sources. |