This is an example for a function myfn
that:
- Takes a local input file name
FILE
- Returns an
abs_filename
, created by using the global variablePATH
- We couldn't replace
myfn
with another make target as it wouldn't give us a clear return value - We had to use ($value ...) to avoid the unwanted expansion described in Eval Function and Value Function
- When we miss the value function, we get "Missing Separator Stop error"
- Commenting an ($eval ($call ... ) expression is not possible (even the syntax highlighting showed so -_-).
- Use this way only if the function expression is complicated and needs multiple lines, otherwise, one could use filters and similar stuff
- StackOverflow Answer.
- Eval Function.
- Value Function.
- Shell Function.
- Define the multi-line-expression-enabler.
Thanks for the nice example.
One remark: 1-simple.mk line 10: closing parenthesis is missing