build: ensure that flock is available for make download
[openwrt/openwrt.git] / include / toplevel.mk
index 09aec79..5fbf5e2 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