]> mj.ucw.cz Git - paperjam.git/commitdiff
Makefile: Support DESTDIR
authorMartin Mares <mj@ucw.cz>
Sun, 19 Jan 2020 21:05:51 +0000 (22:05 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 19 Jan 2020 21:05:51 +0000 (22:05 +0100)
Makefile

index 8b7b0f5a05255d66c276eef6e735cfc1b9e60fce..e167c0eb9460f20e689051b5fe0c514c1c7d7d0a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@ YEAR=2018
 BUILD_DATE:=$(shell date '+%Y-%m-%d')
 BUILD_COMMIT:=$(shell if git rev-parse >/dev/null 2>/dev/null ; then git describe --always --tags ; else echo '<unknown>' ; fi)
 
+DESTDIR=
 PREFIX=/usr/local
 BINDIR=$(PREFIX)/bin
 MANDIR=$(PREFIX)/share/man
@@ -38,9 +39,9 @@ clean:
        rm -f *.tar.gz
 
 install: all
-       install -d $(BINDIR) $(MANDIR)/man1
-       install -s paperjam $(BINDIR)/
-       install -m 644 paperjam.1 $(MANDIR)/man1/
+       install -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
+       install -s paperjam $(DESTDIR)$(BINDIR)/
+       install -m 644 paperjam.1 $(DESTDIR)$(MANDIR)/man1/
 
 release:
        git tag v$(VERSION)