Makefile: Add config-sanitycheck target

This patch adds a separate target for config-sanitycheck that will
generate a .config-sanitycheck file that contains both Kconfig and DTS
config information.

Signed-off-by: Andy Gross <andy.gross@linaro.org>
This commit is contained in:
Andy Gross 2017-06-06 21:23:33 -05:00 committed by Kumar Gala
commit 1e72c1e761
2 changed files with 15 additions and 0 deletions

View file

@ -1008,6 +1008,17 @@ endif
dts: include/generated/generated_dts_board.h
define filechk_.config-sanitycheck
(cat .config; \
grep -e '^CONFIG' include/generated/generated_dts_board.conf | cat; \
)
endef
.config-sanitycheck: include/generated/generated_dts_board.conf FORCE
$(call filechk,.config-sanitycheck)
config-sanitycheck: .config-sanitycheck
# The actual objects are generated when descending,
# make sure no implicit rule kicks in
$(sort $(zephyr-deps)): $(zephyr-dirs) zephyr-app-dir ;
@ -1124,6 +1135,7 @@ CLEAN_DIRS += $(MODVERDIR)
CLEAN_FILES += include/generated/generated_dts_board.conf \
include/generated/generated_dts_board.h \
.config-sanitycheck \
.old_version .tmp_System.map .tmp_version \
.tmp_* System.map *.lnk *.map *.elf *.lst \
*.bin *.hex *.stat *.strip staticIdt.o linker.cmd \

View file

@ -125,6 +125,9 @@ outputexports: initconfig
dts: initconfig
$(Q)$(call zephyrmake,$(O),$@)
config-sanitycheck: dts
$(Q)$(call zephyrmake,$(O),$@)
menuconfig: initconfig
$(Q)$(call zephyrmake,$(O),$@)