make: fix '--plugins=' option not being respected in all cases

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit d6d4ff7af26d2b9456fa64ffe6bd5fa3b8276200
Author: Aidan MacDonald <[email protected]>
Date:   Fri Mar 6 14:33:31 2026 +0000

    make: fix '--plugins=' option not being respected in all cases
    
    If the list of plugins given to configure did not include
    a subdir-based plugin, then all subdir-based plugins would
    be built (since SELECTED_PLUGINS_SUBDIRS is empty then).
    
    To prevent this issue use an explicit value ('DEFAULT') to
    signal that we want to build the standard set of plugins.
    
    Change-Id: I42d9dc8d754ed9ac1cd4b5c62c0a106ca3dfcd91

diff --git a/apps/plugins/plugins.make b/apps/plugins/plugins.make
index 6132a177f4..db414059d3 100644
--- a/apps/plugins/plugins.make
+++ b/apps/plugins/plugins.make
@@ -20,7 +20,7 @@ ifeq ($(APP_TYPE),ctru-app)
     is_app_build =
 endif
 
-ifdef SELECTED_PLUGINS_SRC
+ifneq ($(SELECTED_PLUGINS_SRC),DEFAULT)
 PLUGINS_SRC = $(SELECTED_PLUGINS_SRC)
 else
 ifdef is_app_build
@@ -28,7 +28,7 @@ PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES.app_build)
 else
 PLUGINS_SRC = $(call preprocess, $(APPSDIR)/plugins/SOURCES)
 endif
-endif # ifdef SELECTED_PLUGINS_SRC
+endif # if SELECTED_PLUGINS_SRC
 OTHER_SRC += $(PLUGINS_SRC)
 ROCKS1 := $(PLUGINS_SRC:.c=.rock)
 ROCKS1 := $(call full_path_subst,$(ROOTDIR)/%,$(BUILDDIR)/%,$(ROCKS1))
@@ -62,7 +62,7 @@ endif
 OTHER_SRC += $(ROOTDIR)/apps/plugins/plugin_crt0.c
 PLUGIN_CRT0 := $(BUILDDIR)/apps/plugins/plugin_crt0.o
 # multifile plugins (subdirs):
-ifdef SELECTED_PLUGINS_SUBDIRS
+ifneq ($(SELECTED_PLUGINS_SUBDIRS),DEFAULT)
 PLUGINSUBDIRS := $(SELECTED_PLUGINS_SUBDIRS)
 else
 ifdef is_app_build
@@ -70,7 +70,7 @@ PLUGINSUBDIRS := $(call preprocess, $(APPSDIR)/plugins/SUBDIRS.app_build)
 else
 PLUGINSUBDIRS := $(call preprocess, $(APPSDIR)/plugins/SUBDIRS)
 endif
-endif # ifdef SELECTED_PLUGINS_SUBDIRS
+endif # if SELECTED_PLUGINS_SUBDIRS
 
 PLUGIN_LIBS := $(PLUGINLIB) $(PLUGINBITMAPLIB) $(SETJMPLIB) $(FIXEDPOINTLIB)
 
diff --git a/tools/configure b/tools/configure
index 7e48cc93a1..cf15942b35 100755
--- a/tools/configure
+++ b/tools/configure
@@ -4848,6 +4848,10 @@ if [ -n "$ARG_PLUGINS" ]; then
              echo "Warning: Plugin '$p' found neither as file nor directory in $chk_plugin_dir. Use ':' as the separator."
         fi
     done
+else
+    # Build the default set of plugins
+    selected_src="DEFAULT"
+    selected_subdirs="DEFAULT"
 fi
 
 ### end of cmdline
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.