Copy generated documentation to the source doc directory in GNUmakefile

This commit is contained in:
Andrea Mazzoleni 2026-09-28 15:58:34 +02:00
parent aa8445e7a9
commit 158865f10e
2 changed files with 6 additions and 2 deletions

View file

@ -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:

View file

@ -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 $@