Commit 96f3f1b6 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Andrei Vagin

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: 's avatarKir Kolyshkin <kir@openvz.org>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent a502750a
...@@ -173,12 +173,15 @@ endif ...@@ -173,12 +173,15 @@ endif
$(Q) echo "#define CRIU_GITID \"$(GITID)\"" >> $@ $(Q) echo "#define CRIU_GITID \"$(GITID)\"" >> $@
$(Q) echo "#endif /* __CR_VERSION_H__ */" >> $@ $(Q) echo "#endif /* __CR_VERSION_H__ */" >> $@
criu-deps += $(VERSION_HEADER)
# #
# Setup proper link for asm headers in common code. # Setup proper link for asm headers in common code.
include/common/asm: include/common/arch/$(ARCH)/asm include/common/asm: include/common/arch/$(ARCH)/asm
$(call msg-gen, $@) $(call msg-gen, $@)
$(Q) ln -s ./arch/$(ARCH)/asm $@ $(Q) ln -s ./arch/$(ARCH)/asm $@
$(VERSION_HEADER): include/common/asm
criu-deps += include/common/asm
# #
# Configure variables. # Configure variables.
...@@ -194,6 +197,7 @@ endif ...@@ -194,6 +197,7 @@ endif
# Protobuf images first, they are not depending # Protobuf images first, they are not depending
# on anything else. # on anything else.
$(eval $(call gen-built-in,images)) $(eval $(call gen-built-in,images))
criu-deps += images/built-in.o
.PHONY: .FORCE .PHONY: .FORCE
...@@ -213,6 +217,7 @@ soccr/%: $(SOCCR_CONFIG) .FORCE ...@@ -213,6 +217,7 @@ soccr/%: $(SOCCR_CONFIG) .FORCE
soccr/built-in.o: $(SOCCR_CONFIG) .FORCE soccr/built-in.o: $(SOCCR_CONFIG) .FORCE
$(Q) $(MAKE) $(build)=soccr all $(Q) $(MAKE) $(build)=soccr all
$(SOCCR_A): |soccr/built-in.o $(SOCCR_A): |soccr/built-in.o
criu-deps += $(SOCCR_A)
# #
# CRIU building done in own directory # CRIU building done in own directory
...@@ -222,9 +227,9 @@ $(SOCCR_A): |soccr/built-in.o ...@@ -222,9 +227,9 @@ $(SOCCR_A): |soccr/built-in.o
# #
# But note that we're already included # But note that we're already included
# the nmk so we can reuse it there. # 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 $@ $(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 $(Q) $(MAKE) $(build)=criu all
.PHONY: criu .PHONY: criu
......
...@@ -27,12 +27,15 @@ compel-plugins += compel/plugins/std.built-in.o ...@@ -27,12 +27,15 @@ compel-plugins += compel/plugins/std.built-in.o
LIBCOMPEL_SO := libcompel.so LIBCOMPEL_SO := libcompel.so
LIBCOMPEL_A := libcompel.a LIBCOMPEL_A := libcompel.a
export LIBCOMPEL_SO LIBCOMPEL_A export LIBCOMPEL_SO LIBCOMPEL_A
criu-deps += compel/$(LIBCOMPEL_A)
# #
# Compel itself. # Compel itself.
compel/%: $(compel-deps) $(compel-plugins) .FORCE compel/%: $(compel-deps) $(compel-plugins) .FORCE
$(Q) $(MAKE) $(build)=compel $@ $(Q) $(MAKE) $(build)=compel $@
criu-deps += compel/compel-host-bin
# #
# Plugins # Plugins
compel/plugins/%: $(compel-deps) .FORCE compel/plugins/%: $(compel-deps) .FORCE
......
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