From: Loup Vaillant Date: Sun, 26 Feb 2023 10:10:48 +0000 (+0100) Subject: Generate docks with `make all` X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=420a52830c33eac11bedde779d6e44debe9d0ff3;p=Monocypher.git Generate docks with `make all` That way the docs no longer have to belong to root when we generate them. Some more dist.sh shenanigans were required to spare tarball users the mandoc dependency. Mostly making sure their doc is not deleted when they `make clean`. --- diff --git a/dist.sh b/dist.sh index c8f3615..d85c07d 100755 --- a/dist.sh +++ b/dist.sh @@ -74,8 +74,10 @@ find $FOLDER -type f -exec sed -i "s/__git__/$VERSION/g" \{\} \; # Remove the dist target from the makefile (no recursive releases!), # and the tests/vector.h target, which ships with the tarball. -sed -i '/# Remove lines below for the tarball/,$d' $FOLDER/makefile -sed -i 's/clean uninstall dist/clean uninstall/' $FOLDER/makefile +sed -i '/# Remove lines below for the tarball/,$d' $FOLDER/makefile +sed -i 's/clean uninstall dist/clean uninstall/' $FOLDER/makefile +sed -i 's| doc/man3/intro.3monocypher||' $FOLDER/makefile +sed -i 's|rm -rf lib/ doc/html/ doc/man3/|rm -rf lib/|' $FOLDER/makefile # Remove contributor notes from the README sed -e '/Contributor notes/,$d' \ diff --git a/dist_ignore b/dist_ignore index 931556f..2be2413 100644 --- a/dist_ignore +++ b/dist_ignore @@ -33,6 +33,5 @@ lib* dist.sh dist_ignore tests/gen* -doc/*.sh tis.config tests/tis-ci-gen-config.sh diff --git a/makefile b/makefile index b86bbc8..5651c24 100644 --- a/makefile +++ b/makefile @@ -70,7 +70,7 @@ SONAME=libmonocypher.so.3 ################## ## Main targets ## ################## -all : library +all : library doc/man3/intro.3monocypher check: test test: test.out @@ -83,7 +83,7 @@ ctgrind: ctgrind.out valgrind ./ctgrind.out clean: - rm -rf lib/ + rm -rf lib/ doc/html/ doc/man3/ rm -f *.out ############# @@ -99,8 +99,7 @@ install: library src/monocypher.h monocypher.pc install-doc sed "s|PREFIX|$(PREFIX)|" monocypher.pc \ > $(DESTDIR)/$(PKGCONFIGDIR)/monocypher.pc -install-doc: - doc/doc_gen.sh +install-doc: doc/man3/intro.3monocypher mkdir -p $(DESTDIR)/$(MANDIR) cp -PR doc/man3/*.3monocypher $(DESTDIR)/$(MANDIR) @@ -194,5 +193,15 @@ tests/vectors.h: @echo "" exit 1 +doc/man3/intro.3monocypher: \ + doc/crypto_aead_lock.3monocypher doc/crypto_argon2.3monocypher \ + doc/crypto_blake2b.3monocypher doc/crypto_chacha20_djb.3monocypher \ + doc/crypto_ed25519_sign.3monocypher doc/crypto_eddsa_sign.3monocypher \ + doc/crypto_elligator_map.3monocypher doc/crypto_poly1305.3monocypher \ + doc/crypto_sha512.3monocypher doc/crypto_verify16.3monocypher \ + doc/crypto_wipe.3monocypher doc/crypto_x25519.3monocypher \ + doc/intro.3monocypher + doc/doc_gen.sh + dist: tests/vectors.h ./dist.sh