[Omake] Announcing OMake 0.9.8.5 - a substantial feature enhancements release

Markus Mottl markus.mottl at gmail.com
Thu Aug 9 09:42:22 PDT 2007


On 8/7/07, Aleksey Nogin <anogin at hrl.com> wrote:
> We are proud to announce the latest release of the OMake Build System -
> OMake 0.9.8.5. OMake 0.9.8.5 is substantial feature enhancements and
> bugfixes release. The changes in this release include:

I ran into a compatibility problem with the new release.  Our
OMakeroot contains something of the sort:

Capture_deps(env_name, vars, tgts, deps, scan_deps) =
  env. =
    vars =
      export $(vars)
    tgts[] = $(tgts)
    scan_deps[] = $(scan_deps)
    deps[] = $(deps)
  setvar($(env_name), $(getvar $(env_name)) $(env))
  export $(env_name)

But the new omake fails on this:

   File OMakeroot: line 89, characters 13-20
   syntax error: misplaced expression

This is the line "export $(vars)".

What I want to do is capture an environment in a variable so that I
can later instantiate rules with it, e.g. as follows (see "value
$(env.vars)" for the binding of captured variables):

# Instantiate the variables captured in the environment named [env_name]
InstantiateEnvs(env_name) =
  envs = $(getvar $(env_name))
  tgts[] = $(set $(envs.map $(fun env, $(env.tgts))))
  foreach(file, $(tgts))
    deps =
    scan_deps =
    section
      foreach(env, $(envs))
        if $(mem $(file), $(env.tgts))
          value $(env.vars)
          tgts = $(intersection $(tgts), $(env.tgts))
          deps = $(set $(deps) $(env.deps))
          scan_deps = $(set $(scan_deps) $(env.scan_deps))
          export
        export
      $(tgts): $(deps)
      if $(scan_deps)
        .SCANNER: $(scan_deps): $(deps)
  envs =

This way I can orthogonally extend dependencies and variable bindings
for rules and instantiate them at a later time.

What's the new syntax for exporting variables that are defined by
variable themselves?  Or are there even better ways of achieving what
I want to do?

Regards,
Markus

-- 
Markus Mottl        http://www.ocaml.info        markus.mottl at gmail.com


More information about the Omake mailing list