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 | 579e9620c659883a1af1b94014587cc0086b3d92 (patch) | |
tree | a95be529fb0099fd43c0db73ed2eb72327e41b85 /rules.mk | |
parent | 1e568fd4bca32c5ee38a34ec0218014e96d47b46 (diff) | |
download | mtk-20170518-579e9620c659883a1af1b94014587cc0086b3d92.zip mtk-20170518-579e9620c659883a1af1b94014587cc0086b3d92.tar.gz mtk-20170518-579e9620c659883a1af1b94014587cc0086b3d92.tar.bz2 |
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>
SVN-Revision: 48414
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. |