From 23314486444daa5f103e7bc68c05a99df6e91d24 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Wed, 15 Apr 2020 09:43:22 +0200 Subject: [PATCH] Makefile: remove usage of SUBMODULES_NOFORCE With #10970 only existing *.c files will be added to SRC when using the SUBMODULES mechanism, so SUBMODULES_NOFORCE (used to filter out non existing source files) is now redundant so remove the usage. --- Makefile.base | 6 ++---- makefiles/periph.mk | 3 --- pkg/wolfssl/Makefile.wolfcrypt | 3 --- pkg/wolfssl/Makefile.wolfssl | 2 -- sys/event/Makefile | 1 - sys/ztimer/Makefile | 3 --- 6 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Makefile.base b/Makefile.base index b4bf77559c..d055c1a3d4 100644 --- a/Makefile.base +++ b/Makefile.base @@ -43,10 +43,8 @@ ifeq (1, $(SUBMODULES)) # for each $(BASE_MODULE)_ in USEMODULE, add .c to SRC 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)) - SRC := $(filter $(SRC), $(wildcard *.c)) - endif + # remove duplicates + SRC := $(sort $(SRC)) endif # By default consider C++ files has a .cpp extension diff --git a/makefiles/periph.mk b/makefiles/periph.mk index a35cf69da0..07564130aa 100644 --- a/makefiles/periph.mk +++ b/makefiles/periph.mk @@ -3,9 +3,6 @@ MODULE ?= periph # enable submodules SUBMODULES := 1 -# don't fail if requested submodule does not have corresponding *.c file -SUBMODULES_NOFORCE := 1 - # in case of e.g., _periph_common, use periph_* as submodule prefix BASE_MODULE := periph diff --git a/pkg/wolfssl/Makefile.wolfcrypt b/pkg/wolfssl/Makefile.wolfcrypt index e1d26727eb..3c990d9152 100644 --- a/pkg/wolfssl/Makefile.wolfcrypt +++ b/pkg/wolfssl/Makefile.wolfcrypt @@ -2,9 +2,6 @@ MODULE = wolfcrypt SUBMODULES += 1 -# Do not fail for module that do not have a file -SUBMODULES_NOFORCE = 1 - NO_AUTO_SRC = 1 #-------------------------------------------------------------# diff --git a/pkg/wolfssl/Makefile.wolfssl b/pkg/wolfssl/Makefile.wolfssl index e760f1c2be..72af91a1ef 100644 --- a/pkg/wolfssl/Makefile.wolfssl +++ b/pkg/wolfssl/Makefile.wolfssl @@ -2,7 +2,5 @@ MODULE = wolfssl NO_AUTO_SRC = 1 SUBMODULES += 1 -SUBMODULES_NOFORCE = 1 - include $(RIOTBASE)/Makefile.base diff --git a/sys/event/Makefile b/sys/event/Makefile index a456b3092f..5343c5af5d 100644 --- a/sys/event/Makefile +++ b/sys/event/Makefile @@ -1,6 +1,5 @@ SRC := event.c SUBMODULES := 1 -SUBMODULES_NOFORCE := 1 include $(RIOTBASE)/Makefile.base diff --git a/sys/ztimer/Makefile b/sys/ztimer/Makefile index 5cf7e3e1ef..2b26882483 100644 --- a/sys/ztimer/Makefile +++ b/sys/ztimer/Makefile @@ -10,9 +10,6 @@ SRC := core.c util.c # enable submodules SUBMODULES := 1 -# "ztimer_extend" does not have corresponding .c -SUBMODULES_NOFORCE := 1 - # disable obsolete warning CFLAGS += -Wno-missing-field-initializers