]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/commitdiff
Added target manpage to Makefile
authorsomers-all-the-time <nsomers97@gmail.com>
Sat, 19 Jan 2019 19:38:25 +0000 (13:38 -0600)
committersomers-all-the-time <nsomers97@gmail.com>
Sat, 19 Jan 2019 19:38:25 +0000 (13:38 -0600)
Makefile

index 87b1b4dd0a9ac434d39e496bea4b826bc7a2205f..872c4cc2c9e4bd9626ddc1483395d5e40f5a2a74 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -121,6 +121,18 @@ uninstall_udev:
        $(if $(UDEV_RULES_DIR),,$(error UDEV_RULES_DIR is not defined))
        rm -f ${DESTDIR}/${UDEV_RULES_DIR}/40-monitor-hotplug.rules
 
+# Rules for manpage
+MANPAGES_DIR:=/usr/share/man/man1
+DEFAULT_TARGETS+=manpage
+
+install_manpage:
+       mkdir -p ${MANPAGES_DIR}
+       cp autorandr.1 ${MANPAGES_DIR}
+       mandb -qp
+
+uninstall_manpage:
+       rm -f ${MANPAGES_DIR}/autorandr.1
+       mandb -q
 
 TARGETS=$(DEFAULT_TARGETS)
 install: $(patsubst %,install_%,$(TARGETS))