mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 19:30:37 +01:00
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.
This commit is contained in:
parent
9a68f12737
commit
c976f983eb
1 changed files with 25 additions and 12 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue