2018-12-25 02:36:45

by Robert Yang

[permalink] [raw]
Subject: [PATCH] Makefile.am: Fix a race issue for tools

Fixed a race issue when do parallel build:
cp ../bluez-5.50/tools/hid2hci.rules tools/97-hid2hci.rules
cp: cannot create regular file tools/97-hid2hci.rules: No such file or directory
make[1]: *** [tools/97-hid2hci.rules] Error 1

Signed-off-by: Robert Yang <[email protected]>
---
Makefile.am | 1 +
1 file changed, 1 insertion(+)

diff --git a/Makefile.am b/Makefile.am
index f84a1fa..9db1573 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -570,6 +570,7 @@ src/builtin.h: src/genbuiltin $(builtin_sources)
$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@

tools/%.rules:
+ [ -e tools ] || $(MKDIR_P) tools
$(AM_V_GEN)cp $(srcdir)/$(subst 97-,,$@) $@

$(lib_libbluetooth_la_OBJECTS): $(local_headers)
--
2.10.2