1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

makefiles/modules.inc.mk: factorize in _ALLMODULES

Factorize the reused value in a private variable.

I define it private as somehow 'USEPKG' is supposed to be removed so the
variables can be removed later.
This commit is contained in:
Gaëtan Harter 2019-03-05 15:48:28 +01:00
parent b6645b531b
commit c2b1995af7
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B

View File

@ -1,9 +1,11 @@
ED = $(addprefix MODULE_,$(sort $(USEMODULE) $(USEPKG)))
_ALLMODULES = $(sort $(USEMODULE) $(USEPKG))
ED = $(addprefix MODULE_,$(_ALLMODULES))
EXTDEFINES = $(addprefix -D,$(shell echo '$(ED)' | tr 'a-z-' 'A-Z_'))
# filter "pseudomodules" from "real modules", but not "no_pseudomodules"
NO_PSEUDOMODULES := $(filter $(NO_PSEUDOMODULES), $(sort $(USEMODULE) $(USEPKG)))
REALMODULES = $(filter-out $(PSEUDOMODULES), $(sort $(USEMODULE) $(USEPKG))) $(NO_PSEUDOMODULES)
NO_PSEUDOMODULES := $(filter $(NO_PSEUDOMODULES), $(_ALLMODULES))
REALMODULES = $(filter-out $(PSEUDOMODULES), $(_ALLMODULES)) $(NO_PSEUDOMODULES)
BASELIBS += $(REALMODULES:%=$(BINDIR)/%.a)
CFLAGS += $(EXTDEFINES)