mirror of
https://github.com/mirror/make.git
synced 2025-01-10 20:30:20 +08:00
6c06c547dc
POSIX Issue 8 will require a new assignment operator, :::=. This operator behaves similarly to the BSD make := operator: the right-hand side is expanded immediately, but then the value is re-escaped (all '$' are converted to '$$') and the resulting variable is considered a recursive variable: the value is re-expanded on use. * src/variable.h (enum variable_flavor): Add f_expand flavor. * src/variable.c (do_variable_definition): When defining f_expand, post-process the result to re-escape '$' characters. Remove default: to the compiler warns about un-handled enum values. Set recursive values for both f_recursive and f_expand. (parse_variable_definition): Rewrite this method. The previous version was annoying to extend to ':::='. (print_variable): Remove default: so the compiler warns us about un-handled enum values. * src/function.c (func_origin): Remove default: so the compiler warns us about un-handled enum values. * doc/make.texi: Add documentation for :::=. * tests/scripts/variables/define: Add a test for define :::=. * tests/scripts/variables/flavors: Add tests for :::=. * tests/scripts/variables/negative: Add tests for :::=. |
||
---|---|---|
.. | ||
automatic | ||
CURDIR | ||
DEFAULT_GOAL | ||
define | ||
EXTRA_PREREQS | ||
flavors | ||
GNUMAKEFLAGS | ||
INCLUDE_DIRS | ||
LIBPATTERNS | ||
MAKE | ||
MAKE_RESTARTS | ||
MAKECMDGOALS | ||
MAKEFILES | ||
MAKEFLAGS | ||
MAKELEVEL | ||
MFILE_LIST | ||
negative | ||
private | ||
SHELL | ||
special | ||
undefine |