From: Karel Zak Date: Mon, 15 Oct 2007 11:41:18 +0000 (+0200) Subject: setarch: generate groff links in a better way X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30c3cb74c927e2106e6792946298d1ee5a7de523;p=util-linux setarch: generate groff links in a better way Signed-off-by: Karel Zak --- diff --git a/sys-utils/Makefile.am b/sys-utils/Makefile.am index 898b9e65..4ef94d4d 100644 --- a/sys-utils/Makefile.am +++ b/sys-utils/Makefile.am @@ -69,6 +69,13 @@ if ARCH_HPPA SETARCH_LINKS += parisc parisc64 parisc32 endif +SETARCH_MAN_LINKS = $(addsuffix .8, $(SETARCH_LINKS)) +man_MANS += $(SETARCH_MAN_LINKS) +CLEANFILES=$(SETARCH_MAN_LINKS) + +$(SETARCH_MAN_LINKS): setarch.8 + echo ".so setarch.8" > $@ + install-exec-hook: for I in $(RDEV_LINKS); do \ cd $(DESTDIR)$(usrsbinexecdir) && ln -sf rdev $$I ; \ @@ -76,7 +83,12 @@ install-exec-hook: for I in $(SETARCH_LINKS); do \ cd $(DESTDIR)$(usrbinexecdir) && ln -sf setarch $$I ; \ done + +uninstall-hook: + for I in $(RDEV_LINKS); do \ + rm -f $(DESTDIR)$(usrbinexecdir)/$$I ; \ + done for I in $(SETARCH_LINKS); do \ - echo ".so setarch.8" > $(DESTDIR)$(man8dir)/$$I.8 ; \ - done + rm -f $(DESTDIR)$(usrbinexecdir)/$$I ; \ + done