chiark / gitweb /
pysetup.mk: Handle the `DESTDIR' install variable usefully.
[cfd] / pysetup.mk
index fed1149d3f3134be3942b301be0172c90bed76b2..8e6e607479329484b0dc70074102aba7fa7976e3 100644 (file)
@@ -32,7 +32,8 @@ CMD-dist              ?= sdist
 OPTS-dist              += --dist-dir .
 
 PYTARGETS              += install
-OPTS-install           += --prefix $(prefix)
+OPTS-install           += --prefix $(prefix) \
+                               $(and $(DESTDIR),--root $(DESTDIR))
 
 PYTARGETS              += check
 CMD-check              ?= test