--- ./Makefile.orig 2014-02-19 12:33:07.233262579 +0100 +++ ./Makefile 2014-02-19 12:33:45.211272300 +0100 @@ -6,7 +6,7 @@ EXE= xmake PREFIX ?= /usr/local IBDIR= $(PREFIX)/bin -IMDIR= $(PREFIX)/man/man1 +IMDIR= $(MANPREFIX)/man/man1 BSD_INSTALL_PROGRAM ?= install -c -s -m 755 BSD_INSTALL_MAN ?= install -c -m 644 @@ -19,6 +19,6 @@ rm -f $(OBJS) $(EXE) install: all - $(BSD_INSTALL_PROGRAM) $(EXE) $(IBDIR)/$(EXE) - $(BSD_INSTALL_MAN) ${.CURDIR}/xmake.1 $(IMDIR)/xmake.1 + $(BSD_INSTALL_PROGRAM) $(EXE) $(DESTDIR)$(IBDIR)/$(EXE) + $(BSD_INSTALL_MAN) ${.CURDIR}/xmake.1 $(DESTDIR)$(IMDIR)/xmake.1