Build: Fix installation of Python bindings

Apparently setup.py install behaves differently when given
the --root option, so omit that if DESTDIR is empty.

Fixes #644.
This commit is contained in:
Daniel Elstner 2015-09-02 14:07:06 +02:00
parent a2e4d88205
commit 452986bec4
1 changed files with 2 additions and 1 deletions

View 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