-TARGETS-y:=kernel-headers
-TARGETS-$(CONFIG_GDB) += gdb
-TARGETS-$(CONFIG_CCACHE) += ccache
-ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
- TARGETS-y+=binutils gcc uClibc
-endif
-
-TARGETS_DOWNLOAD:=$(patsubst %,%-download,$(TARGETS-y))
-TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
-TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
+# subdirectories to descend into
+$(curdir)/builddirs := kernel-headers $(if $(CONFIG_GDB),gdb) $(if $(CONFIG_NATIVE_TOOLCHAIN),,binutils gcc uClibc)
+$(curdir)/builddirs-compile:=. $(filter-out kernel-headers,$($(curdir)/builddirs))
+$(curdir)/builddirs-install:=$($(curdir)/builddirs-compile)