]> err.no Git - util-linux/commitdiff
setarch: generate groff links in a better way
authorKarel Zak <kzak@redhat.com>
Mon, 15 Oct 2007 11:41:18 +0000 (13:41 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 18 Oct 2007 12:59:23 +0000 (14:59 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/Makefile.am

index 898b9e65661ca90239fe303d93ee15be10fe44e9..4ef94d4d37ece82603f43546bcec1597983d37cb 100644 (file)
@@ -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