diff options
Diffstat (limited to 'Makefile.common')
-rw-r--r-- | Makefile.common | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Makefile.common b/Makefile.common index af979b789f..1e0486615f 100644 --- a/Makefile.common +++ b/Makefile.common @@ -66,8 +66,6 @@ OPTCOMPFLAGS= ifeq "$(FUNCTION_SECTIONS)" "true" OPTCOMPFLAGS += -function-sections endif -# By default, request ocamllex to be quiet -OCAMLLEXFLAGS ?= -q # Escape special characters in the argument string. # There are four characters that need escaping: @@ -120,3 +118,25 @@ ifneq ($(EXE),) $(1): $(1)$(EXE) endif endef # PROGRAM_SYNONYM + +# Lexer generation + +BOOT_OCAMLLEX ?= $(CAMLRUN) $(ROOTDIR)/boot/ocamllex +# The OCAMLLEX command used in the recipe below is defined in the individual +# makefiles, because its default value is directory-specific. +# By default, some directories use BOOT_OCAMLLEX while others use the +# freshly compiled lexer generator. + +OCAMLLEXFLAGS ?= -q + +%.ml: %.mll + $(OCAMLLEX) $(OCAMLLEXFLAGS) $< + +# Parser generation + +OCAMLYACC ?= $(ROOTDIR)/yacc/ocamlyacc$(EXE) + +OCAMLYACCFLAGS ?= + +%.ml %.mli: %.mly + $(OCAMLYACC) $(OCAMLYACCFLAGS) $< |