Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | Upstream-Status: Submitted (https://github.com/skvadrik/re2c/pull/191) |
| 2 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
| 3 | |
| 4 | From bccc10c60523f88c8f81413151cdcd612eb16198 Mon Sep 17 00:00:00 2001 |
| 5 | From: Ross Burton <ross.burton@intel.com> |
| 6 | Date: Mon, 31 Jul 2017 15:43:41 +0100 |
| 7 | Subject: [PATCH] Makefile.am: create target directory before writing into it |
| 8 | |
| 9 | In some situations src/parse/ may not exist before a file is copied into the |
| 10 | directory. Ensure that this doesn't happen by creating the directory first. |
| 11 | --- |
| 12 | re2c/Makefile.am | 1 + |
| 13 | 1 file changed, 1 insertion(+) |
| 14 | |
| 15 | diff --git a/re2c/Makefile.am b/re2c/Makefile.am |
| 16 | index 3b3b2c5e..0707fc5a 100644 |
| 17 | --- a/Makefile.am |
| 18 | +++ b/Makefile.am |
| 19 | @@ -187,6 +187,7 @@ CLEANFILES = \ |
| 20 | $(DOC) |
| 21 | |
| 22 | $(AUTOGEN_PARSER): $(CUSTOM_PARSER) |
| 23 | + $(AM_V_at)$(MKDIR_P) $(dir $@) |
| 24 | $(AM_V_GEN) if test $(BISON) = "no"; \ |
| 25 | then \ |
| 26 | cp $(top_srcdir)/$(BOOTSTRAP_PARSER) $@ && \ |
| 27 | @@ -211,6 +212,7 @@ $(BOOTSTRAP_PARSER): $(CUSTOM_PARSER) |
| 28 | $(top_srcdir)/$(CUSTOM_PARSER); |
| 29 | |
| 30 | .re.cc: |
| 31 | + $(AM_V_at)$(MKDIR_P) $(dir $@) |
| 32 | $(AM_V_GEN) if test -x $(RE2C); \ |
| 33 | then \ |
| 34 | $(top_builddir)/$(RE2C) $(RE2CFLAGS) -o $@ $< && \ |
| 35 | -- |
| 36 | 2.11.0 |