summaryrefslogtreecommitdiff
path: root/variable.h
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2012-01-30 00:21:57 +0000
committerPaul Smith <psmith@gnu.org>2012-01-30 00:21:57 +0000
commitef6461611b8fb7cd4a92168d4c319153462afb5a (patch)
tree715f4d6f1177ce9bb4e5d2d84bf89575c7906175 /variable.h
parentfca11f60390cf607f68b497c3909b1fb40251070 (diff)
downloadgunmake-ef6461611b8fb7cd4a92168d4c319153462afb5a.tar.gz
Add support for "::=" simple assignment operator.
The next POSIX standard will define "::=" to have the same behavior as GNU make's ":=", so add support for this new operator.
Diffstat (limited to 'variable.h')
-rw-r--r--variable.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/variable.h b/variable.h
index 1fd1b66..1fe3d1e 100644
--- a/variable.h
+++ b/variable.h
@@ -35,7 +35,7 @@ enum variable_origin
enum variable_flavor
{
f_bogus, /* Bogus (error) */
- f_simple, /* Simple definition (:=) */
+ f_simple, /* Simple definition (:= or ::=) */
f_recursive, /* Recursive definition (=) */
f_append, /* Appending definition (+=) */
f_conditional, /* Conditional definition (?=) */
@@ -52,9 +52,9 @@ enum variable_flavor
struct variable
{
char *name; /* Variable name. */
- int length; /* strlen (name) */
char *value; /* Variable value. */
struct floc fileinfo; /* Where the variable was defined. */
+ int length; /* strlen (name) */
unsigned int recursive:1; /* Gets recursively re-evaluated. */
unsigned int append:1; /* Nonzero if an appending target-specific
variable. */
@@ -160,7 +160,7 @@ struct variable *do_variable_definition (const struct floc *flocp,
enum variable_flavor flavor,
int target_var);
char *parse_variable_definition (const char *line,
- enum variable_flavor *flavor);
+ struct variable *v);
struct variable *assign_variable_definition (struct variable *v, char *line);
struct variable *try_variable_definition (const struct floc *flocp, char *line,
enum variable_origin origin,