From ebd438cb58367c61419e7dca88dfaaec57d850c7 Mon Sep 17 00:00:00 2001
From: cladmi <gaetan.harter@fu-berlin.de>
Date: Wed, 26 Sep 2018 17:41:48 +0200
Subject: [PATCH] sys/shell: select sc_rtc on USEMODULE

sc_rtc.c should only be compiled if periph_rtc module is actually used.

In practice there was not linking error when PERIPH_OPTIONAL|_REQUIRED
was not set as shell_commands hides calling the functions with
'#ifdef MODULE_PERIPH_RTC'.
---
 sys/shell/commands/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/shell/commands/Makefile b/sys/shell/commands/Makefile
index 9f5c4604f1..268a6481c0 100644
--- a/sys/shell/commands/Makefile
+++ b/sys/shell/commands/Makefile
@@ -70,7 +70,7 @@ ifneq (,$(filter cord_ep,$(USEMODULE)))
   SRC += sc_cord_ep.c
 endif
 
-ifneq (,$(filter periph_rtc,$(FEATURES_PROVIDED)))
+ifneq (,$(filter periph_rtc,$(USEMODULE)))
   SRC += sc_rtc.c
 endif
 
-- 
GitLab