From a4095ec19e9641064a1fabac322dbb007b6c85cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hinderer?= Date: Wed, 24 Aug 2022 16:30:12 +0200 Subject: 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. --- .gitignore | 3 +++ Makefile.common | 2 +- debugger/Makefile | 2 +- lex/Makefile | 2 -- ocamldoc/Makefile | 2 -- testsuite/tools/Makefile | 2 +- 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 -- cgit v1.2.1