mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-03 15:55:53 +00:00
make: drop check-build-packages - we can use try-cc now
Adjust all calls to try-cc to compare with 'true' instead of 'y', drop additional rule check-build-packages, as we can check them in the rule now. Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com> Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Andrew Vagin <avagin@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
34996312c2
commit
1d72d80151
@@ -2,7 +2,7 @@ include $(__nmk_dir)/utils.mk
|
|||||||
include $(__nmk_dir)msg.mk
|
include $(__nmk_dir)msg.mk
|
||||||
include $(SRC_DIR)/scripts/feature-tests.mak
|
include $(SRC_DIR)/scripts/feature-tests.mak
|
||||||
|
|
||||||
ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),y)
|
ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),true)
|
||||||
LIBS += -lbsd
|
LIBS += -lbsd
|
||||||
DEFINES += -DCONFIG_HAS_LIBBSD
|
DEFINES += -DCONFIG_HAS_LIBBSD
|
||||||
endif
|
endif
|
||||||
@@ -17,7 +17,7 @@ FEATURES_LIST := TCP_REPAIR STRLCPY STRLCAT PTRACE_PEEKSIGINFO \
|
|||||||
|
|
||||||
# $1 - config name
|
# $1 - config name
|
||||||
define gen-feature-test
|
define gen-feature-test
|
||||||
ifeq ($$(call try-cc,$$(FEATURE_TEST_$(1)),$$(LIBS),$$(DEFINES)),y)
|
ifeq ($$(call try-cc,$$(FEATURE_TEST_$(1)),$$(LIBS),$$(DEFINES)),true)
|
||||||
$(Q) @echo '#define CONFIG_HAS_$(1)' >> $$@
|
$(Q) @echo '#define CONFIG_HAS_$(1)' >> $$@
|
||||||
$(Q) @echo '' >> $$@
|
$(Q) @echo '' >> $$@
|
||||||
endif
|
endif
|
||||||
|
@@ -21,12 +21,6 @@ REQ-DEB-PKG-TEST-NAMES += libaio-dev
|
|||||||
|
|
||||||
export LIBS := -lrt -lpthread -lprotobuf-c -ldl -lnl-3
|
export LIBS := -lrt -lpthread -lprotobuf-c -ldl -lnl-3
|
||||||
|
|
||||||
#
|
|
||||||
# Make sure all required libs are installed
|
|
||||||
check-build-packages:
|
|
||||||
$(Q) echo "int main(int argc, char *argv[]) { return 0; }" | \
|
|
||||||
$(CC) -x c - $(LIBS) -o /dev/null > /dev/null 2>&1
|
|
||||||
|
|
||||||
check-packages-failed:
|
check-packages-failed:
|
||||||
$(warning Can not find some of the required libraries)
|
$(warning Can not find some of the required libraries)
|
||||||
$(warning Make sure the following packages are installed)
|
$(warning Make sure the following packages are installed)
|
||||||
@@ -37,7 +31,10 @@ check-packages-failed:
|
|||||||
$(warning DEB based distros: $(REQ-DEB-PKG-TEST-NAMES))
|
$(warning DEB based distros: $(REQ-DEB-PKG-TEST-NAMES))
|
||||||
$(error Compilation aborted)
|
$(error Compilation aborted)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Make sure all required libs are installed
|
||||||
|
PROGRAM_STUB := int main(int argc, char **argv) { return 0; }
|
||||||
check-packages:
|
check-packages:
|
||||||
$(Q) $(MAKE) -f $(obj)/Makefile.packages check-build-packages || \
|
$(Q) $(call try-cc,$(PROGRAM_STUB),$(LIBS)) \
|
||||||
$(MAKE) -f $(obj)/Makefile.packages check-packages-failed
|
|| $(MAKE) -f $(obj)/Makefile.packages check-packages-failed
|
||||||
.PHONY: check-build-packages check-packages-failed check-packages
|
.PHONY: check-packages-failed check-packages
|
||||||
|
Reference in New Issue
Block a user