From 0769a52f053c5abe6b180a229bc9ebc982f77ec9 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 14 Feb 2017 00:17:32 +0100 Subject: [PATCH] build: simplify (un)install hooks for man pages --- Makefile.am | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/Makefile.am b/Makefile.am index b1ed2ad40a..2c0c5661d7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4001,30 +4001,27 @@ EXTRA_DIST += \ $(man_pages_autogen) +if HAVE_DOCS + install-data-hook-man: - if test -n "$(install_manpages)"; then \ - for link in $(nmtui_links); do \ - ln -f $(DESTDIR)$(mandir)/man1/nmtui.1 $(DESTDIR)$(mandir)/man1/$$link.1; \ - done; \ - ln -f $(DESTDIR)$(mandir)/man5/NetworkManager.conf.5 $(DESTDIR)$(mandir)/man5/nm-system-settings.conf.5; \ - fi + for link in $(nmtui_links); do \ + ln -f $(DESTDIR)$(mandir)/man1/nmtui.1 $(DESTDIR)$(mandir)/man1/$$link.1; \ + done; \ + ln -f $(DESTDIR)$(mandir)/man5/NetworkManager.conf.5 $(DESTDIR)$(mandir)/man5/nm-system-settings.conf.5; install_data_hook += install-data-hook-man uninstall-hook-man: - if test -n "$(install_manpages)"; then \ - for link in $(nmtui_links); do \ - rm -f $(DESTDIR)$(mandir)/man1/$$link.1; \ - done; \ - rm -f $(DESTDIR)$(mandir)/man5/nm-system-settings.conf.5; \ - fi + for link in $(nmtui_links); do \ + rm -f $(DESTDIR)$(mandir)/man1/$$link.1; \ + done; \ + rm -f $(DESTDIR)$(mandir)/man5/nm-system-settings.conf.5; uninstall_hook += uninstall-hook-man -if HAVE_DOCS -install_manpages = true man_MANS += $(man_pages) man_MANS += $(man_pages_autogen) + endif if BUILD_DOCS