[CRIU] [PATCH 7/7] crit: add install-crit target to Makefile, v2

Ruslan Kuprieiev kupruser at gmail.com
Mon Nov 3 07:56:39 PST 2014


v2, don't forget to cleanup build dir

install-crit uses scripts/crit-setup.py install --prefix=$(DESTDIR) to act
the way the install target expects it too.

Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 .gitignore |  1 +
 Makefile   | 11 ++++++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 2391e90..977c782 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@ pie/pie.lds.S
 include/config.h
 protobuf-desc-gen.h
 criu.pc
+build
diff --git a/Makefile b/Makefile
index 3a20b41..5778372 100644
--- a/Makefile
+++ b/Makefile
@@ -146,7 +146,7 @@ ifeq ($(GCOV),1)
 %.o $(PROGRAM): override CFLAGS += --coverage
 endif
 
-all: config pie $(VERSION_HEADER) $(CRIU-LIB)
+all: config pie $(VERSION_HEADER) $(CRIU-LIB) crit
 	$(Q) $(MAKE) $(PROGRAM)
 
 protobuf/%::
@@ -229,6 +229,7 @@ clean: clean-built
 	$(Q) $(MAKE) -C test $@
 	$(Q) $(MAKE) -C pycriu $@
 	$(Q) $(RM) ./*.pyc
+	$(Q) $(RM) -r build
 
 distclean: clean
 	$(E) "  DISTCLEAN"
@@ -255,7 +256,7 @@ criu-$(CRTOOLSVERSION).tar.bz2:
 		v$(CRTOOLSVERSION) | bzip2 > $@
 .PHONY: dist tar
 
-install: $(PROGRAM) $(CRIU-LIB) install-man
+install: $(PROGRAM) $(CRIU-LIB) install-man install-crit
 	$(E) "  INSTALL " $(PROGRAM)
 	$(Q) mkdir -p $(DESTDIR)$(SBINDIR)
 	$(Q) install -m 755 $(PROGRAM) $(DESTDIR)$(SBINDIR)
@@ -283,7 +284,11 @@ install: $(PROGRAM) $(CRIU-LIB) install-man
 install-man:
 	$(Q) $(MAKE) -C Documentation install
 
-.PHONY: install install-man
+install-crit: crit
+	$(E) "  INSTALL crit"
+	$(Q) python scripts/crit-setup.py install --prefix=$(DESTDIR)
+
+.PHONY: install install-man install-crit
 
 help:
 	@echo '    Targets:'
-- 
1.9.3



More information about the CRIU mailing list