build: export flashing and debugging info, when present

Zephyr supports the flash and debug targets via per-board information
in Makefile.board files.

It is sometimes convenient to know this information when inspecting
the build artifacts or doing exotic builds, so include it in the file
generated by outputexports. The information in Makefile.board provides
what is needed.

Therefore, ensure that Makefile.board, when present, is included by
the generated Makefile.export. This gives users of Makefile.export
access to variables like FLASH_SCRIPT, PYOCD_TARGET, etc. (These users
need to cope with these variables being undefined if not given in
Makefile.board, or if Makefile.board does not exist for a target.)

While we're here, don't export INSTALLKERNEL. That's Linux-specific
and otherwise unused; the Zephyr equivalent is FLASH_SCRIPT and its
associated variables.

Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
This commit is contained in:
Marti Bolivar 2017-07-21 12:33:19 -04:00 committed by Kumar Gala
commit 497f8fd40a

View file

@ -414,7 +414,7 @@ exports += VERSION_MAJOR VERSION_MINOR PATCHLEVEL VERSION_RESERVED EXTRAVERSION
exports += KERNELRELEASE KERNELVERSION
exports += ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC CXX
exports += CPP AR NM STRIP OBJCOPY OBJDUMP GDB
exports += MAKE AWK INSTALLKERNEL PERL PYTHON
exports += MAKE AWK PERL PYTHON
exports += HOSTCXX HOSTCXXFLAGS CHECK CHECKFLAGS
exports += KBUILD_CPPFLAGS NOSTDINC_FLAGS ZEPHYRINCLUDE OBJCOPYFLAGS LDFLAGS
@ -435,7 +435,8 @@ define filechk_Makefile.export
echo "BOARD=$(BOARD)"; \
echo; \
$(foreach e,$(exports),echo $(e)=$($(e));) echo; \
echo "include $(O)/include/config/auto.conf";)
echo "include $(O)/include/config/auto.conf"; \
echo "-include $(srctree)/boards/$(ARCH)/$(BOARD_NAME)/Makefile.board";)
endef
# Files to ignore in find ... statements