Commit 1d72d801 authored by Dmitry Safonov's avatar Dmitry Safonov Committed by Pavel Emelyanov

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: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Reviewed-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 34996312
...@@ -2,7 +2,7 @@ include $(__nmk_dir)/utils.mk ...@@ -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 \ ...@@ -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 ...@@ -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: ...@@ -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
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