build: ensure that flock is available for make download
[openwrt/openwrt.git] / 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