Author: nbd
Date: 2016-01-20 22:31:38 +0100 (Wed, 20 Jan 2016)
New Revision: 48414

Modified:
   trunk/rules.mk
Log:
rules.mk: make the locked template available even if flock has not been built 
yet (fall back to unlocked shell command)

Signed-off-by: Felix Fietkau <[email protected]>

Modified: trunk/rules.mk
===================================================================
--- trunk/rules.mk      2016-01-20 21:31:34 UTC (rev 48413)
+++ trunk/rules.mk      2016-01-20 21:31:38 UTC (rev 48414)
@@ -333,12 +333,16 @@
 # Execute commands under flock
 # $(1) => The shell expression.
 # $(2) => The lock name. If not given, the global lock will be used.
-define locked
+ifneq ($(wildcard $(STAGING_DIR_HOST)/bin/flock),)
+  define locked
        SHELL= \
-       $(STAGING_DIR_HOST)/bin/flock \
+       flock \
                $(TMP_DIR)/.$(if $(2),$(strip $(2)),global).flock \
                -c '$(subst ','\'',$(1))'
-endef
+  endef
+else
+  locked=$(1)
+endif
 
 # Recursively copy paths into another directory, purge dangling
 # symlinks before.
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to