diff --git a/Makefile.include b/Makefile.include
index 5ad995f689fe638e8b1bed574f7d2da9fb4dbcd1..6de19126ac7dc8d7c93939ff8a9f821eeffb1152 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -101,7 +101,7 @@ debug:
 	$(DEBUGGER) $(DEBUGGER_FLAGS)
 
 buildtest:
-	@for BOARD in $$(sed -n -e 's/ifeq[^,]*,\([^)]*\))/\1/p' $(RIOTBOARD)/Makefile.base); do \
+	@for BOARD in $$(find $(RIOTBOARD) -mindepth 1 -maxdepth 1 -type d \! -name \*-common -printf '%f\n' ); do \
 		echo -n "Building for $${BOARD} .. "; \
 		env -i HOME=$${HOME} PATH=$${PATH} BOARD=$${BOARD} RIOTBASE=$${RIOTBASE} RIOTBOARD=$${RIOTBOARD} RIOTCPU=$${RIOTCPU} $(MAKE) -B clean all >/dev/null 2>&1 && echo "success" || echo "failed"  ; \
 	done