Commit 4669d633 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Andrei Vagin

crit: fix 'make install'

Apparently, setup.py from distutils interprets --root= option without
an argument as "--root=." and we end up with what is described
in https://github.com/xemul/criu/issues/309.

Fix is to prepend DESTDIR value (if any) to --prefix argument.

v2: fix uninstall as well
v3: same code, resent via gmail
Reported-by: 's avatarJuraj Oršulić <juraj.orsulic@fer.hr>
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 03eccbf1
......@@ -56,7 +56,7 @@ install: lib-c lib-py crit/crit lib/c/criu.pc.in
$(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)/criu/),' lib/c/criu.pc.in > lib/c/criu.pc
$(Q) install -m 644 lib/c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
$(E) " INSTALL " crit
$(Q) $(PYTHON_BIN) scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES)
$(Q) $(PYTHON_BIN) scripts/crit-setup.py install --prefix=$(DESTDIR)$(PREFIX) --record $(CRIT_SETUP_FILES)
.PHONY: install
uninstall:
......@@ -68,5 +68,5 @@ uninstall:
$(E) " UNINSTALL" pkgconfig/criu.pc
$(Q) $(RM) $(addprefix $(DESTDIR)$(LIBDIR)/pkgconfig/,criu.pc)
$(E) " UNINSTALL" crit
$(Q) while read -r file; do $(RM) "$(DESTDIR)$$file"; done < $(CRIT_SETUP_FILES)
$(Q) while read -r file; do $(RM) "$$file"; done < $(CRIT_SETUP_FILES)
.PHONY: uninstall
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment