Automatically remove dups in $(USEMODULE)

This commit is contained in:
René Kijewski 2014-02-24 14:52:50 +01:00
parent 852618476c
commit a8064fd97c
13 changed files with 58 additions and 168 deletions

View File

@ -1,37 +1,21 @@
ifneq (,$(filter libcoap,$(USEPKG))) ifneq (,$(filter libcoap,$(USEPKG)))
ifeq (,$(filter pnet,$(USEMODULE))) USEMODULE += pnet
USEMODULE += pnet
endif
endif endif
ifneq (,$(filter pnet,$(USEMODULE))) ifneq (,$(filter pnet,$(USEMODULE)))
ifeq (,$(filter posix,$(USEMODULE))) USEMODULE += posix
USEMODULE += posix USEMODULE += destiny
endif USEMODULE += net_help
ifeq (,$(filter destiny,$(USEMODULE)))
USEMODULE += destiny
endif
ifeq (,$(filter net_help,$(USEMODULE)))
USEMODULE += net_help
endif
endif endif
ifneq (,$(filter destiny,$(USEMODULE))) ifneq (,$(filter destiny,$(USEMODULE)))
ifeq (,$(filter sixlowpan,$(USEMODULE))) USEMODULE += sixlowpan
USEMODULE += sixlowpan USEMODULE += net_help
endif USEMODULE += vtimer
ifeq (,$(filter net_help,$(USEMODULE)))
USEMODULE += net_help
endif
ifeq (,$(filter vtimer,$(USEMODULE)))
USEMODULE += vtimer
endif
endif endif
ifneq (,$(filter sixlowborder,$(USEMODULE))) ifneq (,$(filter sixlowborder,$(USEMODULE)))
ifeq (,$(filter sixlowpan,$(USEMODULE))) USEMODULE += sixlowpan
USEMODULE += sixlowpan
endif
endif endif
ifneq (,$(filter rpl,$(USEMODULE))) ifneq (,$(filter rpl,$(USEMODULE)))
@ -43,94 +27,52 @@ ifneq (,$(filter routing,$(USEMODULE)))
endif endif
ifneq (,$(filter sixlowpan,$(USEMODULE))) ifneq (,$(filter sixlowpan,$(USEMODULE)))
ifeq (,$(filter ieee802154,$(USEMODULE))) USEMODULE += ieee802154
USEMODULE += ieee802154 USEMODULE += net_help
endif USEMODULE += net_if
ifeq (,$(filter net_help,$(USEMODULE))) USEMODULE += posix
USEMODULE += net_help USEMODULE += vtimer
endif
ifeq (,$(filter net_if,$(USEMODULE)))
USEMODULE += net_if
endif
ifeq (,$(filter posix, $(USEMODULE)))
USEMODULE += posix
endif
ifeq (,$(filter vtimer, $(USEMODULE)))
USEMODULE += vtimer
endif
endif endif
ifneq (,$(filter posix,$(USEMODULE))) ifneq (,$(filter posix,$(USEMODULE)))
ifeq (,$(filter uart0,$(USEMODULE))) USEMODULE += uart0
USEMODULE += uart0 USEMODULE += timex
endif USEMODULE += vtimer
ifeq (,$(filter timex,$(USEMODULE)))
USEMODULE += timex
endif
ifeq (,$(filter vtimer,$(USEMODULE)))
USEMODULE += vtimer
endif
endif endif
ifneq (,$(filter uart0,$(USEMODULE))) ifneq (,$(filter uart0,$(USEMODULE)))
ifeq (,$(filter lib,$(USEMODULE))) USEMODULE += lib
USEMODULE += lib USEMODULE += posix
endif
ifeq (,$(filter posix,$(USEMODULE)))
USEMODULE += posix
endif
endif endif
ifneq (,$(filter cc110x%,$(USEMODULE))) ifneq (,$(filter cc110x%,$(USEMODULE)))
ifeq (,$(filter protocol_multiplex,$(USEMODULE))) USEMODULE += protocol_multiplex
USEMODULE += protocol_multiplex USEMODULE += vtimer
endif
ifeq (,$(filter vtimer,$(USEMODULE)))
USEMODULE += vtimer
endif
endif endif
ifneq (,$(filter cc110x_ng,$(USEMODULE))) ifneq (,$(filter cc110x_ng,$(USEMODULE)))
ifeq (,$(filter transceiver,$(USEMODULE))) USEMODULE += transceiver
USEMODULE += transceiver
endif
endif endif
ifneq (,$(filter cc2420,$(USEMODULE))) ifneq (,$(filter cc2420,$(USEMODULE)))
ifeq (,$(filter transceiver,$(USEMODULE))) USEMODULE += transceiver
USEMODULE += transceiver USEMODULE += ieee802154
endif
ifeq (,$(filter ieee802154,$(USEMODULE)))
USEMODULE += ieee802154
endif
endif endif
ifneq (,$(filter at86rf231,$(USEMODULE))) ifneq (,$(filter at86rf231,$(USEMODULE)))
ifeq (,$(filter transceiver,$(USEMODULE))) USEMODULE += transceiver
USEMODULE += transceiver USEMODULE += ieee802154
endif USEMODULE += vtimer
ifeq (,$(filter ieee802154,$(USEMODULE)))
USEMODULE += ieee802154
endif
ifeq (,$(filter vtimer,$(USEMODULE)))
USEMODULE += vtimer
endif
endif endif
ifneq (,$(filter vtimer,$(USEMODULE))) ifneq (,$(filter vtimer,$(USEMODULE)))
ifeq (,$(filter timex,$(USEMODULE))) USEMODULE += timex
USEMODULE += timex
endif
endif endif
ifneq (,$(filter net_if,$(USEMODULE))) ifneq (,$(filter net_if,$(USEMODULE)))
ifeq (,$(filter transceiver,$(USEMODULE))) USEMODULE += transceiver
USEMODULE += transceiver
endif
endif endif
ifneq (,$(filter shell_commands,$(USEMODULE))) ifneq (,$(filter shell_commands,$(USEMODULE)))
ifneq (,$(filter net_if,$(USEMODULE))) USEMODULE += net_help
USEMODULE += net_help
endif
endif endif

