diff --git a/Makefile.include b/Makefile.include index dcea932fa1..ab7309978a 100644 --- a/Makefile.include +++ b/Makefile.include @@ -934,7 +934,7 @@ include $(RIOTMAKE)/tools/targets.inc.mk include $(RIOTMAKE)/usb-codes.inc.mk # Warn if the selected board and drivers don't provide all needed features: -ifneq (, $(filter all flash, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all))) +ifeq (, $(filter help generate-Makefile.ci, $(MAKECMDGOALS))) EXPECT_ERRORS := # Test if there where dependencies against a module in DISABLE_MODULE. @@ -1012,7 +1012,8 @@ endif help: # filter all targets starting with lowercase and containing lowercase letters, hyphens, or underscores; explicitly include generate-Makefile.ci - @$(MAKE) -qp | sed -ne 's/\(^[a-z][a-z_-]*\|generate-Makefile.ci\):.*/\1/p' | sort -u + # inspired by: https://stackoverflow.com/a/26339924 + @LC_ALL=C $(MAKE) -pRrq -f $(firstword $(MAKEFILE_LIST)) : 2>/dev/null | sed -ne 's/\(^[a-z][a-z_-]*\|generate-Makefile.ci\):.*/\1/p' | sort -u ifeq (iotlab-m3,$(BOARD)) ifneq (,$(filter iotlab-%,$(MAKECMDGOALS)))