]> err.no Git - moreutils/commitdiff
Support installing moreutils into prefixes other than /usr
authorEvan Broder <broder@MIT.EDU>
Tue, 28 Oct 2008 01:58:48 +0000 (21:58 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 28 Oct 2008 02:40:44 +0000 (22:40 -0400)
Makefile

index b0595c417e33a8115ed8e2f62e50e9762d5cede7..2cf8d538dbb35fe88217a41728a7da28c15ecbea 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ PERLSCRIPTS=vidir vipe ts combine zrun
 MANS=sponge.1 vidir.1 vipe.1 isutf8.1 ts.1 combine.1 ifdata.1 ifne.1 pee.1 zrun.1 mispipe.1 lckdo.1
 CFLAGS=-O2 -g -Wall
 INSTALL_BIN?=install -s
+PREFIX=/usr
 
 DOCBOOK2XMAN="docbook2x-man"
 
@@ -12,12 +13,12 @@ clean:
        rm -f $(BINS) $(MANS)
 
 install:
-       mkdir -p $(DESTDIR)/usr/bin
-       $(INSTALL_BIN) $(BINS) $(DESTDIR)/usr/bin
-       install $(PERLSCRIPTS) $(DESTDIR)/usr/bin
+       mkdir -p $(DESTDIR)$(PREFIX)/bin
+       $(INSTALL_BIN) $(BINS) $(DESTDIR)$(PREFIX)/bin
+       install $(PERLSCRIPTS) $(DESTDIR)$(PREFIX)/bin
        
-       mkdir -p $(DESTDIR)/usr/share/man/man1
-       install $(MANS) $(DESTDIR)/usr/share/man/man1
+       mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
+       install $(MANS) $(DESTDIR)$(PREFIX)/share/man/man1
 
 check: isutf8
        ./check-isutf8