View File

@ -6,9 +6,9 @@ USEMODULE += $(filter-out $(DISABLE_MODULE), $(DEFAULT_MODULE))
INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include
ED = $(USEMODULE:%=-DMODULE_%) ED = $(USEMODULE:%=-DMODULE_%)
ED += $(USEPKG:%=-DMODULE_%) ED += $(USEPKG:%=-DMODULE_%)
EXTDEFINES = $(shell echo $(ED)|tr 'a-z' 'A-Z') EXTDEFINES = $(shell echo $(sort $(ED))|tr 'a-z' 'A-Z')
REALMODULES = $(filter-out $(PSEUDOMODULES), $(USEMODULE)) REALMODULES = $(filter-out $(PSEUDOMODULES), $(sort $(USEMODULE)))
export BASELIBS = $(REALMODULES:%= $(BINDIR)%.a) export BASELIBS = $(REALMODULES:%=$(BINDIR)%.a)
CFLAGS += $(EXTDEFINES) CFLAGS += $(EXTDEFINES)

View File

@ -1,12 +1,8 @@
export INCLUDES += -I$(RIOTBOARD)/avsextrem/include export INCLUDES += -I$(RIOTBOARD)/avsextrem/include
ifneq (,$(filter defaulttransceiver,$(USEMODULE))) ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
ifeq (,$(filter cc110x,$(USEMODULE))) USEMODULE += cc110x
USEMODULE += cc110x USEMODULE += transceiver
endif
ifeq (,$(filter transceiver,$(USEMODULE)))
USEMODULE += transceiver
endif
endif endif
ifneq (,$(filter cc110x,$(USEMODULE))) ifneq (,$(filter cc110x,$(USEMODULE)))

View File

@ -1,8 +1,4 @@
ifneq (,$(filter defaulttransceiver,$(USEMODULE))) ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
ifeq (,$(filter cc110x_ng,$(USEMODULE))) USEMODULE += cc110x_ng
USEMODULE += cc110x_ng USEMODULE += transceiver
endif
ifeq (,$(filter transceiver,$(USEMODULE)))
USEMODULE += transceiver
endif
endif endif

View File

@ -1,14 +1,8 @@
ifneq (,$(filter defaulttransceiver,$(USEMODULE))) ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
ifeq (,$(filter cc110x_ng,$(USEMODULE))) USEMODULE += cc110x_ng
USEMODULE += cc110x_ng USEMODULE += transceiver
endif
ifeq (,$(filter transceiver,$(USEMODULE)))
USEMODULE += transceiver
endif
endif endif
ifneq (,$(filter cc110x_ng,$(USEMODULE))) ifneq (,$(filter cc110x_ng,$(USEMODULE)))
ifeq (,$(filter cc110x_spi,$(USEMODULE))) USEMODULE += cc110x_spi
USEMODULE += cc110x_spi
endif
endif endif

View File

@ -1,20 +1,12 @@
ifneq (,$(filter cc110x,$(USEMODULE))) ifneq (,$(filter cc110x,$(USEMODULE)))
ifeq (,$(filter gpioint,$(USEMODULE))) USEMODULE += gpioint
USEMODULE += gpioint
endif
endif endif
ifneq (,$(filter cc110x_ng,$(USEMODULE))) ifneq (,$(filter cc110x_ng,$(USEMODULE)))
ifeq (,$(filter cc110x_spi,$(USEMODULE))) USEMODULE += cc110x_spi
USEMODULE += cc110x_spi USEMODULE += gpioint
endif
ifeq (,$(filter gpioint,$(USEMODULE)))
USEMODULE += gpioint
endif
endif endif
ifneq (,$(filter ltc4150,$(USEMODULE))) ifneq (,$(filter ltc4150,$(USEMODULE)))
ifeq (,$(filter gpioint,$(USEMODULE))) USEMODULE += gpioint
USEMODULE += gpioint
endif
endif endif

