diff --git a/builtin/CMakeLists.txt b/builtin/CMakeLists.txt index 3d8b244e4fe..13ab757f30b 100644 --- a/builtin/CMakeLists.txt +++ b/builtin/CMakeLists.txt @@ -20,7 +20,7 @@ # # ############################################################################## -if(CONFIG_BUILTIN) +if(CONFIG_APP_REGISTRY) include_directories(${CMAKE_CURRENT_BINARY_DIR}) @@ -54,8 +54,11 @@ if(CONFIG_BUILTIN) set(CSRCS) - list(APPEND CSRCS builtin_list.c exec_builtin.c builtin_list.h - builtin_proto.h) + list(APPEND CSRCS builtin_list.c builtin_list.h builtin_proto.h) + + if(CONFIG_BUILTIN) + list(APPEND CSRCS exec_builtin.c) + endif() # target_sources(apps PRIVATE ${CSRCS}) nuttx_add_library(apps_builtin ${CSRCS}) diff --git a/builtin/Make.defs b/builtin/Make.defs index 47d1bf96004..b59d86e6afc 100644 --- a/builtin/Make.defs +++ b/builtin/Make.defs @@ -20,6 +20,6 @@ # ############################################################################ -ifneq ($(CONFIG_BUILTIN),) +ifneq ($(CONFIG_APP_REGISTRY),) CONFIGURED_APPS += $(APPDIR)/builtin endif diff --git a/builtin/Makefile b/builtin/Makefile index a5de31f6c5e..a551b6ef156 100644 --- a/builtin/Makefile +++ b/builtin/Makefile @@ -24,7 +24,10 @@ include $(APPDIR)/Make.defs # Source and object files -CSRCS = builtin_list.c exec_builtin.c +CSRCS = builtin_list.c +ifeq ($(CONFIG_BUILTIN),y) +CSRCS += exec_builtin.c +endif # Registry entry lists diff --git a/nshlib/nsh_fileapps.c b/nshlib/nsh_fileapps.c index 66f41e36fc8..e889ce32205 100644 --- a/nshlib/nsh_fileapps.c +++ b/nshlib/nsh_fileapps.c @@ -79,7 +79,7 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, pid_t pid; int rc = 0; int ret; -#ifdef CONFIG_BUILTIN +#ifdef CONFIG_APP_REGISTRY FAR char *appname; int index; #endif @@ -212,7 +212,7 @@ int nsh_fileapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, } } -#ifdef CONFIG_BUILTIN +#ifdef CONFIG_APP_REGISTRY /* Check if a builtin application with this name exists */ appname = basename((FAR char *)cmd);