diff options
author | toonn <toonn@toonn.io> | 2019-10-19 12:50:39 +0200 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2019-10-19 12:50:39 +0200 |
commit | 0ca79709f21053090291d1c921d6a0b29f478e98 (patch) | |
tree | 2a5c0a3163d658769c2ad6815cac6a5cdd17ea4e /Makefile | |
parent | 59f5abb6ae2acaacee94730add3a870a7288b7e2 (diff) | |
download | ranger-0ca79709f21053090291d1c921d6a0b29f478e98.tar.gz |
Split PHONY man target into seperate real targets
Every time a manpage is updated both manpages are rebuilt using `make man`, this is annoying because you have to checkout the manpage that didn't change every time you do this. The new rules properly use `make`'s features to only rebuild a manpage *if* necessary.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Makefile b/Makefile index 7e2c62da..15dbb9db 100644 --- a/Makefile +++ b/Makefile @@ -125,11 +125,19 @@ test_other: test: test_py test_shellcheck @echo "Finished testing: All tests passed!" -man: - pod2man --stderr --center='ranger manual' --date='$(NAME)-$(VERSION)' \ - --release=$(shell date -u '+%Y-%m-%d') doc/ranger.pod doc/ranger.1 - pod2man --stderr --center='rifle manual' --date='$(NAME_RIFLE)-$(VERSION_RIFLE)' \ - --release=$(shell date -u '+%Y-%m-%d') doc/rifle.pod doc/rifle.1 +doc/ranger.1: doc/ranger.pod + pod2man --stderr --center='ranger manual' \ + --date='$(NAME)-$(VERSION)' \ + --release=$(shell date -u '+%Y-%m-%d') \ + doc/ranger.pod doc/ranger.1 + +doc/rifle.1: doc/rifle.pod + pod2man --stderr --center='rifle manual' \ + --date='$(NAME_RIFLE)-$(VERSION_RIFLE)' \ + --release=$(shell date -u '+%Y-%m-%d') \ + doc/rifle.pod doc/rifle.1 + +man: doc/ranger.1 doc/rifle.1 manhtml: pod2html doc/ranger.pod --outfile=doc/ranger.1.html |