Issues found with existing distfiles:
distfiles/eclipse-sourceBuild-srcIncluded-3.0.1.zip
distfiles/fortran-utils-1.1.tar.gz
distfiles/ivykis-0.39.tar.gz
distfiles/enum-1.11.tar.gz
distfiles/pvs-3.2-libraries.tgz
distfiles/pvs-3.2-linux.tgz
distfiles/pvs-3.2-solaris.tgz
distfiles/pvs-3.2-system.tgz
No changes made to these distinfo files.
Otherwise, existing SHA1 digests verified and found to be the same on
the machine holding the existing distfiles (morden). All existing
SHA1 digests retained for now as an audit trail.
are replaced with .include "../../devel/readline/buildlink3.mk", and
USE_GNU_READLINE are removed,
* .include "../../devel/readline/buildlink3.mk" without USE_GNU_READLINE
are replaced with .include "../../mk/readline.buildlink3.mk".
GCC 4.7.x will emit warnings on ocaml if a function or a constant is
unreferenced. There are a few dozen of these in omake. The alternative
to disabling warnings=errors is to remove functions and contants over
many files (probably more than a dozen).
it build again.
Changes:
This is a major feature enhancement and bugfix release
* Added keyword and optional function arguments.
The syntax of a keyword parameter/argument is "identifier = expr".
Function Application
-------------------------------------------
f(a) f(1)
f(~a, b) f(~a = 10, 11) Required keyword argument
f(?a, b) f(~a = 10, 12) Optional keyword argument
f(12) -- defaults to empty
f(?a = 1, b) f(~a = 10, 11) Optional keyword argument with default value
f(~a = 1, b) f(11) -- ~a is same as ?a if there is a default value
f(?a = 10, 11) -- Arguments can use ?, but it means the same thing
Keyword arguments and normal arguments are processed
independently. Normal arguments have to appear in the same
order as in the parameter list, but keyword arguments can go
anywhere.
This also adds the function notation.
fun(x, y) =>
add($x, $y)
foreach(x => ..., a b c)
println($x)
where the "..." essentially means "parse as if the indented
block below was actually an expression in here"
Old-style foreach generate a warning.
* Added "program" syntax. This provides a more standard
programming language, where strings must be explicit, and
variables represent applications.
The outer syntax is normal; the program syntax is an ast to
ast translation. The translation is turned on with the command
".LANGUAGE: program", which is scoped like "export". Here is
an example:
#!/usr/bin/env osh
.LANGUAGE: program
f(x) =
return x + 1
println(f(f(1)))
The normal $-style expressions are always allowed, but in
program-syntax mode, identifiers stand for variables, function
application is the f(e1, ..., e2) form, and there are the
standard infix operators. To switch back to the default
syntax, use .LANGUAGE: make
Note, shell commands and rules never use program syntax,
except within function arguments.
This is not heavily tested.
* Added support for partial and curried function applications.
Normal funcation application still require using the correct
number of arguments (as relaxed by the introduction of optional
arguments), but apply function can be used to create curried
and partial applications.
f(x,y) =
return $(add $x, $y)
g = $(apply $f, 2) # Partial applications must use apply
println($(g 3)) # 5
ff(x) =
gg(y) =
return $(add $x, $y)
println($(apply $(ff), 3, 5)) # Prints 8, also need to use apply here
apply can also take keyword arguments.
* A high-quality C parser was added to OMake — see lib/parse/C/Parse.om
* Added a LaTeX parser and spellchecker - see lib/parse/LaTeX/README.txt
* New functions added: localtime, gmtime, mktime, normalize-tm,
utimes, digest-string, url-escaped, find-all, addprefixes
* New object added: Tm
* About 10 Bugs fixed
* [Experimental] Object methods can now export their fields
back into the parent object. For example,
Z. =
x = 1
f() =
x = 2
export
Z.f()
echo $(Z.x)
# Prints "2"
This works with arbitrary levels of nesting.
Based on PR#43374 by YAMAMOTO Takeshi, some improvements.
OMake is a build system, similar to GNU make, but with many additional
features, including:
- Support for large projects spanning multiple directories;
- Support for commands that produce several targets at once;
- Fast, accurate, automated dependency analysis using MD5 digests;
- Portability: omake provides a consistent interface on Win32
and on Unix systems including Linux, OSX, and Cygwin;
- Builtin functions that provide the most common features of
programs like grep, sed, and awk;
- Active filesystem monitoring, where the build automatically
restarts whenever you modify a source file.