]> sigrok.org Git - libsigrok.git/commitdiff
Python bindings: respect DESTDIR.
authorJiří Pinkava <redacted>
Thu, 8 Jan 2015 23:45:48 +0000 (00:45 +0100)
committerUwe Hermann <redacted>
Fri, 9 Jan 2015 15:17:36 +0000 (16:17 +0100)
Thanks Aurelien Jacobs <redacted> for a suggested
fix/improvement.

Makefile.am

index 13debd1e7c9076b8b57117ea714aee0dbc9e130b..b6bec636df90f382aba6403eef51f17ef00ca047 100644 (file)
@@ -504,8 +504,11 @@ $(PDIR)/timestamp: bindings/cxx/libsigrokxx.la $(PDIR)/sigrok/core/classes.i \
                | grep -v "command line option.*Wstrict-prototypes"; true
        $(AM_V_at)touch $(PDIR)/timestamp
 
-python-install:
-       cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet install --prefix $(prefix)
+$(DESTDIR)$(prefix):
+       $(MKDIR_P) $@
+
+python-install: $(DESTDIR)$(prefix)
+       cd $(PDIR) && $(PYTHON) $(abs_srcdir)/$(PDIR)/setup.py --quiet install --prefix $(prefix) `test "$(DESTDIR)" && echo --root=$(DESTDIR)`
 
 python-clean:
        $(AM_V_at)$(MAKE) python-quietclean