View File

@ -1,12 +1,8 @@
export INCLUDES += -I$(RIOTBOARD)/msba2/include export INCLUDES += -I$(RIOTBOARD)/msba2/include
ifneq (,$(filter defaulttransceiver,$(USEMODULE))) ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
ifeq (,$(filter cc110x_ng,$(USEMODULE))) USEMODULE += cc110x_ng
USEMODULE += cc110x_ng USEMODULE += transceiver
endif
ifeq (,$(filter transceiver,$(USEMODULE)))
USEMODULE += transceiver
endif
endif endif
include $(RIOTBOARD)/msba2-common/Makefile.include include $(RIOTBOARD)/msba2-common/Makefile.include

View File

@ -1,8 +1,4 @@
ifneq (,$(filter defaulttransceiver,$(USEMODULE))) ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
ifeq (,$(filter nativenet,$(USEMODULE))) USEMODULE += nativenet
USEMODULE += nativenet USEMODULE += transceiver
endif
ifeq (,$(filter transceiver,$(USEMODULE)))
USEMODULE += transceiver
endif
endif endif

View File

@ -2,12 +2,8 @@ export INCLUDES += -I$(RIOTBOARD)/pttu/include
# Enable this after fixing https://github.com/RIOT-OS/RIOT/issues/659 # Enable this after fixing https://github.com/RIOT-OS/RIOT/issues/659
#ifneq (,$(filter defaulttransceiver,$(USEMODULE))) #ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
# ifeq (,$(filter cc110x,$(USEMODULE))) # USEMODULE += cc110x
# USEMODULE += cc110x # USEMODULE += transceiver
# endif
# ifeq (,$(filter transceiver,$(USEMODULE)))
# USEMODULE += transceiver
# endif
#endif #endif
include $(RIOTBOARD)/msba2-common/Makefile.include include $(RIOTBOARD)/msba2-common/Makefile.include

View File

@ -33,12 +33,8 @@ export INCLUDES += -I$(RIOTCPU)/$(CPU)/maca/include
export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/drivers/include export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/drivers/include
ifneq (,$(filter defaulttransceiver,$(USEMODULE))) ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
ifeq (,$(filter mc1322x,$(USEMODULE))) USEMODULE += mc1322x
USEMODULE += mc1322x USEMODULE += transceiver
endif
ifeq (,$(filter transceiver,$(USEMODULE)))
USEMODULE += transceiver
endif
endif endif
export UNDEF += $(BINDIR)cpu/startup.o export UNDEF += $(BINDIR)cpu/startup.o

View File

@ -26,12 +26,8 @@ export INCLUDES += -I$(RIOTCPU)/msp430-common/include -I$(RIOTBOARD)/$(BOARD)/in
export OFLAGS = -O ihex export OFLAGS = -O ihex
ifneq (,$(filter defaulttransceiver,$(USEMODULE))) ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
ifeq (,$(filter cc2240,$(USEMODULE))) USEMODULE += cc2420
USEMODULE += cc2420 USEMODULE += transceiver
endif
ifeq (,$(filter transceiver,$(USEMODULE)))
USEMODULE += transceiver
endif
endif endif
export UNDEF += $(BINDIR)msp430_common/startup.o export UNDEF += $(BINDIR)msp430_common/startup.o

View File

@ -1,16 +1,10 @@
ifneq (,$(filter defaulttransceiver,$(USEMODULE))) ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
ifeq (,$(filter cc110x_ng,$(USEMODULE))) USEMODULE += cc110x_ng
USEMODULE += cc110x_ng USEMODULE += transceiver
endif
ifeq (,$(filter transceiver,$(USEMODULE)))
USEMODULE += transceiver
endif
endif endif
ifneq (,$(filter cc110x_ng,$(USEMODULE))) ifneq (,$(filter cc110x_ng,$(USEMODULE)))
ifeq (,$(filter cc110x_spi,$(USEMODULE))) USEMODULE += cc110x_spi
USEMODULE += cc110x_spi
endif
endif endif
USEMODULE += msp430_common USEMODULE += msp430_common

View File

@ -1,10 +1,6 @@
USEMODULE += msp430_common USEMODULE += msp430_common
ifneq (,$(filter defaulttransceiver,$(USEMODULE))) ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
ifeq (,$(filter cc2420,$(USEMODULE))) USEMODULE += cc2420
USEMODULE += cc2420 USEMODULE += transceiver
endif
ifeq (,$(filter transceiver,$(USEMODULE)))
USEMODULE += transceiver
endif
endif endif