Top-Level Makefiles. Fix a chicken-and-egg problem.

In the menuconfig target, the context dependency was executed before kconfig-mconf.  That was necessary because the link at apps/platform/board needed to be set up before creating the apps/Kconfig file.  Otherwise, the platform Kconfig files would not be included.  But this introduces the chicken-and-egg problem in some configurations.

In particular:  (1) An NX graphics configuration is used that requires auto-generation of source files using cpp, (2) the configuration is set for Linux, but (3) we are running under Cygwin with (4) a Windows native toolchain.  In this case, POSIX-style symbolic links are set up but the Windows native toolchain cannot follow them.

The reason we are running 'make menuconfig' is to change from Linux to Cygwin, but the target fails.  During the context phase, NX runs CPP to generate source files but that fails because the Windows native toolchain cannot follow the links.  Checkmate.

This was fixed by changing all of the make menuconfig (and related) targets.  They no long depend on context being run.  Instead, they depend only on the dirlinks target.  The dirlinks target only sets up the directory links but does not try to run all of the context setup; the compiler is never invoked; no code is autogeneraed; and things work.
This commit is contained in:
Gregory Nutt 2016-07-28 10:36:28 -06:00
parent 94d34bba47
commit b27df02b48
2 changed files with 10 additions and 10 deletions

View File

@ -470,32 +470,32 @@ pass2dep: context tools/mkdeps$(HOSTEXEEXT) tools/cnvwindeps$(HOSTEXEEXT)
# location: http://ymorin.is-a-geek.org/projects/kconfig-frontends. See
# README.txt file in the NuttX tools GIT repository for additional information.
do_config: context apps_preconfig
do_config: dirlinks apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf Kconfig
config: do_config clean_context
do_oldconfig: context apps_preconfig
do_oldconfig: dirlinks apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --oldconfig Kconfig
oldconfig: do_oldconfig clean_context
do_olddefconfig: context apps_preconfig
do_olddefconfig: dirlinks apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --olddefconfig Kconfig
olddefconfig: do_olddefconfig clean_context
do_menuconfig: context apps_preconfig
do_menuconfig: dirlinks apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-mconf Kconfig
menuconfig: do_menuconfig clean_context
do_qconfig: context apps_preconfig
do_qconfig: dirlinks apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-qconf Kconfig
qconfig: do_qconfig clean_context
gconfig: context apps_preconfig
gconfig: dirlinks apps_preconfig
$(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-gconf Kconfig
gconfig: do_gconfig clean_context

View File

@ -466,22 +466,22 @@ pass2dep: context tools\mkdeps$(HOSTEXEEXT)
# location: http://ymorin.is-a-geek.org/projects/kconfig-frontends. See
# misc\tools\README.txt for additional information.
do_config: context apps_preconfig
do_config: dirlinks apps_preconfig
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf Kconfig
config: do_config clean_context
do_oldconfig: context apps_preconfig
do_oldconfig: dirlinks apps_preconfig
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf --oldconfig Kconfig
oldconfig: do_oldconfig clean_context
do_olddefconfig: context apps_preconfig
do_olddefconfig: dirlinks apps_preconfig
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf --olddefconfig Kconfig
olddefconfig: do_olddefconfig clean_context
do_menuconfig: context configenv apps_preconfig
do_menuconfig: dirlinks configenv apps_preconfig
$(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-mconf Kconfig
menuconfig: do_menuconfig clean_context