Create a new internal interface for defining new make functions.

This allows us to create new functions without changing function.c.
You still have to modify the GNU make code (for now) though: this is
simply a preliminary step to possibly allowing make to load modules.

Modify the Guile integration to use this method rather than ifdefs
in function.c.
This commit is contained in:
Paul Smith
2012-01-16 03:32:49 +00:00
parent 4e2e5eb199
commit 49cc211819
5 changed files with 59 additions and 27 deletions

View File

@@ -167,6 +167,9 @@ struct variable *try_variable_definition (const struct floc *flocp, char *line,
int target_var);
void init_hash_global_variable_set (void);
void hash_init_function_table (void);
void define_new_function(const struct floc *flocp,
const char *name, int min, int max, int expand,
char *(*func)(char *, char **, const char *));
struct variable *lookup_variable (const char *name, unsigned int length);
struct variable *lookup_variable_in_set (const char *name, unsigned int length,
const struct variable_set *set);