From 744fbc5cad749384666778a58871a8ae44df8a86 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 8 Feb 2019 12:08:38 +0100 Subject: [PATCH] make: Allow for true pseudo-submodules When providing a pseudo-submodule for a module already using the `SUBMODULES` mechanism to provide submodules, it is not possible to create a true pseudo-module as submodule (i.e. one without any code on its own), since the build system currently always expects there to be a C file `module_submodule.c`. This removes this requirement. --- Makefile.base | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.base b/Makefile.base index 5174119c09..0e171fb19b 100644 --- a/Makefile.base +++ b/Makefile.base @@ -31,7 +31,7 @@ ifeq (1, $(SUBMODULES)) BASE_MODULE ?= $(MODULE) # for each $(BASE_MODULE)_ in USEMODULE, add .c to SRC - SRC += $(patsubst $(BASE_MODULE)_%,%.c,$(filter $(BASE_MODULE)_%,$(USEMODULE))) + SRC += $(wildcard $(patsubst $(BASE_MODULE)_%,%.c,$(filter $(BASE_MODULE)_%,$(USEMODULE)))) # don't fail if a selected *.c file does not exist ifeq (1, $(SUBMODULES_NOFORCE))