soccr: Generate config.h dynamically

Otherwise there is a broken symlink which makes tags/etags unhappy.

travis-ci: success for soccr: Generate config.h dynamically (rev5)
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
[extended .gitignore, maked link relative to sources]
Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Cyrill Gorcunov 2016-10-05 17:05:00 +03:00 committed by Pavel Emelyanov
parent f92b8d9c44
commit 207bbd891f
3 changed files with 9 additions and 4 deletions

1
.gitignore vendored
View file

@ -27,6 +27,7 @@ criu/arch/*/syscalls.S
criu/include/config.h
criu/include/syscall-codes.h
criu/include/syscall.h
soccr/config.h
criu/include/version.h
criu/pie/restorer-blob.h
criu/pie/parasite-blob.h

View file

@ -188,7 +188,8 @@ endif
#
# Configure variables.
export CONFIG_HEADER := $(SRC_DIR)/criu/include/config.h
CONFIG_HEADER_REL := criu/include/config.h
export CONFIG_HEADER := $(SRC_DIR)/$(CONFIG_HEADER_REL)
ifeq ($(filter clean mrproper,$(MAKECMDGOALS)),)
include $(SRC_DIR)/Makefile.config
endif
@ -204,9 +205,12 @@ $(eval $(call gen-built-in,images))
# Next the socket CR library
#
SOCCR_A := soccr/libsoccr.a
soccr/%: $(CONFIG_HEADER) .FORCE
SOCCR_CONFIG := $(SRC_DIR)/soccr/config.h
$(SOCCR_CONFIG): $(CONFIG_HEADER)
$(Q) ln -s ../$(CONFIG_HEADER_REL) $@
soccr/%: $(SOCCR_CONFIG) .FORCE
$(Q) $(MAKE) $(build)=soccr $@
soccr/built-in.o: $(CONFIG_HEADER) .FORCE
soccr/built-in.o: $(SOCCR_CONFIG) .FORCE
$(Q) $(MAKE) $(build)=soccr all
$(SOCCR_A): |soccr/built-in.o
@ -253,6 +257,7 @@ mrproper: subclean
$(Q) $(MAKE) $(build)=criu $@
$(Q) $(MAKE) $(build)=soccr $@
$(Q) $(RM) $(CONFIG_HEADER)
$(Q) $(RM) $(SOCCR_CONFIG)
$(Q) $(RM) $(VERSION_HEADER)
$(Q) $(RM) include/common/asm
$(Q) $(RM) cscope.*

View file

@ -1 +0,0 @@
../criu/include/config.h