summaryrefslogtreecommitdiff
path: root/variable.h
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2009-05-26 01:31:40 +0000
committerPaul Smith <psmith@gnu.org>2009-05-26 01:31:40 +0000
commit5b4d419476e9fbda8ea26017f6ec15956d103ed9 (patch)
tree534eac34c276b58bbbfa1d104820843af666d1a1 /variable.h
parent7b16a8e3ca8e9866df29df868a4cb1b6771d5f48 (diff)
downloadgunmake-5b4d419476e9fbda8ea26017f6ec15956d103ed9.tar.gz
Add 'private' variable modifier, feature submitted by Ramon Garcia.
Rework the parser for variables to allow multiple modifiers and also allow for variables and targets with modifier names, like "export" and "private".
Diffstat (limited to 'variable.h')
-rw-r--r--variable.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/variable.h b/variable.h
index 8a80b76..d5b194f 100644
--- a/variable.h
+++ b/variable.h
@@ -59,10 +59,12 @@ struct variable
variable. */
unsigned int conditional:1; /* Nonzero if set with a ?=. */
unsigned int per_target:1; /* Nonzero if a target-specific variable. */
- unsigned int special:1; /* Nonzero if this is a special variable. */
+ unsigned int special:1; /* Nonzero if this is a special variable. */
unsigned int exportable:1; /* Nonzero if the variable _could_ be
exported. */
unsigned int expanding:1; /* Nonzero if currently being expanded. */
+ unsigned int private_var:1; /* Nonzero avoids inheritance of this
+ target-specific variable. */
unsigned int exp_count:EXP_COUNT_BITS;
/* If >1, allow this many self-referential
expansions. */
@@ -92,6 +94,7 @@ struct variable_set_list
{
struct variable_set_list *next; /* Link in the chain. */
struct variable_set *set; /* Variable set. */
+ int next_is_parent; /* True if next is a parent target. */
};
/* Structure used for pattern-specific variables. */
@@ -151,7 +154,9 @@ struct variable *do_variable_definition (const struct floc *flocp,
enum variable_origin origin,
enum variable_flavor flavor,
int target_var);
-struct variable *parse_variable_definition (struct variable *v, char *line);
+char *parse_variable_definition (const char *line,
+ enum variable_flavor *flavor);
+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,
int target_var);