Gaëtan Harter
2c5eeca47a
makefiles/utils: function to memoize a variable evaluation
...
This allow deferring a variable evaluation to its usage but still
benefit from only evaluating it once on multiple uses.
2019-06-28 11:34:43 +02:00
Gaëtan Harter
fcf8c4782d
makefiles/utils: function to export variables for a target
...
This allows exporting variables only for some target.
It will allow not exporting variables when not needed, and so prevent
unnecessary evaluation.
2019-06-28 11:33:54 +02:00
Juan Carrano
f466171053
makefiles/utils: add tests for checks.mk.
...
make -f test-checks.mk test-ensure_value should succeed, while
make -f test-checks.mk test-ensure_value-negative should fail.
2018-12-07 18:19:38 +01:00
Juan Carrano
547d9f0802
makefiles/utils: Add a function for checking that a string is not empty.
...
A call to `$(ensure_value x,y)` will fail with message y if x is empty, and
otherwise return x. This can be useto write more compact makefiles, while still
producing friendly error messages.
2018-12-07 18:19:34 +01:00