build: ensure that flock is available for make download
authorFelix Fietkau <nbd@nbd.name>
Thu, 8 Jun 2017 09:05:05 +0000 (11:05 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 8 Jun 2017 09:43:15 +0000 (11:43 +0200)
It ensures that make download can parallelize downloads, even when some
packages download the same files (e.g. gcc/initial, gcc/final)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/toplevel.mk

index 09aec791bad06f11d0d0ea391f93513d9c288906..5fbf5e2ea43f0f7d06bc289986970b382d17cfbd 100644 (file)
@@ -176,7 +176,7 @@ else
   DOWNLOAD_DIRS = package/download
 endif
 
-download: .config FORCE
+download: .config FORCE $(if $(wildcard $(TOPDIR)/staging_dir/host/bin/flock),,tools/flock/compile)
        @+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);)
 
 clean dirclean: .config