diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-20 21:31:38 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-20 21:31:38 +0000 |
commit | 96c6c62c4558228b46da7671c8113f215a36b1e9 (patch) | |
tree | ef470bf0b1d10ff33f4bc761b3f152177e34531e /rules.mk | |
parent | 62dbd8e4ca5fd77adf57a724854d9a01840343d9 (diff) | |
download | master-187ad058-96c6c62c4558228b46da7671c8113f215a36b1e9.tar.gz master-187ad058-96c6c62c4558228b46da7671c8113f215a36b1e9.tar.bz2 master-187ad058-96c6c62c4558228b46da7671c8113f215a36b1e9.zip |
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 <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48414 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'rules.mk')
-rw-r--r-- | rules.mk | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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. -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. |