Cherry pick use of menhir features from branch feature/menhir.
[tatoo.git] / Remakefile.in
index 5c3fe42..2a32aa2 100644 (file)
@@ -26,9 +26,6 @@ MENHIR = @MENHIR@
 
 all: $(BIN)
 
-src/xpath/xpath_internal_parser.cmx: OCAMLFINDFLAGS = $(OCAMLFINDFLAGSNOSYNTAX)
-src/xpath/xpath_internal_parser.cmo: OCAMLFINDFLAGS = $(OCAMLFINDFLAGSNOSYNTAX)
-
 tools: tools/xml_diff.native$(EXE) tools/XPathEval.class tools/split_path.native$(EXE)
 
 Remakefile: Remakefile.in config.status
@@ -82,7 +79,11 @@ distclean: clean test_clean
 %.ml:
        if test -f $*.mly; then
                $(REMAKE) $*.mly
-               $(MENHIR) $*.mly
+               #Work around menhir warning
+               $(MENHIR) $*.mly 2>&1 | grep -v -- 'you are\|--infer'
+               #Work around crazy ulex chocking on identifier 'lexer', generated by menhir.
+               cat $*.ml | sed -e 's/\blexer\b/__lexer/g' > $*.tmp
+               mv $*.tmp $*.ml
        elif test -f $*.mll; then
                $(REMAKE) $*.mll
                $(OCAMLLEX) $*.mll
@@ -114,7 +115,7 @@ distclean: clean test_clean
        OCAMLDEP="$(OCAMLDEP) $(OCAMLFINDFLAGS)"
        OCAMLNATIVE=$(OCAMLNATIVE)
        SRC=$(SRC)
-       COMPILE="$(OCAMLC) $(OCAMLFLAGS) $(OCAMLCFLAGS) $(OCAMLFIND_EXTRAFLAGS) "
+       COMPILE="$(OCAMLC) $(OCAMLFLAGS) $(OCAMLCFLAGS) $(OCAMLFINDFLAGS)"
        . tools/ocamldriver.sh
 
 %.cmi: