From c8f9d850026676caffb5e4eeaa98ce3618ce6d68 Mon Sep 17 00:00:00 2001 From: Jose Alamos Date: Fri, 9 Jul 2021 13:29:07 +0200 Subject: [PATCH] shell_commands/gnrc_netif: fix gnrc_netif_cmd_lora dependency This commit fixes the dependency resolution of `gnrc_netif_cmd_lora`. As it was, this module was pulled by the driver if `gnrc` was used. Besides pulling an extra dependency in applications that don't use `shell_commands` or `gnrc_lorawan`, this hardcodes the module resolution in the drivers. This commit pulls `gnrc_netif_cmd_lora` if `shell_commands` and `gnrc_lorawan` are present. --- drivers/sx127x/Makefile.dep | 5 ----- sys/Makefile.dep | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/sx127x/Makefile.dep b/drivers/sx127x/Makefile.dep index 2b79600317..3b0cd904ad 100644 --- a/drivers/sx127x/Makefile.dep +++ b/drivers/sx127x/Makefile.dep @@ -7,8 +7,3 @@ USEMODULE += ztimer_usec USEMODULE += ztimer_msec USEMODULE += lora - -ifneq (,$(filter gnrc,$(USEMODULE))) - # Pull in `ifconfig` support for LoRA - USEMODULE += gnrc_netif_cmd_lora -endif diff --git a/sys/Makefile.dep b/sys/Makefile.dep index 9e1bd58772..8a4322f76f 100644 --- a/sys/Makefile.dep +++ b/sys/Makefile.dep @@ -262,6 +262,10 @@ ifneq (,$(filter shell_commands,$(USEMODULE))) USEMODULE += netif USEMODULE += ipv6_addr endif + + ifneq (,$(filter gnrc_lorawan,$(USEMODULE))) + USEMODULE += gnrc_netif_cmd_lora + endif endif ifneq (,$(filter posix_semaphore,$(USEMODULE)))