aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-03-06 11:22:53 -0800
committerDenis Kenzior <denkenz@gmail.com>2020-03-09 22:20:41 -0500
commit9dccec856635c4ebc5cde66fb278433e1c988645 (patch)
tree60a6bea479b48fa1c8a6b264b185ba601bd9799b
parent83ddd88e616b5d4991bc45d6d9d69d8a569975a1 (diff)
downloadiwd-9dccec856635c4ebc5cde66fb278433e1c988645.tar.gz
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 Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--Makefile.am5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 9d378d3d2..ac83376e5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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; }