[Omake] Announcing OMake 0.9.8.5 - a substantial feature
enhancements release
Aleksey Nogin
anogin at hrl.com
Tue Aug 7 17:24:12 PDT 2007
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:
- Fixed Ctrl-C handling on Windows (with now correctly interrupt
OMake)
- Added .STATIC and .MEMO rules, allowing defining lazy computations
and lazy memoization maps
- Added export sections, making it much easier to manage variable
scoping
- Fields in sub-objects can now be referenced directly
- Many new built-in and library functions
- Significant bug-fixes
A more detailed change log is the following:
* Made sure that Ctrl-C would correctly stop OMake on Windows, making
it much easier to use -p and -P on Windows.
* Added export sections.
o Exports take effect for all sections within their static scope.
For example,
section
export
section
public.X = 1
println($X) # Prints 1
o In addition, exports augment any existing exports. For example,
section
public.X = 1
public.Y = 2
export X
section
X = 3
Y = 4
export Y
# X is 3
# Y is 2
o Variable definitions also allow exports. For example,
public.X = 1
public.f() =
X = 2
export
public.Y = $f
# X is 2
# Y is 2
Note: this is, of course, not the same as imperative programming,
because functions can always choose not to export. In particular,
the string "functions" do not export.
public.X = 1
export X
public.f() =
X = 2
Y = $"$f"
# X = 1
# Y = 2
* Added .STATIC and .MEMO rules - an enhanced, yet lazy (delayed)
version of the static. sections.
o Basic usage:
.STATIC:
println(foo)
X = 1
Y = $X
The variable X is exported, with a "delayed" value. The rule is
only evaluated if the value for $X is needed, but it is lazy. The
definition of Y does not force evaluation.
o .STATIC rules allow dependencies, for example:
.STATIC: x.input
X = $(expensive-function x.input)
This is be evaluated if x.input changes and X is forced.
o .STATIC rules also allow explicitly specifying which variables
are exported, for example:
.STATIC: X: x.input
Y = 1
X = $Y
Here, Y is not exported from the section.
o By default, if a .STATIC rule is evaluated several times (for
example, if the .STATIC rule is present inside a body of a
function that is called several times), the result is the same set
of delayed variables.
o .STATIC rules can have :key: dependency that specify whether we
are getting the same set of delayed variables or not, when
re-executing the same .STATIC rule. For example,
g(x) =
eprintln($"g($x)")
add($x, 1)
f(x) =
.STATIC: :key: $x
y = $(g $x)
value $y
println($(f 1))
println($(f 2))
println($(f 1))
will call function g twice - only once for each argument,
printing:
g(1)
2
g(2)
3
2
o .STATIC rules have their values are stored in .omakedb, not in
.omc, so they are distinct between different projects (while the
static. sections in common library files are shared between
projects).
o The .MEMO rules are very similar to the .STATIC, except the .MEMO
values are not preserved across runs of OMake. They are, however,
preserved for the duration of OMake session.
* Fields in sub-objects can now be referenced directly using the
$(X.Y.Z) form (bug 580). For example,
X. =
Y. =
Z. =
x = 1
X.Y.Z.y = 2
X.Y.Z.f() =
value $(add $x, $y)
echo $(X.Y.Z.f)
# prints "3"
* Allow functions to take their bodies as array arguments (bug 645).
The [...] argument to a function call stands for an array body and
... stands for a normal body argument. For example,
X =
file([...])
a
b
c
- :
: Array
* Corrected several cases where the exit shell alias would not do the
right thing. For example, pipelines like false || exit 5 will now
return the correct exit code.
* Added a build function, so that builds can be performed from osh
scripts (the function may be called only from osh).
* build/C.om: new functions for building DLLs: DynamicCLibrary,
DynamicCLibraryCopy, DynamicCLibraryInstall, DynamicCXXLibrary,
DynamicCXXLibraryCXXopy, DynamicCXXLibraryInstall.
* New built-in functions: sort (AKA Sequence.sort), replace-nth,
input-line (AKA InChannel.readln), channel-name (AKA Channel.name),
sequence-sub (AKA Sequence.sub).
* New Shell alias: Shell.pwd
* The defined, getvar, setvar now allow qualified names (e.g public.x
or private.y).
* Built-in awk will now set the FILENAME and FNR ("line number")
variables when evaluating its body.
* The run-time is now included in - exit messages (e.g. when
--print-exit is enabled) - bug 680. Note that this only indicates
when OMake have noticed that the command have finished, which may be
quite inaccurate in parallel builds (where OMake may be busy setting
up parallel jobs and not paying attention).
* Significant code reorganization in preparation for OMake 0.9.9,
should be largely transparent to the end-users
As usual, for more information on OMake and on this release, please
visit the OMake Home Page at http://omake.metaprl.org/ . Source and
binary packages of OMake 0.9.8.5 may be downloaded from
http://omake.metaprl.org/download.html. In addition, OMake may be
obtained via the GODI packaging system.
OMake 0.9.8.5 should still be considered an alpha release. While we have
made an effort to ensure that it is bug-free, it is possible some
functions may not behave as you would expect. Please report any comments
and/or bugs to the mailing list omake at metaprl.org and/or at
http://bugzilla.metaprl.org/
--
Aleksey Nogin, Research Scientist
Advanced Technologies Department, Information & System Sciences Lab
HRL Laboratories, LLC, Malibu, CA
More information about the Omake
mailing list