From 30c3cb74c927e2106e6792946298d1ee5a7de523 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 15 Oct 2007 13:41:18 +0200 Subject: [PATCH] setarch: generate groff links in a better way Signed-off-by: Karel Zak --- sys-utils/Makefile.am | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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 -- 2.39.5