add a .depend.menhir file for menhir parser dependencies
We do not write to .depend during the common 'depend' target, because computing dependencies requires Menhir installed.master
parent
d09349f631
commit
80db356e9c
|
@ -0,0 +1,11 @@
|
||||||
|
parsing/parser.cmo : parsing/syntaxerr.cmi parsing/parsetree.cmi \
|
||||||
|
parsing/longident.cmi parsing/location.cmi parsing/docstrings.cmi \
|
||||||
|
utils/clflags.cmi parsing/asttypes.cmi parsing/ast_helper.cmi \
|
||||||
|
parsing/parser.cmi
|
||||||
|
parsing/parser.cmx : parsing/syntaxerr.cmx parsing/parsetree.cmi \
|
||||||
|
parsing/longident.cmx parsing/location.cmx parsing/docstrings.cmx \
|
||||||
|
utils/clflags.cmx parsing/asttypes.cmi parsing/ast_helper.cmx \
|
||||||
|
parsing/parser.cmi
|
||||||
|
parsing/parser.cmi : parsing/parsetree.cmi parsing/location.cmi \
|
||||||
|
parsing/docstrings.cmi
|
||||||
|
parsing/parser.ml parsing/parser.mli: parsing/ast_helper.cmi parsing/asttypes.cmi utils/clflags.cmi parsing/docstrings.cmi parsing/location.cmi parsing/longident.cmi parsing/parsetree.cmi parsing/syntaxerr.cmi
|
|
@ -39,13 +39,6 @@ import-menhirLib:
|
||||||
# is paired with an update of the imported menhirLib; otherwise it
|
# is paired with an update of the imported menhirLib; otherwise it
|
||||||
# would be easy to generate a parser and keep an incompatible version of
|
# would be easy to generate a parser and keep an incompatible version of
|
||||||
# menhirLib, which would fail at compile-time.
|
# menhirLib, which would fail at compile-time.
|
||||||
#
|
|
||||||
# TODO review this in the wake of yacc parser's removal:
|
|
||||||
# # We assume that parser.ml and parser_menhir.ml depend
|
|
||||||
# # on the same modules, so that the dependency on
|
|
||||||
# # parsing/parser.cmo makes --infer work: the .cmi
|
|
||||||
# # of all modules that parser{_menhir}.mly semantic
|
|
||||||
# # actions depend on have already been built.
|
|
||||||
promote-menhir: parsing/parser.mly
|
promote-menhir: parsing/parser.mly
|
||||||
$(MAKE) import-menhirLib
|
$(MAKE) import-menhirLib
|
||||||
$(MENHIR) $(MENHIRFLAGS) parsing/parser.mly
|
$(MENHIR) $(MENHIRFLAGS) parsing/parser.mly
|
||||||
|
@ -64,3 +57,12 @@ partialclean-menhir::
|
||||||
$(addprefix parsing/camlinternalMenhirLib.,ml mli)
|
$(addprefix parsing/camlinternalMenhirLib.,ml mli)
|
||||||
|
|
||||||
clean-menhir: partialclean-menhir
|
clean-menhir: partialclean-menhir
|
||||||
|
|
||||||
|
.PHONY: depend-menhir
|
||||||
|
depend-menhir:
|
||||||
|
$(MENHIR) --depend --ocamldep "$(CAMLDEP) -slash $(DEPFLAGS)" \
|
||||||
|
parsing/parser.mly > .depend.menhir
|
||||||
|
# this rule depends on the variables CAMLDEP and DEPFLAGS
|
||||||
|
# define in Makefile, so it can only be invoked from the main Makefile
|
||||||
|
|
||||||
|
include .depend.menhir
|
||||||
|
|
Loading…
Reference in New Issue