[Omake] help not exporting the loop variable?
Erick Tryzelaar
erickt at dslextreme.com
Mon Jan 8 21:24:30 PST 2007
Aleksey Nogin wrote:
> First, you can have each package file define the package variable and
> then the foreach loop would simply call the register-package function.
>
> Alternatively, you can do the following:
>
>
> OMakefile:
> ...
> foreach(x, a b)
> echo loading $x
> package. =
> include $x
> register-package($(package))
> echo
> export packages
>
> a.om:
> this.name = a
>
> b.om:
> this.name = b
>
> Note: the explicit "this." is needed because the a.om/b.om files are
> parsed without any knowledge of the fact that they are being included
> from an object context.
Hi again,
I'm now running into a scoping issue with .PHONY targets. I'd like to do
something like this:
foreach(x, a b)
echo loading $x
package. =
include $x
register-package($(package))
.PHONY: $(package.name)
echo
export packages
But I'm not sure how to export the $(package.name). I tried "export
packages $(package.name)" but that didn't work. Doing a full "export"
works though. Is there a way to do this?
-e
More information about the Omake
mailing list