cmake nuttx use wrapper script to call "make olddefconfig"

- this is a workaround for PATH variables that exceed the maximum cmake custom command length
This commit is contained in:
Daniel Agar 2019-03-24 17:58:41 -04:00 committed by GitHub
parent 295c3fd0c5
commit b35883f5d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

View File

@ -141,7 +141,7 @@ if (NOT config_expanded)
add_custom_command( add_custom_command(
OUTPUT ${NUTTX_DIR}/.config OUTPUT ${NUTTX_DIR}/.config
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${NUTTX_DEFCONFIG} ${NUTTX_DIR}/.config COMMAND ${CMAKE_COMMAND} -E copy_if_different ${NUTTX_DEFCONFIG} ${NUTTX_DIR}/.config
COMMAND PATH=${CMAKE_CURRENT_SOURCE_DIR}/tools:$ENV{PATH} make --no-print-directory --silent -C ${NUTTX_DIR} CONFIG_ARCH_BOARD_CUSTOM=y CONFIG_APPS_DIR="../apps" olddefconfig > nuttx_olddefconfig.log COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tools/px4_nuttx_make_olddefconfig.sh ${NUTTX_DIR}
DEPENDS DEPENDS
${NUTTX_DEFCONFIG} ${NUTTX_DEFCONFIG}
${NUTTX_DIR}/configs/dummy/Kconfig ${NUTTX_DIR}/configs/dummy/Kconfig

View File

@ -1,6 +1,6 @@
#! /bin/bash #! /bin/bash
echo "DEBUG: kconfiglib kconfig-tweak wrapper, arguments: ${@}" #echo "DEBUG: kconfiglib kconfig-tweak wrapper, arguments: ${@}"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
export APPSDIR="`pwd`/../apps" export APPSDIR="`pwd`/../apps"

View File

@ -0,0 +1,10 @@
#! /bin/bash
NUTTX_DIR=${1}
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# update PATH to include kconfiglib scripts
export PATH=${DIR}:${PATH}
make --no-print-directory --silent -C ${NUTTX_DIR} CONFIG_ARCH_BOARD_CUSTOM=y CONFIG_APPS_DIR="../apps" olddefconfig > nuttx_olddefconfig.log