]> sigrok.org Git - libsigrok.git/commitdiff
Build: Fix installation of Python bindings
authorDaniel Elstner <redacted>
Wed, 2 Sep 2015 12:07:06 +0000 (14:07 +0200)
committerDaniel Elstner <redacted>
Wed, 2 Sep 2015 12:07:06 +0000 (14:07 +0200)
Apparently setup.py install behaves differently when given
the --root option, so omit that if DESTDIR is empty.

Fixes #644.

Makefile.am

index 36b19c039d5815ae39235a95f7006dcad0354ed7..c9ee604d3c2163832960e58493aa4d5ab37c1e68 100644 (file)
@@ -580,7 +580,8 @@ $(PDIR)/timestamp: bindings/cxx/libsigrokcxx.la $(PDIR)/sigrok/core/classes.i \
 
 python-install:
        $(AM_V_at)$(MKDIR_P) "$(DESTDIR)$(prefix)" "$(DESTDIR)$(exec_prefix)"
-       $(setup_py) install --root "$(DESTDIR)/" --prefix "$(prefix)" --exec-prefix "$(exec_prefix)"
+       destdir='$(DESTDIR)'; $(setup_py) install $${destdir:+"--root=$$destdir"} \
+               --prefix "$(prefix)" --exec-prefix "$(exec_prefix)"
 
 python-clean:
        -$(AM_V_at)rm -f $(PDIR)/timestamp