build: fix make download in the SDK
authorFelix Fietkau <nbd@nbd.name>
Mon, 16 May 2016 09:20:17 +0000 (11:20 +0200)
committerFelix Fietkau <nbd@nbd.name>
Mon, 16 May 2016 09:20:26 +0000 (11:20 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/toplevel.mk

index 535ac0e065698347774fdbc717d7480a88408ae0..7ef5c6186a8abb7d20381954cc191d91acec2a5a 100644 (file)
@@ -165,11 +165,14 @@ staging_dir/host/.prereq-build: include/prereq-build.mk
 printdb: FORCE
        @$(_SINGLE)$(NO_TRACE_MAKE) -p $@ V=99 DUMP_TARGET_DB=1 2>&1
 
+ifndef SDK
+  DOWNLOAD_DIRS = tools/download toolchain/download package/download target/download
+else
+  DOWNLOAD_DIRS = package/download
+endif
+
 download: .config FORCE
-       @+$(SUBMAKE) tools/download
-       @+$(SUBMAKE) toolchain/download
-       @+$(SUBMAKE) package/download
-       @+$(SUBMAKE) target/download
+       @+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);)
 
 clean dirclean: .config
        @+$(SUBMAKE) -r $@