Skip to content

Commit

Permalink
[minor] Makefile.menhir bugfix for non-subsecond make systems
Browse files Browse the repository at this point in the history
François Pottier reported that, on his mac machine,
"make promote-menhir; make world" fails: it seemed
that parsing/parser.ml, after being produced as a temporary
file by the promote-menhir target, is not refreshed using
the `parsing/parser.ml: boot/menhir/parser.ml` rule from
Makefile (which does the MenhirLib->CamlinternalMenhirlib renaming).

The issue comes down to the fact that while boot/menhir/parser.ml
is always younger than the parsing/parser.ml produced by promote,
the time difference is very small (parser.ml is copied in boot/
immediately after production), and macos doesn't record creation times
with enough precision to notice it.

This PR removes the temporary parsing/parser.ml created by Menhir
in the promote-menhir rule, so that this file is not seen anymore
by 'make world', and has to be properly reproduced from boot/.
  • Loading branch information
gasche committed Sep 7, 2018
1 parent 0703c1b commit ae03c67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.menhir
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ promote-menhir: parsing/parser.mly
's,^#\(.*\)"[^"]*/menhir/standard.mly",#\1"menhir/standard.mly",g' \
parsing/$$f \
> boot/menhir/$$f; \
rm parsing/$$f; \
done

# The import-menhirLib invocation in promote-menhir ensures that each
Expand Down

0 comments on commit ae03c67

Please sign in to comment.