summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-04-05 11:26:26 -0400
committerThomas Haller <thaller@redhat.com>2016-04-05 18:15:38 +0200
commitc976f983eb04bfe7705cbbc38d8a37b172f564b8 (patch)
tree50af56e8dec1461600ec3af64cf06d5e4cb4c547
parent9a68f12737201e8dd11715fc1078c444a3887a16 (diff)
downloadNetworkManager-c976f983eb04bfe7705cbbc38d8a37b172f564b8.tar.gz
build: make man page hardlinks conditional on having man pages
Otherwise we fail since they don't exist. We have to carefully implement an "or" condition for the cases of having prebuilt manpages in a tarball, vs actually building them from source.
-rw-r--r--man/Makefile.am37
1 files changed, 25 insertions, 12 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
index fafc6852f4..ce84194cd6 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -91,21 +91,34 @@ EXTRA_DIST += \
nmtui_links = nmtui-edit nmtui-connect nmtui-hostname
NetworkManager_conf_links = nm-system-settings.conf
+# Implement a || condition
+if INSTALL_PREGEN_MANPAGES
+install_manpages = true
+else
+if ENABLE_GTK_DOC
+install_manpages = true
+endif
+endif
+
install-data-hook:
- for link in $(nmtui_links); do \
- ln -f $(DESTDIR)$(mandir)/man1/nmtui.1 $(DESTDIR)$(mandir)/man1/$$link.1; \
- done
- for link in $(NetworkManager_conf_links); do \
- ln -f $(DESTDIR)$(mandir)/man5/NetworkManager.conf.5 $(DESTDIR)$(mandir)/man5/$$link.5; \
- done
+ 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; \
+ for link in $(NetworkManager_conf_links); do \
+ ln -f $(DESTDIR)$(mandir)/man5/NetworkManager.conf.5 $(DESTDIR)$(mandir)/man5/$$link.5; \
+ done; \
+ fi
uninstall-hook:
- for link in $(nmtui_links); do \
- rm -f $(DESTDIR)$(mandir)/man1/$$link.1; \
- done
- for link in $(NetworkManager_conf_links); do \
- rm -f $(DESTDIR)$(mandir)/man5/$$link.5; \
- done
+ if test -n "$(install_manpages)"; then \
+ for link in $(nmtui_links); do \
+ rm -f $(DESTDIR)$(mandir)/man1/$$link.1; \
+ done; \
+ for link in $(NetworkManager_conf_links); do \
+ rm -f $(DESTDIR)$(mandir)/man5/$$link.5; \
+ done; \
+ fi
if ENABLE_GTK_DOC
man_MANS += $(man_pages)