projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rules.mk: make the locked template available even if flock has not been built yet...
[openwrt.git]
/
rules.mk
diff --git
a/rules.mk
b/rules.mk
index
f0c8136
..
11ed809
100644
(file)
--- a/
rules.mk
+++ b/
rules.mk
@@
-333,12
+333,16
@@
endef
# Execute commands under flock
# $(1) => The shell expression.
# $(2) => The lock name. If not given, the global lock will be used.
# 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= \
SHELL= \
-
$(STAGING_DIR_HOST)/bin/
flock \
+ flock \
$(TMP_DIR)/.$(if $(2),$(strip $(2)),global).flock \
-c '$(subst ','\'',$(1))'
$(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.
# Recursively copy paths into another directory, purge dangling
# symlinks before.