Skip to contentSkip to conversation

Makefile.am: add missing mkdir in rules generation

PATCH Applied Ross Burton 2 participants 2 messages Oct 8, 2019 – Oct 9, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Makefile.am: add missing mkdir in rules generation

In parallel out-of-tree builds it's possible that tools/*.rules are generated before the target directory has been implicitly created. Solve this by creating the directory before writing into it.

---
 Makefile.am | 1 +
 1 file changed, 1 insertion(+)
Makefile.am +1 -0
index 2ac28b23d..e7bcd2366 100644
@@ -589,6 +589,7 @@ src/builtin.h: src/genbuiltin $(builtin_sources)
 	$(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
 
 tools/%.rules:
+	$(AM_V_at)$(MKDIR_P) tools
 	$(AM_V_GEN)cp $(srcdir)/$(subst 97-,,$@) $@
 
 $(lib_libbluetooth_la_OBJECTS): $(local_headers)
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw

Hi Ross,

Quoted 21 lines · Ross Burton

In parallel out-of-tree builds it's possible that tools/*.rules are generated before the target directory has been implicitly created. Solve this by creating the directory before writing into it.

---
 Makefile.am | 1 +
 1 file changed, 1 insertion(+)
Makefile.am +1 -1
index 2ac28b23d..e7bcd2366 100644
@@ -589,6 +589,7 @@ src/builtin.h: src/genbuiltin $(builtin_sources)
        $(AM_V_GEN)$(srcdir)/src/genbuiltin $(builtin_modules) > $@
 
 tools/%.rules:
+       $(AM_V_at)$(MKDIR_P) tools
        $(AM_V_GEN)cp $(srcdir)/$(subst 97-,,$@) $@
 
 $(lib_libbluetooth_la_OBJECTS): $(local_headers)
--
Quoted 1 line

2.20.1

Applied, thanks.

Signature · 1 line
Luiz Augusto von Dentz