[Omake] OCaml and Generated Source File
Jeremy Cowgar
jcowgar at advancedpricing.com
Mon Jan 2 09:19:29 PST 2006
Greetings.
1st, let me say, OMake is a great product, thanks for developing it! It
greatly has simplified my development process.
Now, my question. Basically, one of the program's I am trying to compile
depends on a generated file. test_generated is the program name,
unit__test.ml is the program name. The problem is, that the target
(OCamlProgram) does not try to compile unit__test.ml. Here is the OMakefile
for that sub directory:
OCAMLINCLUDES += $(shell ocamlfind query oUnit calendar postgresql) \
$(dir ../odb) $(dir ../../cowgar/src)
OCAML_LIBS=../odb/odb ../../cowgar/src/cowgar
OCAML_OTHER_LIBS=unix calendar oUnit postgresql
OCamlProgram(test_odb, testBaseDo test_odb)
OCamlProgram(test_generated, unit__test test_generated)
.DEFAULT: test_odb
unit__test.ml: generated_fixture.sql
../utils/execute_sql -f generated_fixture.sql
../utils/buildDo -d ../templates -t unit__test -o unit__test.ml
clean:
$(CLEAN) test_odb test_generated unit__test.*
test_generated is where I am having problems, obviously with unit__test.ml. It
never tries to generate unit__test.ml on it's own. If I type omake
unit__test.ml then it generates the file. It then will not compile
unit__test.ml ... If I manually compile the file, omake will then compile
test_generated, link and produce the executable file. I thought the naming
scheme might be a problem, so I have tried unit_test.ml and also unitTest.ml
and that is not making any difference.
Anyone have an idea?
Thank,
Jeremy Cowgar
More information about the OMake-Devel
mailing list