[Omake] Changes in MenhirMulti or OCamlGeneratedFiles

Nicholas Kidd kidd at cs.wisc.edu
Thu Mar 22 12:36:41 PDT 2007


Hi,

I recently upgraded to omake 0.9.8.1 via GODI. That all worked fine; 
however, omake now fails to build my project. It is detecting a deadlock 
on a generated file 'parser.mli'. Was there a change in detecting 
dependencies or in the MenhirMulti rules?

The project generates the files tokens.ml(i) using Menhir's 
--tokens-only flag, which is then used by module Keywords. Module Parser 
uses both modules Tokens and Keywords, but I do not see the cyclic 
dependency that omake is finding.

Below is omake's depenency output followed by the OMakefile. I'm not 
sure if this will help. Are there additional commands that I can run to 
determine what is causing this dependency?

Thanks,
-Nick

PS. I have always found it necessary to include the ".mly" suffix on 
files passed to MenhirMulti.

*** omake: reading OMakefiles
*** omake: finished reading OMakefiles (0.0 sec)
dependencies:
    target: <phony <.DEFAULT>>
       scanner dependencies:
       static dependencies: esl2cpds esl2cpds.opt
       build dependencies: esl2cpds esl2cpds.opt
       dependencies are merged from: <phony <.DEFAULT>>
       targets that depend on this node at this point:

    --- Complete dependency listing ---

    target: esl2cpds.opt
       scanner dependencies:
       static dependencies: action.cmx action.o atomicSet.cmx 
atomicSet.o esl.cmx esl.o ir.cmx ir.o ir_lexer.cmx ir_lexer.o 
keywords.cmx keywords.o
          parser.cmx parser.o scenario.cmx scenario.o sig.cmx sig.o 
tokens.cmx tokens.o wpds.cmx wpds.o
       build dependencies: action.cmx action.o atomicSet.cmx atomicSet.o 
esl.cmx esl.o ir.cmx ir.o ir_lexer.cmx ir_lexer.o keywords.cmx keywords.o
          parser.cmx parser.o scenario.cmx scenario.o sig.cmx sig.o 
tokens.cmx tokens.o wpds.cmx wpds.o
       dependencies are merged from: esl2cpds.opt
       targets that depend on this node at this point: <phony 
<.DEFAULT>> esl2cpds
    target: esl2cpds
       scanner dependencies:
       static dependencies: esl2cpds.opt
       build dependencies: esl2cpds.opt
       dependencies are merged from: esl2cpds
       targets that depend on this node at this point: <phony <.DEFAULT>>
*** omake: 34/95 targets are up to date
*** omake: blocked (0.1 sec, 0/2 scans, 0/3 rules, 1/95 digests)
*** omake: deadlock on parser.mli
*** omake: is a dependency of <phony <OCamlGeneratedFilesTarget>>
*** omake: is a dependency of <phony <OCamlGeneratedFilesTarget>>
*** omake: is a dependency of <scanner scan-ocaml-keywords.mli>
*** omake: is a dependency of keywords.cmi
*** omake: is a dependency of parser.mli
*** omake error:
    File /unsup/godi-01-2007/@sys/godi/lib/omake/build/OCaml.om: line 
700, characters 33-109
    failed on target: parser.mli



--------------------------------------------------------------------------
# default is -warn-error A
OCAMLFLAGS = -w Aez #-warn-error Aez
USE_OCAMLFIND = true
if $(not $(OCAMLFIND_EXISTS))
    eprintln(This project requires ocamlfind, but is was not found.)
    eprintln(You need to install ocamlfind and run "omake --configure".)
    exit 1

MENHIR_ENABLED = true
################################################
# OMake's Menhir doesn't allow the flags to be passed to Menhir.
MENHIR_BASE = $(MENHIR_FLAGS) --comment

MENHIR_FLAGS = $(MENHIR_BASE) --only-tokens
MenhirMulti(tokens, tokens.mly ir_tokens.mly)
OCamlGeneratedFiles(tokens.mli tokens.ml)


################################################
# Reset flags, add '--external-tokens' flag.
MENHIR_FLAGS = $(MENHIR_BASE) --external-tokens Tokens
MenhirMulti(parser, ir_tokens.mly tokens.mly ir_parser.mly parser.mly)
OCamlGeneratedFiles(parser.mli parser.ml ir_lexer.ml)


################################################
BASEFILES= sig action wpds atomicSet scenario
MAIN = esl2cpds
MFILES= $(BASEFILES) ir tokens keywords esl parser ir_lexer $(MAIN)

.DEFAULT: $(OCamlProgram $(MAIN), $(MFILES))

.PHONY: all clean doc
all: $(MAIN)

# Cleanup
clean:
     rm -f \
         $(filter-proper-targets $(glob $(addsuffix .*, $(MFILES)))) \
         $(MAIN)$(EXE)



More information about the Omake mailing list