[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: possible bug with order rules
From: |
Benoit Poulot-Cazajous |
Subject: |
Re: possible bug with order rules |
Date: |
12 Nov 2003 22:56:27 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 |
Noel Yap <address@hidden> writes:
> $(install.DIR)/common/%/.: | $(install.DIR)/common/.
> @echo building $(@): $(^)
order-only dependencies do not work very well in implicit rules.
This quick&dirty patch may fix the problem :
--- implicit.c.orig 2002-09-04 09:26:19.000000000 +0200
+++ implicit.c 2003-11-11 22:19:19.000000000 +0100
@@ -108,6 +108,7 @@
/* This buffer records all the dependencies actually found for a rule. */
char **found_files = (char **) alloca (max_pattern_deps * sizeof (char *));
+ int *found_files_im = (int *) alloca (max_pattern_deps * sizeof (int));
/* Number of dep names now in FOUND_FILES. */
unsigned int deps_found = 0;
@@ -402,7 +403,9 @@
if (lookup_file (p) != 0
|| ((!dep->changed || check_lastslash) && file_exists_p (p)))
{
- found_files[deps_found++] = xstrdup (p);
+ found_files[deps_found] = xstrdup (p);
+ found_files_im[deps_found] = dep->ignore_mtime;
+ ++deps_found;
continue;
}
/* This code, given FILENAME = "lib/foo.o", dependency name
@@ -413,7 +416,9 @@
DBS (DB_IMPLICIT,
(_("Found prerequisite `%s' as VPATH `%s'\n"), p, vp));
strcpy (vp, p);
- found_files[deps_found++] = vp;
+ found_files[deps_found] = vp;
+ found_files_im[deps_found] = dep->ignore_mtime;
+ ++deps_found;
continue;
}
@@ -446,6 +451,7 @@
because every elt of FOUND_FILES is consumed
or freed later. */
found_files[deps_found] = xstrdup (p);
+ found_files_im[deps_found] = dep->ignore_mtime;
++deps_found;
continue;
}
@@ -546,7 +552,7 @@
}
dep = (struct dep *) xmalloc (sizeof (struct dep));
- dep->ignore_mtime = 0;
+ dep->ignore_mtime = found_files_im[deps_found];
s = found_files[deps_found];
if (recursions == 0)
{
-- Benoit