diff options
author | Paul Smith <psmith@gnu.org> | 2002-07-08 02:26:47 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2002-07-08 02:26:47 +0000 |
commit | 8572d6adf04d397505770b0b0d5cfd91cf6a92a8 (patch) | |
tree | 8e590714da1d480bef4ca2afbe81fa95c2624de6 /implicit.c | |
parent | 4a073980236d80b47a24c5caea3ece4e9bb7e044 (diff) | |
download | gunmake-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 'implicit.c')
-rw-r--r-- | implicit.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -100,7 +100,7 @@ pattern_search (file, archive, depth, recursions) /* List of dependencies found recursively. */ struct file **intermediate_files - = (struct file **) alloca (max_pattern_deps * sizeof (struct file *)); + = (struct file **) xmalloc (max_pattern_deps * sizeof (struct file *)); /* List of the patterns used to find intermediate files. */ char **intermediate_patterns @@ -121,8 +121,8 @@ pattern_search (file, archive, depth, recursions) /* Buffer in which we store all the rules that are possibly applicable. */ struct rule **tryrules - = (struct rule **) alloca (num_pattern_rules * max_pattern_targets - * sizeof (struct rule *)); + = (struct rule **) xmalloc (num_pattern_rules * max_pattern_targets + * sizeof (struct rule *)); /* Number of valid elements in TRYRULES. */ unsigned int nrules; @@ -495,7 +495,7 @@ pattern_search (file, archive, depth, recursions) /* RULE is nil if the loop went all the way through the list and everything failed. */ if (rule == 0) - return 0; + goto done; foundrule = i; @@ -624,6 +624,9 @@ pattern_search (file, archive, depth, recursions) file->also_make = new; } + done: + free (intermediate_files); + free (tryrules); - return 1; + return rule != 0; } |