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)
committerJo-Philipp Wich <jo@mein.io>
Thu, 8 Jun 2017 21:02:37 +0000 (23:02 +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 77b04aea8a2724ee62d8cecbd1213105a655d424..1171c59093139a5228c2c9ff258f179d0475c2e6 100644 (file)
@@ -171,7 +171,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