mk: move config.h to include/spdk directory
We need to include it in devel package. Change-Id: I823200632e8bcb9fdb86c8cb5fbf3a651a710b78 Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/426839 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
b9f63009f3
commit
c5467556f0
2
.gitignore
vendored
2
.gitignore
vendored
@ -18,7 +18,7 @@ tags
|
||||
cscope.out
|
||||
dpdk-*
|
||||
CUnit-Memory-Dump.xml
|
||||
config.h
|
||||
include/spdk/config.h
|
||||
CONFIG.local
|
||||
*VC.db
|
||||
.vscode
|
||||
|
8
Makefile
8
Makefile
@ -41,7 +41,7 @@ DIRS-$(CONFIG_SHARED) += shared_lib
|
||||
DIRS-y += examples app include
|
||||
DIRS-$(CONFIG_TESTS) += test
|
||||
|
||||
.PHONY: all clean $(DIRS-y) config.h CONFIG.local mk/cc.mk cc_version cxx_version
|
||||
.PHONY: all clean $(DIRS-y) include/spdk/config.h CONFIG.local mk/cc.mk cc_version cxx_version
|
||||
|
||||
ifeq ($(SPDK_ROOT_DIR)/lib/env_dpdk,$(CONFIG_ENV))
|
||||
ifeq ($(CURDIR)/dpdk/build,$(CONFIG_DPDK_DIR))
|
||||
@ -61,7 +61,7 @@ endif
|
||||
all: $(DIRS-y)
|
||||
clean: $(DIRS-y)
|
||||
$(Q)rm -f mk/cc.mk
|
||||
$(Q)rm -f config.h
|
||||
$(Q)rm -f include/spdk/config.h
|
||||
|
||||
install: all
|
||||
$(Q)echo "Installed to $(DESTDIR)$(CONFIG_PREFIX)"
|
||||
@ -74,14 +74,14 @@ examples: $(LIB)
|
||||
pkgdep:
|
||||
sh ./scripts/pkgdep.sh
|
||||
|
||||
$(DIRS-y): mk/cc.mk config.h
|
||||
$(DIRS-y): mk/cc.mk include/spdk/config.h
|
||||
|
||||
mk/cc.mk:
|
||||
$(Q)scripts/detect_cc.sh --cc=$(CC) --cxx=$(CXX) --lto=$(CONFIG_LTO) > $@.tmp; \
|
||||
cmp -s $@.tmp $@ || mv $@.tmp $@ ; \
|
||||
rm -f $@.tmp
|
||||
|
||||
config.h: CONFIG CONFIG.local scripts/genconfig.py
|
||||
include/spdk/config.h: CONFIG CONFIG.local scripts/genconfig.py
|
||||
$(Q)PYCMD=$$(cat PYTHON_COMMAND 2>/dev/null) ; \
|
||||
test -z "$$PYCMD" && PYCMD=python ; \
|
||||
echo "#ifndef SPDK_CONFIG_H" > $@.tmp; \
|
||||
|
@ -77,7 +77,7 @@ ifeq ($(TARGET_MACHINE),x86_64)
|
||||
COMMON_CFLAGS += -march=native
|
||||
endif
|
||||
|
||||
COMMON_CFLAGS += -include $(SPDK_ROOT_DIR)/config.h
|
||||
COMMON_CFLAGS += -include $(SPDK_ROOT_DIR)/include/spdk/config.h
|
||||
|
||||
ifeq ($(CONFIG_WERROR), y)
|
||||
COMMON_CFLAGS += -Werror
|
||||
|
@ -11,10 +11,11 @@ rootdir=$(readlink -f $(dirname $0)/../..)
|
||||
|
||||
cd "$rootdir"
|
||||
|
||||
|
||||
# if ASAN is enabled, use it. If not use valgrind if installed but allow
|
||||
# the env variable to override the default shown below.
|
||||
if [ -z ${valgrind+x} ]; then
|
||||
if grep -q '#undef SPDK_CONFIG_ASAN' $rootdir/config.h && hash valgrind; then
|
||||
if grep -q '#undef SPDK_CONFIG_ASAN' $rootdir/include/spdk/config.h && hash valgrind; then
|
||||
valgrind='valgrind --leak-check=full --error-exitcode=2'
|
||||
else
|
||||
valgrind=''
|
||||
@ -22,7 +23,7 @@ if [ -z ${valgrind+x} ]; then
|
||||
fi
|
||||
|
||||
# setup local unit test coverage if cov is available
|
||||
if hash lcov && grep -q '#define SPDK_CONFIG_COVERAGE 1' $rootdir/config.h; then
|
||||
if hash lcov && grep -q '#define SPDK_CONFIG_COVERAGE 1' $rootdir/include/spdk/config.h; then
|
||||
cov_avail="yes"
|
||||
else
|
||||
cov_avail="no"
|
||||
@ -54,11 +55,11 @@ $valgrind $testdir/lib/bdev/scsi_nvme.c/scsi_nvme_ut
|
||||
$valgrind $testdir/lib/bdev/gpt/gpt.c/gpt_ut
|
||||
$valgrind $testdir/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut
|
||||
|
||||
if grep -q '#define SPDK_CONFIG_CRYPTO 1' $rootdir/config.h; then
|
||||
if grep -q '#define SPDK_CONFIG_CRYPTO 1' $rootdir/include/spdk/config.h; then
|
||||
$valgrind $testdir/lib/bdev/crypto.c/crypto_ut
|
||||
fi
|
||||
|
||||
if grep -q '#define SPDK_CONFIG_PMDK 1' $rootdir/config.h; then
|
||||
if grep -q '#define SPDK_CONFIG_PMDK 1' $rootdir/include/spdk/config.h; then
|
||||
$valgrind $testdir/lib/bdev/pmem/bdev_pmem_ut
|
||||
fi
|
||||
|
||||
@ -161,7 +162,7 @@ if [ "$cov_avail" = "yes" ]; then
|
||||
else
|
||||
echo "WARN: lcov not installed or SPDK built without coverage!"
|
||||
fi
|
||||
if grep -q '#undef SPDK_CONFIG_ASAN' $rootdir/config.h && [ "$valgrind" = "" ]; then
|
||||
if grep -q '#undef SPDK_CONFIG_ASAN' $rootdir/include/spdk/config.h && [ "$valgrind" = "" ]; then
|
||||
echo "WARN: neither valgrind nor ASAN is enabled!"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user