Commit 4feb0702 authored by Adrian Reber's avatar Adrian Reber Committed by Pavel Emelyanov

crit: enable python2 or python3 based crit

With this last commit of the crit with python3 series it is possible to
either use python2 or python3 with CRIU.

Now the basic build system functionality (make and make install) are
python2/python3 aware. zdtm.py and criu-coredump are still python2, but
as they are not part of 'make install' those parts have not yet been
ported from python2 to python3.
Signed-off-by: 's avatarAdrian Reber <areber@redhat.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 1a0ad1ae
......@@ -24,6 +24,7 @@ images/google/protobuf/*.c
images/google/protobuf/*.h
.gitid
criu/criu
crit/crit
criu/arch/*/sys-exec-tbl*.c
# x86 syscalls-table is not generated
!criu/arch/x86/sys-exec-tbl.c
......
......@@ -127,7 +127,7 @@ HOSTCFLAGS += $(WARNINGS) $(DEFINES) -iquote include/
export CFLAGS USERCLFAGS HOSTCFLAGS
# Default target
all: criu lib
all: criu lib crit
.PHONY: all
#
......@@ -228,14 +228,22 @@ criu: $(criu-deps)
$(Q) $(MAKE) $(build)=criu all
.PHONY: criu
crit/Makefile: ;
crit/%: criu .FORCE
$(Q) $(MAKE) $(build)=crit $@
crit: criu
$(Q) $(MAKE) $(build)=crit all
.PHONY: crit
#
# Libraries next once criu it ready
# Libraries next once crit it ready
# (we might generate headers and such
# when building criu itself).
lib/Makefile: ;
lib/%: criu .FORCE
lib/%: crit .FORCE
$(Q) $(MAKE) $(build)=lib $@
lib: criu
lib: crit
$(Q) $(MAKE) $(build)=lib all
.PHONY: lib
......@@ -247,6 +255,7 @@ clean mrproper:
$(Q) $(MAKE) $(build)=compel $@
$(Q) $(MAKE) $(build)=compel/plugins $@
$(Q) $(MAKE) $(build)=lib $@
$(Q) $(MAKE) $(build)=crit $@
.PHONY: clean mrproper
clean-top:
......
all-y += crit
crit/crit: crit/crit-$(PYTHON)
$(Q) cp $^ $@
crit: crit/crit
.PHONY: crit
clean-crit:
$(Q) $(RM) crit/crit
.PHONY: clean-crit
clean: clean-crit
mrproper: clean
#!/usr/bin/env python2
from pycriu import cli
if __name__ == '__main__':
cli.main()
#!/usr/bin/env python3
from pycriu import cli
if __name__ == '__main__':
cli.main()
#!/usr/bin/env python2
from __future__ import print_function
import argparse
import sys
......
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