summaryrefslogtreecommitdiff
path: root/variable.h
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2002-07-08 02:26:47 +0000
committerPaul Smith <psmith@gnu.org>2002-07-08 02:26:47 +0000
commit8572d6adf04d397505770b0b0d5cfd91cf6a92a8 (patch)
tree8e590714da1d480bef4ca2afbe81fa95c2624de6 /variable.h
parent4a073980236d80b47a24c5caea3ece4e9bb7e044 (diff)
downloadgunmake-8572d6adf04d397505770b0b0d5cfd91cf6a92a8.tar.gz
Major updates in preparation for 3.80.
New version of the manual, put into the doc subdir. Enhancements: $(eval ...) and $(value ...) functions, various bug fixes, etc. See the ChangeLog. More to come.
Diffstat (limited to 'variable.h')
-rw-r--r--variable.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/variable.h b/variable.h
index 8d4853f..483427a 100644
--- a/variable.h
+++ b/variable.h
@@ -31,6 +31,15 @@ enum variable_origin
o_invalid /* Core dump time. */
};
+enum variable_flavor
+ {
+ f_bogus, /* Bogus (error) */
+ f_simple, /* Simple definition (:=) */
+ f_recursive, /* Recursive definition (=) */
+ f_append, /* Appending definition (+=) */
+ f_conditional /* Conditional definition (?=) */
+ };
+
/* Structure that represents one variable definition.
Each bucket of the hash table is a chain of these,
chained through `next'. */
@@ -117,6 +126,7 @@ extern void initialize_file_variables PARAMS ((struct file *file, int read));
extern void print_file_variables PARAMS ((struct file *file));
extern void print_variable_set PARAMS ((struct variable_set *set, char *prefix));
extern void merge_variable_set_lists PARAMS ((struct variable_set_list **setlist0, struct variable_set_list *setlist1));
+extern struct variable *do_variable_definition PARAMS ((const struct floc *flocp, const char *name, char *value, enum variable_origin origin, enum variable_flavor flavor, int target_var));
extern struct variable *try_variable_definition PARAMS ((const struct floc *flocp, char *line, enum variable_origin origin, int target_var));
extern struct variable *lookup_variable PARAMS ((const char *name, unsigned int length));
@@ -125,7 +135,7 @@ extern struct variable *lookup_variable_in_set PARAMS ((const char *name,
const struct variable_set *set));
extern struct variable *define_variable_in_set
- PARAMS ((char *name, unsigned int length, char *value,
+ PARAMS ((const char *name, unsigned int length, char *value,
enum variable_origin origin, int recursive,
struct variable_set *set, const struct floc *flocp));
@@ -141,6 +151,11 @@ extern struct variable *define_variable_in_set
define_variable_in_set((n),(l),(v),(o),(r),\
current_variable_set_list->set,(f))
+/* Define a variable with a location in the global variable set. */
+
+#define define_variable_global(n,l,v,o,r,f) \
+ define_variable_in_set((n),(l),(v),(o),(r),NULL,(f))
+
/* Define a variable in FILE's variable set. */
#define define_variable_for_file(n,l,v,o,r,f) \