mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 14:31:20 +03:00
make check library probe faliure silent
This commit is contained in:
parent
86450ed8a2
commit
7b78985983
@ -35,26 +35,59 @@ hashtable_SRCS := utils/hashtable.c test/log.c test/hashtable.c
|
|||||||
|
|
||||||
# Coverage builds need additional flags
|
# Coverage builds need additional flags
|
||||||
ifeq ($(MAKECMDGOALS),coverage)
|
ifeq ($(MAKECMDGOALS),coverage)
|
||||||
COVCFLAGS ?= -fprofile-arcs -ftest-coverage -O0
|
COV_CFLAGS ?= -fprofile-arcs -ftest-coverage -O0
|
||||||
COVCXXFLAGS ?= -fprofile-arcs -ftest-coverage -O0
|
COV_CXXFLAGS ?= -fprofile-arcs -ftest-coverage -O0
|
||||||
COVLDFLAGS ?= -lgcov -fprofile-arcs
|
COV_LDFLAGS ?= -lgcov -fprofile-arcs
|
||||||
TESTROOT := build-$(HOST)-coverage
|
TESTROOT := build-$(HOST)-coverage
|
||||||
else
|
else
|
||||||
COVCFLAGS ?= -O0
|
COV_CFLAGS ?= -O0
|
||||||
COVCXXFLAGS ?= -O0
|
COV_CXXFLAGS ?= -O0
|
||||||
TESTROOT := build-$(HOST)-test
|
TESTROOT := build-$(HOST)-test
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
# Extend flags with appropriate values from pkg-config for enabled features
|
||||||
|
#
|
||||||
|
# 1: pkg-config required modules for feature
|
||||||
|
# 2: Human-readable name for the feature
|
||||||
|
define pkg_cfg_detect_lib
|
||||||
|
ifeq ($$(PKG_CONFIG),)
|
||||||
|
$$(error pkg-config is required to auto-detect feature availability)
|
||||||
|
endif
|
||||||
|
|
||||||
|
PKG_CONFIG_$(1)_EXISTS := $$(shell $$(PKG_CONFIG) --exists $(1) && echo yes)
|
||||||
|
|
||||||
|
ifeq ($$(PKG_CONFIG_$(1)_EXISTS),yes)
|
||||||
|
LIB_CFLAGS += $$(shell $$(PKG_CONFIG) --cflags $(1))
|
||||||
|
LIB_CXXFLAGS += $$(shell $$(PKG_CONFIG) --cflags $(1))
|
||||||
|
LIB_LDFLAGS += $$(shell $$(PKG_CONFIG) --libs $(1))
|
||||||
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
|
$$(info PKG.CNFG: $(2) ($(1)) enabled)
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
|
$$(info PKG.CNFG: $(2) ($(1)) disabled)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
$(eval $(call pkg_cfg_detect_lib,check,Check))
|
||||||
|
|
||||||
|
|
||||||
TESTCFLAGS := -std=c99 -g -Wall \
|
TESTCFLAGS := -std=c99 -g -Wall \
|
||||||
-D_BSD_SOURCE \
|
-D_BSD_SOURCE \
|
||||||
-D_POSIX_C_SOURCE=200809L \
|
-D_POSIX_C_SOURCE=200809L \
|
||||||
-D_XOPEN_SOURCE=600 \
|
-D_XOPEN_SOURCE=600 \
|
||||||
-Itest -I. -I.. \
|
-Itest -I. -I.. \
|
||||||
-Dnsgtk \
|
-Dnsgtk \
|
||||||
$(shell pkg-config --cflags libcurl check libparserutils libwapcaplet libdom libnsutils libutf8proc libidn) \
|
$(shell pkg-config --cflags libcurl libparserutils libwapcaplet libdom libnsutils libutf8proc libidn) \
|
||||||
$(COVCFLAGS)
|
$(LIB_CFLAGS) \
|
||||||
TESTLDFLAGS := $(shell pkg-config --libs libcurl check libparserutils libwapcaplet libdom libnsutils libutf8proc libidn) -lz \
|
$(COV_CFLAGS)
|
||||||
$(COVLDFLAGS)
|
|
||||||
|
TESTLDFLAGS := $(shell pkg-config --libs libcurl libparserutils libwapcaplet libdom libnsutils libutf8proc libidn) -lz \
|
||||||
|
$(LIB_LDFLAGS)\
|
||||||
|
$(COV_LDFLAGS)
|
||||||
|
|
||||||
|
|
||||||
# Source files for all tests being compiled
|
# Source files for all tests being compiled
|
||||||
|
Loading…
Reference in New Issue
Block a user