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 <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Kir Kolyshkin 2016-12-17 03:22:09 -08:00 committed by Andrei Vagin
parent a502750a3d
commit 96f3f1b64f
2 changed files with 11 additions and 3 deletions

View file

@ -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

View file

@ -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