From ebfe9e19b4cd997b5fdf1817cedeaef918a0753f Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Mon, 12 Oct 2026 17:35:02 +0100 Subject: [PATCH] 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. --- diff --git a/Makefile b/Makefile index fa63342..e0b3cad 100644 --- a/Makefile +++ b/Makefile @@ -97,17 +97,21 @@ # raz and its library go together under $(PREFIX)/lib/raz; the link # on PATH works since raz finds lib/ beside its real path. The manual -# page goes where man looks, beside bin. +# pages go where man looks, beside bin. PREFIX = $(HOME)/.local +MAN = $(PREFIX)/share/man -install: raz +install: raz build/raz-lib.3 rm -rf $(PREFIX)/lib/raz - mkdir -p $(PREFIX)/lib/raz $(PREFIX)/bin $(PREFIX)/share/man/man1 + mkdir -p $(PREFIX)/lib/raz $(PREFIX)/bin $(MAN)/man1 $(MAN)/man3 $(MAN)/man7 cp -r raz lib $(PREFIX)/lib/raz ln -sf $(PREFIX)/lib/raz/raz $(PREFIX)/bin/raz - cp doc/raz.1 $(PREFIX)/share/man/man1/raz.1 + cp doc/raz.1 $(MAN)/man1/raz.1 + cp build/raz-lib.3 $(MAN)/man3/raz-lib.3 + cp doc/raz.7 doc/raz-tutorial.7 $(MAN)/man7 uninstall: - rm -rf $(PREFIX)/lib/raz $(PREFIX)/bin/raz $(PREFIX)/share/man/man1/raz.1 + rm -rf $(PREFIX)/lib/raz $(PREFIX)/bin/raz $(MAN)/man1/raz.1 $(MAN)/man3/raz-lib.3 \ + $(MAN)/man7/raz.7 $(MAN)/man7/raz-tutorial.7 .PHONY: units tests check gdb bench stress fmt loc man pdf clean install uninstall diff --git a/PLAN.md b/PLAN.md index c990708..4c01755 100644 --- a/PLAN.md +++ b/PLAN.md @@ -44,7 +44,7 @@ their order, the built-in procedures, the statements, what is checked, and the limits; each pointing to the report's section for the whole of it. About 400 lines. -4. **`raz(1)` again, and the pages together.** The command's page +4. Done: **`raz(1)` again, and the pages together.** The command's page points into the others; `make install` installs all four, and `make uninstall` removes them; README and `doc/compiler.md` name them; the desktop guide gets an entry for raz as one of our own diff --git a/README.md b/README.md index 2fcaeea..d146585 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ |---|---| | `doc/raz.md` | The language report: the definition of raz | | `doc/compiler.md` | A guide to reading the compiler, file by file | +| `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/` | | `src/` | The compiler, in Free Pascal | | `lib/` | The library, in raz; the compiler finds it beside itself | | `examples/` | Small programs, each with the output it should give | @@ -52,7 +53,8 @@ make # ./raz make install # ~/.local/bin/raz, its library in ~/.local/lib/raz, - # and its manual page, raz(1) + # and its manual pages, raz(1), raz(7), + # raz-tutorial(7) and raz-lib(3) make uninstall # removes them again Both take `PREFIX=/usr/local` (or another place) instead of `~/.local`. @@ -76,7 +78,9 @@ raz -h raz --version -`raz -h` says the options, and `man raz` says more. +`raz -h` says the options, and `man raz` says more. `man +raz-tutorial` is a tour of the language, `man 7 raz` the language at +a glance, and `man raz-lib` the library, made from its sources. `raz Main.raz` compiles module `Main` and every module it imports, and writes the executable `Main`. A module `Name` lives in `Name.raz`, found diff --git a/doc/compiler.md b/doc/compiler.md index 235fbbe..dd51ef9 100644 --- a/doc/compiler.md +++ b/doc/compiler.md @@ -4,7 +4,9 @@ This guide walks through them in the order they are best read: from the characters of a source file to the bytes of an executable. It assumes you know the language from `doc/raz.md`, and enough x86-64 to read a -disassembly. +disassembly. The manual pages say the rest: `raz(1)` the command, +`raz-tutorial(7)` and `raz(7)` the language, and `raz-lib(3)` the +library, made from `lib/` by `tools/Doc.raz`. | File | Lines | Code | What | |---|---|---|---| diff --git a/doc/raz.1 b/doc/raz.1 index e1f3913..d29811b 100644 --- a/doc/raz.1 +++ b/doc/raz.1 @@ -40,7 +40,9 @@ .Pa lib/ beside the .Nm -executable. +executable, whose modules +.Xr raz-lib 3 +says. A program has one module of each name: a module found in two of these places is an error, unless one of the files is a symbolic link to the other, which chooses it. @@ -148,9 +150,15 @@ raz -o prog Prog.raz && RAZ_PROFILE=1 ./prog .Ed .Sh SEE ALSO -.Xr gdb 1 ; -the language, +.Xr raz-lib 3 , +the library; +.Xr raz-tutorial 7 , +a tour of the language; +.Xr raz 7 , +the language at a glance; +.Xr gdb 1 . +The report, .Pa doc/raz.md , -and the guide to the compiler, +defines the language, and the guide to the compiler, .Pa doc/compiler.md , -in raz's sources. +walks through its sources.