mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
make: Add .config file processing (v3)
In this file one can add options with which to build CRIU. Each line is (for now) expanded into CONFIG_$(TEXT) macros defined in config.h that can be tested later in the code. v2: Add .config to .gitignore v3: Don't check that make mrproper removes .config https://github.com/xemul/criu/issues/235 travis-ci: success for Don't compile in binfmt_misc dumping code by default (rev3) Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Reviewed-by: Dmirty Safonov <dsafonov@virtuozzo.com>
This commit is contained in:
parent
1821acedd0
commit
a1ba078830
3 changed files with 9 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
.config
|
||||
*.o
|
||||
*.d
|
||||
*.a
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ endif
|
|||
|
||||
export LIBS += $(LIBS_FEATURES)
|
||||
|
||||
CONFIG_FILE = $(SRC_DIR)/.config
|
||||
|
||||
$(CONFIG_FILE):
|
||||
touch $(CONFIG_FILE)
|
||||
|
||||
export DEFINES += $(FEATURE_DEFINES)
|
||||
export CFLAGS += $(FEATURE_DEFINES)
|
||||
|
||||
|
|
@ -29,12 +34,13 @@ endif
|
|||
endef
|
||||
|
||||
define config-header-rule
|
||||
$(CONFIG_HEADER): $(SRC_DIR)/scripts/feature-tests.mak
|
||||
$(CONFIG_HEADER): $(SRC_DIR)/scripts/feature-tests.mak $(CONFIG_FILE)
|
||||
$$(call msg-gen, $$@)
|
||||
$(Q) @echo '#ifndef __CR_CONFIG_H__' > $$@
|
||||
$(Q) @echo '#define __CR_CONFIG_H__' >> $$@
|
||||
$(Q) @echo '' >> $$@
|
||||
$(call map,gen-feature-test,$(FEATURES_LIST))
|
||||
$(Q) @cat $(CONFIG_FILE) | sed -n -e '/^[^#]/s/^/#define CONFIG_/p' >> $$@
|
||||
ifeq ($$(VDSO),y)
|
||||
$(Q) @echo '#define CONFIG_VDSO' >> $$@
|
||||
$(Q) @echo '' >> $$@
|
||||
|
|
|
|||
|
|
@ -28,4 +28,4 @@ RUN make mrproper
|
|||
RUN make -j $(nproc) CC=$CC criu/parasite-syscall.o
|
||||
RUN make -j $(nproc) CC=$CC
|
||||
RUN make mrproper
|
||||
RUN bash -c 'CLEAN="$(git clean -ndx --exclude=scripts/build)"; echo "${CLEAN}"; test -z "${CLEAN}"; exit $?'
|
||||
RUN bash -c 'CLEAN="$(git clean -ndx --exclude=scripts/build --exclude=.config)"; echo "${CLEAN}"; test -z "${CLEAN}"; exit $?'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue