From 1c64adaad7ad89386ae9cb44c8e3050672a59d6e Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 13 Oct 2026 14:16:53 +0000 Subject: Build and package all language manuals with offline HTML links Co-Authored-By: Claude Fable 5.1 --- doc/build.md | 13 ++++++++----- doc/install.md | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/build.md b/doc/build.md index ce87eb6..ee335fd 100644 --- a/doc/build.md +++ b/doc/build.md @@ -185,7 +185,8 @@ export PATH="$PWD/build/deps/root/opt/llvm@18/bin:$PATH" ## Manual -The quick reference is in [cpsc.1.md](cpsc.1.md). Pandoc is required only for the +The command-line reference is in [cpsc.1.md](cpsc.1.md); the +[language overview](language/cpsc-language-overview.7.md) links to the syntax manuals. Pandoc is required only for the `doc`, installation and release targets. Recommended local downloads follow; an existing system Pandoc works with the same manual-generation command. @@ -224,11 +225,13 @@ cmake --build build --target doc ``` CMake selects local Pandoc first, sets its local runtime/data paths as needed, -and falls back to Pandoc in the system PATH. The output is `build/doc/cpsc.1` on -Unix and `build/doc/cpsc.html` on Windows. It is regenerated when the source or -downloaded packages change. +and falls back to Pandoc in the system PATH. The outputs are `build/doc/cpsc.1` and `build/doc/language/*.7` on Unix, +or `build/doc/cpsc.html` and `build/doc/language/*.html` on Windows. Each page +is regenerated when its source, rendering configuration or downloaded packages +change. New language pages are discovered automatically during the build. -On Unix, open it with `man ./build/doc/cpsc.1`. On Windows, open the standalone, +On Unix, open the command manual with `man ./build/doc/cpsc.1`, or a syntax +page with `man ./build/doc/language/cpsc-keyword-if.7`. On Windows, open the standalone, offline HTML from PowerShell: ```powershell diff --git a/doc/install.md b/doc/install.md index 8101684..ef4c3f6 100644 --- a/doc/install.md +++ b/doc/install.md @@ -43,7 +43,7 @@ make -C build release The output is `build/cpsc-VERSION-SYSTEM-ARCH.tar.xz`. `VERSION` uses HEAD's commit time in UTC followed by its short ID: `yyyy-mm-dd-hh-mm-ss-commit`. The version is read each time packaging runs. The package uses the current build's -execution mode and contains `cpsc`, `doc/cpsc.1`, `install.sh` and `LICENSE`. +execution mode and contains `cpsc`, `doc/cpsc.1`, `doc/language/*.7`, `install.sh` and `LICENSE`. Packaging builds the compiler and manual automatically; it requires Git and Pandoc. Use `EMBEDDED` when recipients should not need LLVM or `lli` at run time. @@ -96,7 +96,7 @@ cmake --build build --target release This is equivalent to `mingw32-make -C build release`. Windows produces `build/cpsc-VERSION-Windows-ARCH.zip`, using the same UTC commit version as Unix and retaining the configured execution mode. The ZIP contains `cpsc.exe`, -`doc/cpsc.html`, `install.ps1` and `LICENSE` under one top-level directory. +`doc/cpsc.html`, `doc/language/*.html`, `install.ps1` and `LICENSE` under one top-level directory. It uses CMake's default Deflate compression and needs no additional compression tool; packaging requires Git and Pandoc, just as on Unix. -- cgit v1.3.1-4-g156e