From 96f3f1b64f6a7aacff8f19bb2aaea2b68d017c69 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Sat, 17 Dec 2016 03:22:09 -0800 Subject: [PATCH] Makefile: untangle criu deps Build of criu binary depends on many other things that needs to be built before it. Let's clean these deps a bit by using criu-deps variable. This also removes wrong "$(VERSION_HEADER): include/common/asm" dependency -- one can certainly succeed in generating criu/include/version.h file without creating include/common/asm symlink fist! travis-ci: success for More polishing for compel cli Signed-off-by: Kir Kolyshkin Acked-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov Signed-off-by: Andrei Vagin --- Makefile | 11 ++++++++--- Makefile.compel | 3 +++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 4374ef5af..fdb25208b 100644 --- a/Makefile +++ b/Makefile @@ -173,12 +173,15 @@ endif $(Q) echo "#define CRIU_GITID \"$(GITID)\"" >> $@ $(Q) echo "#endif /* __CR_VERSION_H__ */" >> $@ +criu-deps += $(VERSION_HEADER) + # # Setup proper link for asm headers in common code. include/common/asm: include/common/arch/$(ARCH)/asm $(call msg-gen, $@) $(Q) ln -s ./arch/$(ARCH)/asm $@ -$(VERSION_HEADER): include/common/asm + +criu-deps += include/common/asm # # Configure variables. @@ -194,6 +197,7 @@ endif # Protobuf images first, they are not depending # on anything else. $(eval $(call gen-built-in,images)) +criu-deps += images/built-in.o .PHONY: .FORCE @@ -213,6 +217,7 @@ soccr/%: $(SOCCR_CONFIG) .FORCE soccr/built-in.o: $(SOCCR_CONFIG) .FORCE $(Q) $(MAKE) $(build)=soccr all $(SOCCR_A): |soccr/built-in.o +criu-deps += $(SOCCR_A) # # CRIU building done in own directory @@ -222,9 +227,9 @@ $(SOCCR_A): |soccr/built-in.o # # But note that we're already included # the nmk so we can reuse it there. -criu/%: images/built-in.o compel/plugins/std.built-in.o compel/libcompel.a compel/compel-host-bin $(VERSION_HEADER) .FORCE +criu/%: $(criu-deps) .FORCE $(Q) $(MAKE) $(build)=criu $@ -criu: images/built-in.o compel/plugins/std.built-in.o compel/libcompel.a compel/compel-host-bin $(SOCCR_A) $(VERSION_HEADER) +criu: $(criu-deps) $(Q) $(MAKE) $(build)=criu all .PHONY: criu diff --git a/Makefile.compel b/Makefile.compel index 46a3b529f..3e7a1742f 100644 --- a/Makefile.compel +++ b/Makefile.compel @@ -27,12 +27,15 @@ compel-plugins += compel/plugins/std.built-in.o LIBCOMPEL_SO := libcompel.so LIBCOMPEL_A := libcompel.a export LIBCOMPEL_SO LIBCOMPEL_A +criu-deps += compel/$(LIBCOMPEL_A) # # Compel itself. compel/%: $(compel-deps) $(compel-plugins) .FORCE $(Q) $(MAKE) $(build)=compel $@ +criu-deps += compel/compel-host-bin + # # Plugins compel/plugins/%: $(compel-deps) .FORCE