Skip to content

Commit

Permalink
Makefile: remove usage of SUBMODULES_NOFORCE
Browse files Browse the repository at this point in the history
With RIOT-OS#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.
  • Loading branch information
fjmolinas authored and bergzand committed Jul 15, 2020
1 parent 016cfef commit 3fb34ae
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 16 deletions.
6 changes: 2 additions & 4 deletions Makefile.base
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ ifeq (1, $(SUBMODULES))
# for each $(BASE_MODULE)_<name> in USEMODULE, add <name>.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
Expand Down
3 changes: 0 additions & 3 deletions makefiles/periph.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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., <cpu>_periph_common, use periph_* as submodule prefix
BASE_MODULE := periph

Expand Down
3 changes: 0 additions & 3 deletions pkg/wolfssl/Makefile.wolfcrypt
Original file line number Diff line number Diff line change
Expand Up @@ -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

#-------------------------------------------------------------#
Expand Down
2 changes: 0 additions & 2 deletions pkg/wolfssl/Makefile.wolfssl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ MODULE = wolfssl

NO_AUTO_SRC = 1
SUBMODULES += 1
SUBMODULES_NOFORCE = 1


include $(RIOTBASE)/Makefile.base
1 change: 0 additions & 1 deletion sys/event/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
SRC := event.c

SUBMODULES := 1
SUBMODULES_NOFORCE := 1

include $(RIOTBASE)/Makefile.base
3 changes: 0 additions & 3 deletions sys/ztimer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3fb34ae

Please sign in to comment.