From: Felix Fietkau Date: Sun, 31 Oct 2010 15:33:48 +0000 (+0000) Subject: fix usage of flock - use the command mode instead of locking a file descriptor to... X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=153bb5e795c9bc21b108dfa6eab505ff7d89b17d fix usage of flock - use the command mode instead of locking a file descriptor to fix build issues on mac os x SVN-Revision: 23743 --- diff --git a/rules.mk b/rules.mk index 007e5bc9b2..3bd6073fb7 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