summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2005-02-28 07:48:22 +0000
committerPaul Smith <psmith@gnu.org>2005-02-28 07:48:22 +0000
commitd2516343bc5c105543b22eed3b073a8a4e14a659 (patch)
treeb33081457bdf9207b45add40ba56fdeccf63fe6f /read.c
parent93bd1bd93c1033352e5059ed721a0cc769449639 (diff)
downloadgunmake-d2516343bc5c105543b22eed3b073a8a4e14a659.tar.gz
* New feature: -L option
* New function: $(info ...) * Disallow $(eval ...) to create prereq relationships inside command scripts (caused core dumps) * Try to allow more tests to succeed in Windows/DOS by sanitizing CRLF and \ * Various bug fixes and code cleanups (see the ChangeLog entry)
Diffstat (limited to 'read.c')
-rw-r--r--read.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/read.c b/read.c
index 0862b48..d235c6a 100644
--- a/read.c
+++ b/read.c
@@ -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 ("");