From 84a1b443d77f4fcb91335ea9acc602e1c6b7471e Mon Sep 17 00:00:00 2001 From: Codex Date: Tue, 8 Sep 2026 09:24:20 +0100 Subject: [PATCH] docs: Build the manual from the current checkout Use the checkout's PackageInfo.g and documentation directory so an installed copy of Digraphs cannot redirect manual generation away from the checkout. AI disclosure: OpenAI Codex diagnosed the failure, implemented the fix, and verified the documentation build. Co-authored-by: Codex --- makedoc.g | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/makedoc.g b/makedoc.g index 5af5973b9..104b14135 100644 --- a/makedoc.g +++ b/makedoc.g @@ -41,7 +41,8 @@ XMLEntities := rec(); # Programmatically determined entities -PkgInfo := PackageInfo("digraphs")[1]; +Read("PackageInfo.g"); +PkgInfo := GAPInfo.PackageInfoCurrent; XMLEntities.VERSION := PkgInfo.Version; XMLEntities.GAPVERS := RemovePrefixVersion(PkgInfo.Dependencies.GAP); @@ -55,7 +56,7 @@ od; XMLEntities.ARCHIVE_BASENAME := Last(SplitString(PkgInfo.ArchiveURL, "/")); XMLEntities.ARCHIVENAME := Concatenation(XMLEntities.ARCHIVE_BASENAME, PkgInfo.ArchiveFormats); -XMLEntities.DIGRAPHS := PackageEntity("Digraphs"); +XMLEntities.DIGRAPHS := UrlEntity(PkgInfo.PackageName, PkgInfo.PackageWWWHome); for Pkg in Concatenation(PkgInfo.Dependencies.NeededOtherPackages, PkgInfo.Dependencies.SuggestedOtherPackages) do @@ -65,7 +66,7 @@ od; # The files containing the xml of the doc -DocDir := DirectoriesPackageLibrary("digraphs", "doc")[1]; +DocDir := Directory("doc"); Files := Filtered(DirectoryContents(DocDir), x -> (not StartsWith(x, ".")) and (not StartsWith(x, "z-")) @@ -120,7 +121,7 @@ with the square in the first rank and file being dark.

"""; # The actual call to AutoDoc -AutoDoc("digraphs", rec( +AutoDoc(DirectoryCurrent(), rec( autodoc := rec(scan_dirs := []), gapdoc := rec( LaTeXOptions := rec(EarlyExtraPreamble := """