-DIRS = lib/System lib/Support utils lib tools
-
-ifneq ($(MAKECMDGOALS),tools-only)
-DIRS += runtime
-OPTIONAL_DIRS = examples projects
+DIRS = lib/System lib/Support utils lib
+
+ifeq ($(MAKECMDGOALS),tools-only)
+DIRS += tools
+else
+ ifneq ($(MAKECMDGOALS),libs-only)
+ DIRS += tools runtime docs
+ OPTIONAL_DIRS = examples projects
+ endif