From: Ulya Trofimovich Date: Tue, 1 Aug 2017 10:39:39 +0000 (+0100) Subject: Makefile.am: fixed other custom rules to avoid writing into unexistent directory. X-Git-Tag: 1.0~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af3a69bf7eeb9fa206cdd1a34e2238a8af66ccb6;p=re2c Makefile.am: fixed other custom rules to avoid writing into unexistent directory. The fixed rules do not presently trigger any build errors: target directory is created by configure as it need to put autogenerated files doc/manpage.rst and doc/help.rst in it. However, this behaviour is occasional: if one removes the .in files, build failure would be unmasked. So it makes sense to ensure that target directory exists. --- diff --git a/re2c/Makefile.am b/re2c/Makefile.am index 54afcc9b..68f115b0 100644 --- a/re2c/Makefile.am +++ b/re2c/Makefile.am @@ -245,6 +245,7 @@ $(AUTOGEN_PARSER): $(CUSTOM_PARSER) $(AUTOGEN_LEX): $(AUTOGEN_PARSER) $(BOOTSTRAP_PARSER): $(CUSTOM_PARSER) +# target directory exists (as part of source file tree) $(AM_V_GEN) test $(BISON) = "no" || \ $(BISON) \ --output=$(top_srcdir)/$@ \ @@ -274,6 +275,7 @@ bootstrap: all if REBUILD_DOCS docs: $(DOC) $(AUTOGEN_HELP) $(DOC): $(SRC_DOC) + $(AM_V_at)$(MKDIR_P) $(dir $@) $(RST2MAN) $(top_builddir)/$(SRC_DOC) > $@ cp $@ $(top_srcdir)/$(BOOTSTRAP_DOC) $(AUTOGEN_HELP): $(CUSTOM_HELP) @@ -285,6 +287,7 @@ else docs: $(DOC) $(AUTOGEN_HELP) @echo "Reconfigure to rebuild docs: ./configure --enable-docs" $(DOC): $(BOOTSTRAP_DOC) + $(AM_V_at)$(MKDIR_P) $(dir $@) cp $(top_srcdir)/$(BOOTSTRAP_DOC) $@ $(AUTOGEN_HELP): $(BOOTSTRAP_HELP) $(AM_V_at)$(MKDIR_P) $(dir $@)