Makefile: add ifdef guards to config.h
Change-Id: Ib7ae206cc163ae9daffee18c3c68d527ee0dc308 Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/426666 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
3b9baaf0f4
commit
55bc3a7255
5
Makefile
5
Makefile
@ -84,7 +84,10 @@ mk/cc.mk:
|
|||||||
config.h: CONFIG CONFIG.local scripts/genconfig.py
|
config.h: CONFIG CONFIG.local scripts/genconfig.py
|
||||||
$(Q)PYCMD=$$(cat PYTHON_COMMAND 2>/dev/null) ; \
|
$(Q)PYCMD=$$(cat PYTHON_COMMAND 2>/dev/null) ; \
|
||||||
test -z "$$PYCMD" && PYCMD=python ; \
|
test -z "$$PYCMD" && PYCMD=python ; \
|
||||||
$$PYCMD scripts/genconfig.py $(MAKEFLAGS) > $@.tmp; \
|
echo "#ifndef SPDK_CONFIG_H" > $@.tmp; \
|
||||||
|
echo "#define SPDK_CONFIG_H" >> $@.tmp; \
|
||||||
|
$$PYCMD scripts/genconfig.py $(MAKEFLAGS) >> $@.tmp; \
|
||||||
|
echo "#endif /* SPDK_CONFIG_H */" >> $@.tmp; \
|
||||||
cmp -s $@.tmp $@ || mv $@.tmp $@ ; \
|
cmp -s $@.tmp $@ || mv $@.tmp $@ ; \
|
||||||
rm -f $@.tmp
|
rm -f $@.tmp
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user