From b098108c99d98adfa9f2fb9033b7c29b9b3dc364 Mon Sep 17 00:00:00 2001 From: Juergen Fitschen Date: Sat, 23 May 2020 16:40:54 +0200 Subject: [PATCH] ztimer_xtimer_compat: move PSEUDOMODULES definition to Makefile.include --- sys/Makefile.include | 6 ++++++ sys/ztimer/Makefile.dep | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/Makefile.include b/sys/Makefile.include index f6add34d89..5832c2e7f2 100644 --- a/sys/Makefile.include +++ b/sys/Makefile.include @@ -111,3 +111,9 @@ endif ifneq (,$(filter zptr,$(USEMODULE))) include $(RIOTBASE)/sys/zptr/Makefile.include endif + +# Convert xtimer into a pseudo module if its API is already implemented by +# ztimer's compatibility wrapper +ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) + PSEUDOMODULES += xtimer +endif diff --git a/sys/ztimer/Makefile.dep b/sys/ztimer/Makefile.dep index 96fdee11dc..d616f82849 100644 --- a/sys/ztimer/Makefile.dep +++ b/sys/ztimer/Makefile.dep @@ -42,7 +42,6 @@ endif ifneq (,$(filter ztimer_xtimer_compat,$(USEMODULE))) USEMODULE += div USEMODULE += ztimer_usec - PSEUDOMODULES += xtimer endif ifneq (,$(filter ztimer_%,$(USEMODULE)))