[Omake] Dependency Scanning
Aleksey Nogin
anogin at hrl.com
Mon Apr 23 09:23:06 PDT 2007
Jonathan,
Using a custom ocamldep is a fairly standard thing to do. One example
would be the MetaPRL project. There, the corresponding section of the
OMakefile looks as follows:
########################################################################
# Directories needing only the standard config
#
.SUBDIRS: clib util
########################################################################
# For the rest of MetaPRL, use our custom scanner.
#
OCAMLDEP_MODULES_ENABLED = false
OCAMLDEP = $(file $(BIN)/ocamldep$(EXE))
OCAMLDEPFLAGS += -omake
.SCANNER: scan-ocaml-%.mli: %.mli $(OCAMLDEP) OCamlGeneratedFilesTarget
.SCANNER: scan-ocaml-%.ml: %.ml $(OCAMLDEP) OCamlGeneratedFilesTarget
:exists: %.mli
########################################################################
The OCAMLDEP_MODULES_ENABLED is set to false here because the custom
ocamldep does not support the new "-modules" flag (yet).
Aleksey
On 21.04.2007 21:36, Jonathan Roewen wrote:
> Hi,
>
> Is it possible to build a program that does dependency scanning, and
> use that to scan for dependencies for the rest of the project?
>
> Something like:
>
> build toolchain/ocaml/ocamldep (and friends)
>
> then override scanners for scan-ocaml-%.ml to use
> toolchain/ocaml/ocamldep for everything else to be built
>
> Jonathan
--
Aleksey Nogin, Research Staff Member
Advanced Technologies Department, Information & System Sciences Lab
HRL Laboratories, LLC, Malibu, CA
More information about the Omake
mailing list