diff options
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -1822,6 +1822,13 @@ record_files (struct nameseq *filenames, char *pattern, char *pattern_percent, char **targets = 0, **target_percents = 0; struct commands *cmds; + /* If we've already snapped deps, that means we're in an eval being + resolved after the makefiles have been read in. We can't add more rules + at this time, since they won't get snapped and we'll get core dumps. + See Savannah bug # 12124. */ + if (snapped_deps) + fatal (flocp, _("prerequisites cannot be defined in command scripts")); + if (commands_idx > 0) { cmds = (struct commands *) xmalloc (sizeof (struct commands)); @@ -1910,7 +1917,7 @@ record_files (struct nameseq *filenames, char *pattern, char *pattern_percent, if (find_percent (this->name) != 0) { - char stem[PATH_MAX]; + PATH_VAR (stem); char *o; char *buffer = variable_expand (""); |