summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Hinderer <Sebastien.Hinderer@inria.fr>2022-08-24 16:30:12 +0200
committerSébastien Hinderer <Sebastien.Hinderer@inria.fr>2022-08-25 10:27:34 +0200
commita4095ec19e9641064a1fabac322dbb007b6c85cf (patch)
tree13a22395dd9948fe73cd81b929d97535ee61420d
parentdc41b0547a8c008a059463a782f6e2873bc9531d (diff)
downloadocaml-a4095ec19e9641064a1fabac322dbb007b6c85cf.tar.gz
Pass the same flags to ocamlyacc consistently
Make sure ocamlyacc is always called with -v and --strict. Before this commit, the parsers of the debugger and of ocamltest were not generated using these options.
-rw-r--r--.gitignore3
-rw-r--r--Makefile.common2
-rw-r--r--debugger/Makefile2
-rw-r--r--lex/Makefile2
-rw-r--r--ocamldoc/Makefile2
-rw-r--r--testsuite/tools/Makefile2
6 files changed, 6 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index 2e8443db53..5b49c11b06 100644
--- a/.gitignore
+++ b/.gitignore
@@ -83,6 +83,7 @@ META
/debugger/debugger_lexer.ml
/debugger/debugger_parser.ml
/debugger/debugger_parser.mli
+/debugger/debugger_parser.output
/debugger/ocamldebug
/emacs/ocamltags
@@ -132,6 +133,7 @@ META
/ocamltest/tsl_lexer.ml
/ocamltest/tsl_parser.ml
/ocamltest/tsl_parser.mli
+/ocamltest/tsl_parser.output
/ocamltest/ocamltest.html
/otherlibs/*/.dep
@@ -202,6 +204,7 @@ META
/testsuite/tools/lexcmm.ml
/testsuite/tools/parsecmm.ml
/testsuite/tools/parsecmm.mli
+/testsuite/tools/parsecmm.output
/tools/ocamldep
/tools/ocamldep.opt
diff --git a/Makefile.common b/Makefile.common
index 63afbd5e25..35ee040af6 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -193,7 +193,7 @@ OCAMLLEXFLAGS ?= -q
OCAMLYACC ?= $(ROOTDIR)/yacc/ocamlyacc$(EXE)
-OCAMLYACCFLAGS ?=
+OCAMLYACCFLAGS ?= --strict -v
%.ml %.mli: %.mly
$(OCAMLYACC) $(OCAMLYACCFLAGS) $<
diff --git a/debugger/Makefile b/debugger/Makefile
index d076f5bb12..47df37bc86 100644
--- a/debugger/Makefile
+++ b/debugger/Makefile
@@ -85,7 +85,7 @@ clean::
beforedepend:: debugger_lexer.ml
clean::
- rm -f debugger_parser.ml debugger_parser.mli
+ rm -f $(addprefix debugger_parser.,ml mli output)
beforedepend:: debugger_parser.ml debugger_parser.mli
include .depend
diff --git a/lex/Makefile b/lex/Makefile
index 94847b2976..9510b008c7 100644
--- a/lex/Makefile
+++ b/lex/Makefile
@@ -27,8 +27,6 @@ OCAMLLEX ?= $(BOOT_OCAMLLEX)
include $(ROOTDIR)/Makefile.common
-OCAMLYACCFLAGS = -v
-
CAMLC = $(BOOT_OCAMLC) $(BOOT_STDLIBFLAGS) \
-use-prims $(ROOTDIR)/runtime/primitives
CAMLOPT = $(OCAMLRUN) $(ROOTDIR)/ocamlopt$(EXE) $(STDLIBFLAGS)
diff --git a/ocamldoc/Makefile b/ocamldoc/Makefile
index 763e23f2aa..7f65403414 100644
--- a/ocamldoc/Makefile
+++ b/ocamldoc/Makefile
@@ -18,8 +18,6 @@ ROOTDIR = ..
include $(ROOTDIR)/Makefile.common
include $(ROOTDIR)/Makefile.best_binaries
-OCAMLYACCFLAGS = --strict -v
-
OCAMLC = $(BEST_OCAMLC) $(STDLIBFLAGS)
OCAMLOPT = $(BEST_OCAMLOPT) $(STDLIBFLAGS)
diff --git a/testsuite/tools/Makefile b/testsuite/tools/Makefile
index 64ef8719d5..a344bf0bbf 100644
--- a/testsuite/tools/Makefile
+++ b/testsuite/tools/Makefile
@@ -94,7 +94,7 @@ asmgen_i386.obj: asmgen_i386nt.asm
clean:
rm -f *.cm* *.o *.obj
rm -f expect_test expect_test.exe codegen codegen.exe
- rm -f parsecmm.ml parsecmm.mli lexcmm.ml
+ rm -f parsecmm.ml parsecmm.mli parsecmm.output lexcmm.ml
.PHONY: distclean
distclean: clean