diff options
Diffstat (limited to 'man')
-rw-r--r-- | man/Makefile.in | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/man/Makefile.in b/man/Makefile.in index 45059ca..4da185d 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -34,25 +34,27 @@ all: $(OBJS) $(OBJS): @printf ' CP man/%s\n' '$@' - @cp $(SRCDIR)/man/$@ man/$@ + @cp $(SRCDIR)/man/$@ $@ .PHONY: clean clean: - @ for obj in $(OBJS); do \ - printf ' RM man/%s\n' "\${obj}"; \ - rm -f man/\${obj}; \ - done + @for obj in $(OBJS); do \ + printf ' RM man/%s\n' "$${obj}"; \ + rm -f $${obj}; \ + done .PHONY: install install: all - @ for obj in $(OBJS); do \ - printf ' INSTALL man/%s\n' "\${obj}"; \ - $(INSTALL) -D man/\${obj} "$(DESTDIR)/$(MANDIR)"; \ - done + @for obj in $(OBJS); do \ + printf ' INSTALL man/%s\n' "$${obj}"; \ + section=$$(echo "$${obj}" | sed 's/^.*[.]\([0-9]\)$$/\1/'); \ + $(INSTALL) -D $${obj} "$(DESTDIR)/$(MANDIR)/man$${section}/$${obj}"; \ + done .PHONY: uninstall uninstall: - @ for obj in $(OBJ); do \ - printf ' RM %s\n' "\${obj}"; \ - rm -f "$(DESTDIR)/$(MANDIR)/\${obj}"; \ - done + @for obj in $(OBJ); do \ + printf ' RM %s\n' "$${obj}"; \ + section=$$(echo "$${obj}" | sed 's/^.*[.]\([0-9]\)$$/\1/'); \ + rm -f "$(DESTDIR)/$(MANDIR)/man$${section}/$${obj}"; \ + done |