]> git.codecow.com Git - Monocypher.git/commitdiff
makefile: fix install-doc
authorFabio Scotoni <34964387+fscoto@users.noreply.github.com>
Sat, 25 Feb 2023 09:59:41 +0000 (10:59 +0100)
committerLoup Vaillant <github-is-valid@loup-vaillant.fr>
Sat, 25 Feb 2023 12:42:46 +0000 (13:42 +0100)
During the documentation overhaul in
85a7c3742f06ab55fdf523a7a6a9cfe5cda09837,
generating the man page symlinks was automated
(introduction of doc/gen_doc.sh, now called doc/doc_gen.sh).

However, the install-doc target of the makefile fails to account for
the source folder not necessarily existing.
This change runs doc/doc_gen.sh before attempting to install
the man pages.

This has the questionable side effect of creating a folder as root and
creating a bunch of files as root (including the HTML files,
i.e. running mandoc as root) when doing sudo make install,
but the average user will "just" install and forget about it anyway.

makefile

index 2a782181c695f63d532d1db375bf7e15595383bf..b86bbc84ce6e5714702c059f55a5bd7766dc5281 100644 (file)
--- a/makefile
+++ b/makefile
@@ -100,6 +100,7 @@ install: library src/monocypher.h monocypher.pc install-doc
             > $(DESTDIR)/$(PKGCONFIGDIR)/monocypher.pc
 
 install-doc:
+       doc/doc_gen.sh
        mkdir -p $(DESTDIR)/$(MANDIR)
        cp -PR doc/man3/*.3monocypher $(DESTDIR)/$(MANDIR)