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 09aec79..5fbf5e2 100644 (file)
@@ -176,7 +176,7 @@ else
   DOWNLOAD_DIRS = package/download
 endif
 
   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
        @+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);)
 
 clean dirclean: .config