diff options
author | Ruslan Kuprieiev <kupruser@gmail.com> | 2016-04-28 21:35:00 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@virtuozzo.com> | 2016-05-06 14:38:29 +0300 |
commit | 8a7a360d6dd76c2ff5ad00f360c1f321cb9d8025 (patch) | |
tree | 16de7a3ff2b7fc484f46a47e39d2134253238a76 /lib/Makefile | |
parent | 851290bfa12778b061a3ef8f8792f8b364e30e54 (diff) |
uninstall: use --record with setup.py, v2
--record option allows us to keep track of files that are being
installed by writing them to specified file. We can than use that
file to do proper cleanup on uninstall.
v2, drop -r, as we shouldn't really care about dirs, because
setup.py doesn't report them to us.
Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Diffstat (limited to 'lib/Makefile')
-rw-r--r-- | lib/Makefile | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Makefile b/lib/Makefile index a6ea3f265..f1c0821fd 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -5,6 +5,10 @@ CRIU_SO := libcriu.so UAPI_HEADERS := c/criu.h ../images/rpc.proto # +# File to keep track of files installed by setup.py +CRIT_SETUP_FILES := .crit-setup.files + +# # C language bindings. c/%: ../Makefile.versions $(call msg-gen, $@) @@ -52,7 +56,7 @@ install: lib-c lib-py ../crit/crit c/criu.pc.in $(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc $(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig $(E) " INSTALL " crit - $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) + $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES) .PHONY: install uninstall: @@ -64,10 +68,5 @@ uninstall: $(E) " UNINSTALL" pkgconfig/criu.pc $(Q) $(RM) $(addprefix $(DESTDIR)$(LIBDIR)/pkgconfig/,criu.pc) $(E) " UNINSTALL" crit - # - # FIXME How to deal with python setup properly? - $(Q) $(RM) $(addprefix $(DESTDIR)$(BINDIR)/,crit) - $(Q) $(RM) -r $(addprefix $(DESTDIR)$(LIBDIR)/python2.7/site-packages/,pycriu) - $(Q) $(RM) $(addprefix $(DESTDIR)$(LIBDIR)/python2.7/site-packages/,crit-0.0.1-py2.7.egg-info) -# $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) + $(Q) while read -r file; do $(RM) "$(DESTDIR)$$file"; done < $(CRIT_SETUP_FILES) .PHONY: uninstall |