Browse Source

make: improve Makefile.dep

- calls itself recursively until all dependencies are resolved
- automatically include boards/$board/Makefile.dep
- automatically include pkg/$pkg/Makefile.dep
pr/spi.typo
Kaspar Schleiser 6 years ago
parent
commit
f842619fec
  1. 17
      Makefile.dep

17
Makefile.dep

@ -1,3 +1,10 @@
#
OLD_USEMODULE := $(sort $(USEMODULE))
OLD_USEPKG := $(sort $(USEPKG))
# include board dependencies
-include $(RIOTBOARD)/$(BOARD)/Makefile.dep
# pull dependencies from drivers
include $(RIOTBASE)/drivers/Makefile.dep
@ -555,3 +562,13 @@ ifneq (,$(filter random,$(USEMODULE)))
USEMODULE += tinymt32
endif
endif
# include package dependencies
-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.dep)
# recursively catch transitive dependencies
USEMODULE := $(sort $(USEMODULE))
USEPKG := $(sort $(USEPKG))
ifneq ($(OLD_USEMODULE) $(OLD_USEPKG),$(USEMODULE) $(USEPKG))
include $(RIOTBASE)/Makefile.dep
endif

Loading…
Cancel
Save