diff --git a/.gitignore b/.gitignore index 048668905..c231104af 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/Makefile b/Makefile index 6522d91df..60ad328b4 100644 --- a/Makefile +++ b/Makefile @@ -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: diff --git a/crit/Makefile b/crit/Makefile new file mode 100644 index 000000000..988b481b6 --- /dev/null +++ b/crit/Makefile @@ -0,0 +1,13 @@ + +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 diff --git a/crit/crit-python2 b/crit/crit-python2 new file mode 100755 index 000000000..b0b7d3c3a --- /dev/null +++ b/crit/crit-python2 @@ -0,0 +1,6 @@ +#!/usr/bin/env python2 + +from pycriu import cli + +if __name__ == '__main__': + cli.main() diff --git a/crit/crit-python3 b/crit/crit-python3 new file mode 100755 index 000000000..80467cba7 --- /dev/null +++ b/crit/crit-python3 @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +from pycriu import cli + +if __name__ == '__main__': + cli.main() diff --git a/crit/crit b/lib/py/cli.py similarity index 99% rename from crit/crit rename to lib/py/cli.py index 6adccc9f2..12597dbfb 100755 --- a/crit/crit +++ b/lib/py/cli.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python2 from __future__ import print_function import argparse import sys