From 17f2dda0acc8f97e40819d75d99d85283d9027a1 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 7 Feb 2000 19:54:04 +0000 Subject: * Fix for dir.c from Andreas Schwab. * Fix += target-specific variables: if your direct parent doesn't have a setting for the variable but his parent does, you'll get recursive expansion errors. --- variable.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'variable.h') diff --git a/variable.h b/variable.h index d449ef8..4c707dc 100644 --- a/variable.h +++ b/variable.h @@ -95,7 +95,10 @@ extern char *patsubst_expand PARAMS ((char *o, char *text, char *pattern, char * char *pattern_percent, char *replace_percent)); /* expand.c */ -extern char *recursively_expand PARAMS ((struct variable *v)); +extern char *recursively_expand_setlist PARAMS ((struct variable *v, + struct variable_set_list *l)); + +#define recursively_expand(v) recursively_expand_setlist((v),(struct variable_set_list *)0) /* variable.c */ extern struct variable_set_list *create_new_variable_set PARAMS ((void)); @@ -108,7 +111,12 @@ 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 *try_variable_definition PARAMS ((const struct floc *flocp, char *line, enum variable_origin origin, int target_var)); -extern struct variable *lookup_variable PARAMS ((char *name, unsigned int length)); +extern struct variable *lookup_variable_setlist + PARAMS ((char *name, unsigned int length, + struct variable_set_list **lisp)); + +#define lookup_variable(n,l) lookup_variable_setlist((n),(l),\ + (struct variable_set_list **)0) extern struct variable *define_variable_in_set PARAMS ((char *name, unsigned int length, char *value, -- cgit v1.2.3