summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2008-05-22 06:04:28 -0700
committerDan Nicholson <dbn.lists@gmail.com>2008-05-22 06:04:28 -0700
commite458c6e809cd2cf2112bbb885bec8d0b97af70a5 (patch)
tree1acf8c93d3287cf12865b3a8792f25f96321ccc9
parent6db906ca51cc13d752f0b7e3462fd372ef06a49f (diff)
Only create manpage symlinks when target pages have been installed
Instead of always creating the symlinks to pm-action.8, we first check that it's actually installed.
-rw-r--r--man/Makefile.am12
1 files changed, 7 insertions, 5 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
index def6850..925886a 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -26,11 +26,13 @@ MAINTAINERCLEANFILES = \
.xml.8:
$(XMLTO) man $?
-install-data-hook:
- -mkdir -p $(DESTDIR)$(mandir)/man8
- -ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/pm-suspend.8
- -ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/pm-hibernate.8
- -ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/pm-suspend-hybrid.8
+install-data-hook: install-man
+ @if test -f $(DESTDIR)$(mandir)/man8/pm-action.8; then \
+ for page in pm-suspend pm-hibernate pm-suspend-hybrid; do \
+ echo ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/$$page.8; \
+ ln -s pm-action.8 $(DESTDIR)$(mandir)/man8/$$page.8 || exit 1; \
+ done; \
+ fi
clean-local :
rm -f *~