From 30d2b6c89c0af61cac5fcbe3a47d564c07650ea1 Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Sun, 28 Jun 2020 20:02:32 +0800 Subject: [PATCH] make/export: export post build script post build processing is also necessary for import compilation Change-Id: Ie27e25b84e2212e9c86358c30ca1a5b7c2adffc5 Signed-off-by: chao.an --- tools/Makefile.unix | 2 +- tools/mkexport.sh | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tools/Makefile.unix b/tools/Makefile.unix index 0d6ebd1990..ba5ebe5708 100644 --- a/tools/Makefile.unix +++ b/tools/Makefile.unix @@ -117,7 +117,7 @@ LINKLIBS = $(patsubst staging/%,%,$(NUTTXLIBS)) # Export tool definitions MKEXPORT= tools/mkexport.sh -MKEXPORT_ARGS = -w$(CONFIG_CYGWIN_WINTOOL) -t "$(TOPDIR)" +MKEXPORT_ARGS = -w$(CONFIG_CYGWIN_WINTOOL) -t "$(TOPDIR)" -b "$(BOARD_DIR)" ifneq ($(CONFIG_BUILD_FLAT),y) MKEXPORT_ARGS += -u diff --git a/tools/mkexport.sh b/tools/mkexport.sh index e8f3bd9011..c10e9170a7 100755 --- a/tools/mkexport.sh +++ b/tools/mkexport.sh @@ -39,6 +39,7 @@ unset TOPDIR unset LIBLIST unset TGZ unset APPDIR +unset BOARDDIR USRONLY=n WINTOOL=n @@ -50,6 +51,10 @@ while [ ! -z "$1" ]; do shift APPDIR="$1" ;; + -b ) + shift + BOARDDIR="$1" + ;; -d ) set -x ;; @@ -201,6 +206,12 @@ cp "${TOPDIR}/tools/incdir.c" "${EXPORTDIR}/tools/." cp -f "${TOPDIR}/binfmt/libelf/gnu-elf.ld" "${EXPORTDIR}/scripts/." +# Copy the board config script + +if [ -f "${BOARDDIR}/scripts/Config.mk" ]; then + cp -f "${BOARDDIR}/scripts/Config.mk" "${EXPORTDIR}/scripts/." +fi + # Is there a linker script in this configuration? if [ "X${USRONLY}" != "Xy" ]; then