Makefile.am: Avoid redirection of input and output files
PATCH v3 1/1 Makefile.am: Avoid redirection of input and output files
Ensure that directory is created before its written to
This can cause a build race in a highly parallelised build where a directory is not yet created but output file is being written using redirection e.g.
rst2man.py --strict --no-raw --no-generator --no-datestamp < ../git/monitor/iwmon.rst > monitor/iwmon.1 /bin/sh: monitor/iwmon.1: No such file or directory
make[1]: *** [Makefile:3544: monitor/iwmon.1] Error 1
---
v2: create directory before emitting doc files into it
v3: No change, rebased on master
Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Makefile.am +3 -2
@@ -631,8 +631,9 @@ SED_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \ < $< > $@ if RUN_RST2MAN -RST2MAN_PROCESS = $(AM_V_GEN)$(RST2MAN) --strict --no-raw --no-generator \ - --no-datestamp $< $@ +RST2MAN_PROCESS = $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ + $(AM_V_GEN)$(RST2MAN) --strict --no-raw \ + --no-generator --no-datestamp $< $@ else RST2MAN_PROCESS = $(AM_V_GEN)test -f $@ || \ { echo "Generated manual page $@ does not exist"; false; }
Signature · 1 line
2.25.1
Denis Kenzior
AppliedHi Khem,
Quoted 9 lines · Khem Raj
Ensure that directory is created before its written to
This can cause a build race in a highly parallelised build where a directory is not yet created but output file is being written using redirection e.g.
rst2man.py--strict --no-raw --no-generator --no-datestamp <../git/monitor/iwmon.rst> monitor/iwmon.1/bin/sh: monitor/iwmon.1: No such file or directory
make[1]: *** [Makefile:3544: monitor/iwmon.1] Error 1
Quoted 8 lines
Signed-off-by Khem Raj <[email protected]>---
v2: create directory before emitting doc files into it
v3: No change, rebased on masterMakefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Applied, thanks.
Regards,
-Denis