You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
extensions[] =
.a
.b
.c
foreach(ext => ..., $(extensions))
x = $(ext)
%.q: %$(ext)
echo $"ext = $(ext), x = $x" # Comment out this line and the error disappears.
cp $< $@
export .RULE
It defines a set of implicit rules for %.q targets. Call it for example with
touch foo.b; rm -f foo.q; omake foo.q
omake raises the error
unbound variable: public.ext
A simple workaround is shown in the example. If we capture the loop
variable ext inside the foreach-loop, but outside of the (implicit) rule
in variable x, we can use xinside the rule body without an error.
The text was updated successfully, but these errors were encountered:
Consider the following OMakefile:
It defines a set of implicit rules for
%.q
targets. Call it for example withomake raises the error
A simple workaround is shown in the example. If we capture the loop
variable
ext
inside theforeach
-loop, but outside of the (implicit) rulein variable
x
, we can usex
inside the rule body without an error.The text was updated successfully, but these errors were encountered: