From 158865f10e81200f40b8f72bea1358ab8ee86128 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Mon, 28 Sep 2026 15:58:34 +0200 Subject: [PATCH] Copy generated documentation to the source doc directory in GNUmakefile --- AGENTS.md | 2 +- GNUmakefile | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index fa018762..c6e0753e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -80,7 +80,7 @@ SnapRAID is designed to recover from an interruption, including `SIGKILL`, at an - `Makefile.am`: Source file lists, dependencies, install hooks (including rules for generating documentation) - `uncrustify.cfg`: Code formatting rules for main application source files - `linux.cfg`: Code formatting rules for `raid/` directory and its subdirectories -- Run `(cd linux && make doc)` to regenerate all manual pages (`*.1`) and text manuals (`*.txt`) +- Run `make doc` to regenerate all manual pages (`*.1`) and text manuals (`*.txt`) - Always use parallel compilation with `make -j$(nproc)` instead of plain `make` - Create temporary files and directories under `/tmp/snapraid/`. - Both Linux and Windows builds are out-of-tree in dedicated subdirectories (`linux/` and `windows/`) in the project directory, keeping the root directory clean: diff --git a/GNUmakefile b/GNUmakefile index e84f6b87..a5c7768c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -6,9 +6,13 @@ ifeq ($(wildcard Makefile),Makefile) include Makefile else ifeq ($(wildcard linux/Makefile),linux/Makefile) -all doc: +all: $(MAKE) -C linux $@ +doc: + $(MAKE) -C linux $@ + cp -a linux/doc/*.1 linux/doc/*.txt doc/ + .DEFAULT: $(MAKE) -C linux $@