mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
build/Kconfig: add BINDIR/APPSBINDIR to support out of tree build
First decoupling changes related to CMAKE BINDIR/APPSBINDIR: Output path of Kconfig which dynamically generated by NuttX Kernel/Apps This option is consistent with the TOPDIR/APPSDIR by default, and will be changed when out-of-tree compilation is supported Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -9,6 +9,22 @@ config APPSDIR
|
|||||||
string
|
string
|
||||||
option env="APPSDIR"
|
option env="APPSDIR"
|
||||||
|
|
||||||
|
config APPSBINDIR
|
||||||
|
string
|
||||||
|
option env="APPSBINDIR"
|
||||||
|
---help---
|
||||||
|
Output path of Kconfig which dynamically generated by NuttX Apps
|
||||||
|
This option is consistent with the APPSDIR by default, and will
|
||||||
|
be changed when out-of-tree compilation is supported
|
||||||
|
|
||||||
|
config BINDIR
|
||||||
|
string
|
||||||
|
option env="BINDIR"
|
||||||
|
---help---
|
||||||
|
Output path of Kconfig which dynamically generated by NuttX Kernel
|
||||||
|
This option is consistent with the TOPDIR by default, and will
|
||||||
|
be changed when out-of-tree compilation is supported
|
||||||
|
|
||||||
menu "License Setup"
|
menu "License Setup"
|
||||||
config ALLOW_BSD_COMPONENTS
|
config ALLOW_BSD_COMPONENTS
|
||||||
bool "Use components that have BSD licenses"
|
bool "Use components that have BSD licenses"
|
||||||
@@ -2124,7 +2140,7 @@ source "openamp/Kconfig"
|
|||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
menu "Application Configuration"
|
menu "Application Configuration"
|
||||||
source "$APPSDIR/Kconfig"
|
source "$APPSBINDIR/Kconfig"
|
||||||
endmenu
|
endmenu
|
||||||
|
|
||||||
# Support optionally including external code
|
# Support optionally including external code
|
||||||
|
|||||||
+1
-1
@@ -229,7 +229,7 @@ config ARCH_CHIP_CUSTOM_DIR_RELPATH
|
|||||||
endmenu # Custom Chip Configuration
|
endmenu # Custom Chip Configuration
|
||||||
endif #ARCH_CHIP_CUSTOM
|
endif #ARCH_CHIP_CUSTOM
|
||||||
|
|
||||||
source "arch/dummy/Kconfig"
|
source "$BINDIR/arch/dummy/Kconfig"
|
||||||
|
|
||||||
config ARCH_TOOLCHAIN_IAR
|
config ARCH_TOOLCHAIN_IAR
|
||||||
bool
|
bool
|
||||||
|
|||||||
+1
-1
@@ -3641,7 +3641,7 @@ if ARCH_BOARD_MOTEINO_MEGA
|
|||||||
source "boards/avr/atmega/moteino-mega/Kconfig"
|
source "boards/avr/atmega/moteino-mega/Kconfig"
|
||||||
endif
|
endif
|
||||||
if ARCH_BOARD_CUSTOM
|
if ARCH_BOARD_CUSTOM
|
||||||
source "boards/dummy/Kconfig"
|
source "$BINDIR/boards/dummy/Kconfig"
|
||||||
endif
|
endif
|
||||||
if ARCH_BOARD_DEMOS92S12NEC64
|
if ARCH_BOARD_DEMOS92S12NEC64
|
||||||
source "boards/hc/m9s12/demo9s12ne64/Kconfig"
|
source "boards/hc/m9s12/demo9s12ne64/Kconfig"
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
if SPECIFIC_DRIVERS
|
if SPECIFIC_DRIVERS
|
||||||
source "drivers/platform/audio/Kconfig"
|
source "$BINDIR/drivers/platform/audio/Kconfig"
|
||||||
source "drivers/platform/sensors/Kconfig"
|
source "$BINDIR/drivers/platform/sensors/Kconfig"
|
||||||
endif
|
endif
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ source "drivers/wireless/Kconfig"
|
|||||||
source "drivers/contactless/Kconfig"
|
source "drivers/contactless/Kconfig"
|
||||||
source "drivers/1wire/Kconfig"
|
source "drivers/1wire/Kconfig"
|
||||||
source "drivers/syslog/Kconfig"
|
source "drivers/syslog/Kconfig"
|
||||||
source "drivers/platform/Kconfig"
|
source "$BINDIR/drivers/platform/Kconfig"
|
||||||
source "drivers/rf/Kconfig"
|
source "drivers/rf/Kconfig"
|
||||||
source "drivers/rc/Kconfig"
|
source "drivers/rc/Kconfig"
|
||||||
source "drivers/motor/Kconfig"
|
source "drivers/motor/Kconfig"
|
||||||
|
|||||||
+11
-8
@@ -602,43 +602,46 @@ pass2dep: context tools/mkdeps$(HOSTEXEEXT) tools/cnvwindeps$(HOSTEXEEXT)
|
|||||||
# location: https://bitbucket.org/nuttx/tools/downloads/. See README.txt
|
# location: https://bitbucket.org/nuttx/tools/downloads/. See README.txt
|
||||||
# file in the NuttX tools GIT repository for additional information.
|
# file in the NuttX tools GIT repository for additional information.
|
||||||
|
|
||||||
|
KCONFIG_ENV = APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR)
|
||||||
|
KCONFIG_ENV += APPSBINDIR=${CONFIG_APPS_DIR} BINDIR=${TOPDIR}
|
||||||
|
|
||||||
config:
|
config:
|
||||||
$(Q) $(MAKE) clean_context
|
$(Q) $(MAKE) clean_context
|
||||||
$(Q) $(MAKE) apps_preconfig
|
$(Q) $(MAKE) apps_preconfig
|
||||||
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR) kconfig-conf Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-conf Kconfig
|
||||||
|
|
||||||
oldconfig:
|
oldconfig:
|
||||||
$(Q) $(MAKE) clean_context
|
$(Q) $(MAKE) clean_context
|
||||||
$(Q) $(MAKE) apps_preconfig
|
$(Q) $(MAKE) apps_preconfig
|
||||||
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR) kconfig-conf --oldconfig Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-conf --oldconfig Kconfig
|
||||||
|
|
||||||
olddefconfig:
|
olddefconfig:
|
||||||
$(Q) $(MAKE) clean_context
|
$(Q) $(MAKE) clean_context
|
||||||
$(Q) $(MAKE) apps_preconfig
|
$(Q) $(MAKE) apps_preconfig
|
||||||
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR) kconfig-conf --olddefconfig Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-conf --olddefconfig Kconfig
|
||||||
|
|
||||||
menuconfig:
|
menuconfig:
|
||||||
$(Q) $(MAKE) clean_context
|
$(Q) $(MAKE) clean_context
|
||||||
$(Q) $(MAKE) apps_preconfig
|
$(Q) $(MAKE) apps_preconfig
|
||||||
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR) kconfig-mconf Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-mconf Kconfig
|
||||||
|
|
||||||
nconfig: apps_preconfig
|
nconfig: apps_preconfig
|
||||||
$(Q) $(MAKE) clean_context
|
$(Q) $(MAKE) clean_context
|
||||||
$(Q) $(MAKE) apps_preconfig
|
$(Q) $(MAKE) apps_preconfig
|
||||||
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR) kconfig-nconf Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-nconf Kconfig
|
||||||
|
|
||||||
qconfig: apps_preconfig
|
qconfig: apps_preconfig
|
||||||
$(Q) $(MAKE) clean_context
|
$(Q) $(MAKE) clean_context
|
||||||
$(Q) $(MAKE) apps_preconfig
|
$(Q) $(MAKE) apps_preconfig
|
||||||
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR) kconfig-qconf Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-qconf Kconfig
|
||||||
|
|
||||||
gconfig: apps_preconfig
|
gconfig: apps_preconfig
|
||||||
$(Q) $(MAKE) clean_context
|
$(Q) $(MAKE) clean_context
|
||||||
$(Q) $(MAKE) apps_preconfig
|
$(Q) $(MAKE) apps_preconfig
|
||||||
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR) kconfig-gconf Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-gconf Kconfig
|
||||||
|
|
||||||
savedefconfig: apps_preconfig
|
savedefconfig: apps_preconfig
|
||||||
$(Q) APPSDIR=${CONFIG_APPS_DIR} EXTERNALDIR=$(EXTERNALDIR) kconfig-conf --savedefconfig defconfig.tmp Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-conf --savedefconfig defconfig.tmp Kconfig
|
||||||
$(Q) kconfig-tweak --file defconfig.tmp -u CONFIG_APPS_DIR
|
$(Q) kconfig-tweak --file defconfig.tmp -u CONFIG_APPS_DIR
|
||||||
$(Q) grep "CONFIG_ARCH=" .config >> defconfig.tmp
|
$(Q) grep "CONFIG_ARCH=" .config >> defconfig.tmp
|
||||||
$(Q) grep "^CONFIG_ARCH_CHIP_" .config >> defconfig.tmp; true
|
$(Q) grep "^CONFIG_ARCH_CHIP_" .config >> defconfig.tmp; true
|
||||||
|
|||||||
+11
-6
@@ -571,33 +571,38 @@ pass2dep: context tools\mkdeps$(HOSTEXEEXT)
|
|||||||
# location: https://bitbucket.org/nuttx/tools/downloads/. See
|
# location: https://bitbucket.org/nuttx/tools/downloads/. See
|
||||||
# misc\tools\README.txt for additional information.
|
# misc\tools\README.txt for additional information.
|
||||||
|
|
||||||
|
KCONFIG_ENV = set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR}) & \
|
||||||
|
set EXTERNALDIR=$(EXTERNALDIR) & \
|
||||||
|
set APPSBINDIR=$(patsubst "%",%,${CONFIG_APPS_DIR}) & \
|
||||||
|
set BINDIR=$(patsubst "%",%,${TOPDIR}) &
|
||||||
|
|
||||||
config:
|
config:
|
||||||
$(Q) $(MAKE) clean_context
|
$(Q) $(MAKE) clean_context
|
||||||
$(Q) $(MAKE) apps_preconfig
|
$(Q) $(MAKE) apps_preconfig
|
||||||
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& set EXTERNALDIR=$(EXTERNALDIR)& kconfig-conf Kconfig
|
$(Q) $(KCONFIG_ENV) kconfig-conf Kconfig
|
||||||
|
|
||||||
oldconfig:
|
oldconfig:
|
||||||
$(Q) $(MAKE) clean_context
|
$(Q) $(MAKE) clean_context
|
||||||
$(Q) $(MAKE) apps_preconfig
|
$(Q) $(MAKE) apps_preconfig
|
||||||
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& set EXTERNALDIR=$(EXTERNALDIR)& kconfig-conf --oldconfig Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-conf --oldconfig Kconfig
|
||||||
|
|
||||||
olddefconfig:
|
olddefconfig:
|
||||||
$(Q) $(MAKE) clean_context
|
$(Q) $(MAKE) clean_context
|
||||||
$(Q) $(MAKE) apps_preconfig
|
$(Q) $(MAKE) apps_preconfig
|
||||||
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& set EXTERNALDIR=$(EXTERNALDIR)& kconfig-conf --olddefconfig Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-conf --olddefconfig Kconfig
|
||||||
|
|
||||||
menuconfig:
|
menuconfig:
|
||||||
$(Q) $(MAKE) clean_context
|
$(Q) $(MAKE) clean_context
|
||||||
$(Q) $(MAKE) apps_preconfig
|
$(Q) $(MAKE) apps_preconfig
|
||||||
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& set EXTERNALDIR=$(EXTERNALDIR)& kconfig-mconf Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-mconf Kconfig
|
||||||
|
|
||||||
nconfig:
|
nconfig:
|
||||||
$(Q) $(MAKE) clean_context
|
$(Q) $(MAKE) clean_context
|
||||||
$(Q) $(MAKE) apps_preconfig
|
$(Q) $(MAKE) apps_preconfig
|
||||||
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& set EXTERNALDIR=$(EXTERNALDIR)& kconfig-nconf Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-nconf Kconfig
|
||||||
|
|
||||||
savedefconfig: apps_preconfig
|
savedefconfig: apps_preconfig
|
||||||
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& set EXTERNALDIR=$(EXTERNALDIR)& kconfig-conf --savedefconfig defconfig.tmp Kconfig
|
$(Q) ${KCONFIG_ENV} kconfig-conf --savedefconfig defconfig.tmp Kconfig
|
||||||
$(Q) kconfig-tweak --file defconfig.tmp -u CONFIG_APPS_DIR
|
$(Q) kconfig-tweak --file defconfig.tmp -u CONFIG_APPS_DIR
|
||||||
$(Q) grep "CONFIG_ARCH=" .config >> defconfig.tmp
|
$(Q) grep "CONFIG_ARCH=" .config >> defconfig.tmp
|
||||||
-$(Q) grep "^CONFIG_ARCH_CHIP_" .config >> defconfig.tmp
|
-$(Q) grep "^CONFIG_ARCH_CHIP_" .config >> defconfig.tmp
|
||||||
|
|||||||
Reference in New Issue
Block a user