summaryrefslogtreecommitdiffstats
path: root/rules.mk
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-10-31 15:33:48 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-10-31 15:33:48 +0000
commita9812d96db410072e609f56a7d866c2efd5d4d9b (patch)
tree21630864d1da67dadb565dee0daf83f47091b5b0 /rules.mk
parentfe2b4c1db4e5cb2c2fbe089e7337d2661a66d402 (diff)
fix usage of flock - use the command mode instead of locking a file descriptor to fix build issues on mac os x
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23743 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk7
1 files changed, 4 insertions, 3 deletions
diff --git a/rules.mk b/rules.mk
index 007e5bc9b..3bd6073fb 100644
--- a/rules.mk
+++ b/rules.mk
@@ -254,9 +254,10 @@ endef
# $(2) => The lock name. If not given, the global lock will be used.
# $(3) => The filedescriptor used for the lock. Defaults to 1023.
define locked
- ( $(STAGING_DIR_HOST)/bin/flock -x $(if $(3),$(3),1023) && \
- $(1) \
- ) $(if $(3),$(strip $(3)),1023)>$(TMP_DIR)/.$(if $(2),$(strip $(2)),global).flock
+ SHELL= \
+ $(STAGING_DIR_HOST)/bin/flock \
+ $(TMP_DIR)/.$(if $(2),$(strip $(2)),global).flock \
+ -c '$(subst ','\'',$(1))'
endef
# file extension