[Omake] Announcing OMake 0.9.8.5 - a substantial feature
enhancements release
Jason Hickey
jyh at cs.caltech.edu
Thu Aug 9 13:23:38 PDT 2007
Markus,
This is part of a trend toward more static naming, where binding is
dynamic, but the set of bound names is determined statically. This
will (eventually) help avoid accidental name conflicts.
However, "export $(vars)" still exists, but only as a function--you
have to write export($(vars)) with explicit parenthesis. Alas, I
forgot to allow exports of a specific var list:( So, I just updated
0.9.8.5 subversion to allow it.
So the two steps are:
# In Capture_deps:
env. =
vars = $(export $(vars))
...
# In InstantiateEnvs
export($(env.vars))
Sorry for omitting this.
Jason
On Aug 9, 2007, at 9:42 AM, Markus Mottl wrote:
> 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
> _______________________________________________
> Omake mailing list
> Omake at metaprl.org
> https://lists.metaprl.org/mailman/listinfo/omake
--
Jason Hickey http://www.cs.caltech.edu/~jyh
Caltech Computer Science Tel: 626-395-6568 FAX: 626-792-4257
More information about the Omake
mailing list