[Omake] Re: ocamldep -syntax and omake 0.9.4
Gerd Stolpmann
info at gerd-stolpmann.de
Sun Aug 5 05:38:35 PDT 2007
Am Samstag, den 04.08.2007, 02:47 +0200 schrieb Martin Jambon:
> After upgrading from omake 0.9.8.1 to omake 0.9.8.4,
> some of our projects that use camlp4 preprocessing don't compile anymore.
> It looks like it's due to an incorrect ocamldep command, without a -syntax
> flag.
> I attached a small, typical example.
Obviously, one can disable the new behaviour by setting
OCAMLDEP_MODULES_ENABLED = false
(which is wrong in the docs, which say that it is disabled by setting
this variable to true).
Martin & Mika: I've done that in our project where necessary.
Gerd
>
> We use ocaml 3.09.3.
>
> $ omake --version
> OMake 0.9.8.4 (release 1):
> build [Sat Aug 4 02:12:06 2007]
> on martin
>
> Default library directory : /home/martin/godi/lib/omake
>
>
> $ grep -v '^#' OMakeroot
>
>
> open build/C
> open build/OCaml
> open build/LaTeX
>
> DefineCommandVars()
>
> .SUBDIRS: .
>
>
> $ cat OMakefile
> USE_OCAMLFIND = true
> NATIVE_ENABLED = true
> BYTE_ENABLED = true
> OCAMLFLAGS += -warn-error a
> OCAMLPACKS = json-static
> OCAMLFINDFLAGS += -syntax camlp4o
> OCAMLFLAGS =
>
>
> FILES[] =
> example
>
> LIB = example
>
> .DEFAULT: $(OCamlLibrary $(LIB), $(FILES))
>
> .PHONY: clean distclean
>
> clean:
> rm -f *.opt *.run *.o *.a *.cm* *~ *.annot
>
> distclean: clean
> rm -f *.omc
>
>
> $ cat example.ml
> type json example = int
>
> $ omake
> *** omake: reading OMakefiles
> *** omake: finished reading OMakefiles (0.0 sec)
> - scan . scan-ocaml-example.ml
> + ocamlrun /home/martin/godi/bin/ocamldep-omake -modules example.ml
> | Shell.ocamldep-postproc()
> File "example.ml", line 1, characters 10-17:
> Syntax error
> *** omake: 12/21 targets are up to date
> *** omake: failed (0.1 sec, 1/1 scans, 0/0 rules, 9/41 digests)
> *** omake: targets were not rebuilt because of errors:
> <scanner scan-ocaml-example.ml>
> depends on: example.ml
>
>
>
> With the previous version of omake, we get:
>
>
> $ ~/bin/omake --verbose
> *** omake: reading OMakefiles
> *** omake: finished reading OMakefiles (0.0 sec)
> - scan . scan-ocaml-example.ml
> + <compute 2 value dependencies>
> - scan . scan-ocaml-example.ml
> + ocamlfind ocamldep -syntax camlp4o -package json-static -native -I . example.ml
> - exit . scan-ocaml-example.ml, code 0
> - build . example.cmi
> + ocamlfind ocamlc -syntax camlp4o -package json-static -g -I . -c example.ml
> - build . example.cmi
> + ocamlfind ocamlopt -syntax camlp4o -package json-static -I . -c example.ml
> - exit . example.cmi, code 0
> - build . example.cma
> + ocamlfind ocamlc -syntax camlp4o -package json-static -g -a -o example.cma example.cmo
> - exit . example.cma, code 0
> - build . example.a
> + ocamlfind ocamlopt -syntax camlp4o -package json-static -a -o example.cmxa example.cmx
> - exit . example.a, code 0
> *** omake: done (0.4 sec, 1/1 scans, 3/7 rules, 16/101 digests)
>
>
>
> Thanks,
>
>
> Martin
>
> --
> http://martin.jambon.free.fr
--
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany
gerd at gerd-stolpmann.de http://www.gerd-stolpmann.de
Phone: +49-6151-153855 Fax: +49-6151-997714
------------------------------------------------------------
More information about the Omake
mailing list