diff options
author | Paul Smith <psmith@gnu.org> | 2002-07-09 06:35:56 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2002-07-09 06:35:56 +0000 |
commit | 6c9a393f954805d49ab6c66957b46199ddd6e78e (patch) | |
tree | 88a3c6a2e807a1356d4bcca1ecca91a6cc037ee5 /read.c | |
parent | 724925be2b9a48f7911ee6baa315b872bd86995c (diff) | |
download | gunmake-6c9a393f954805d49ab6c66957b46199ddd6e78e.tar.gz |
Documentation and tests for order-only prerequisites.
Add a new test suite for automatic variables.
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1524,10 +1524,17 @@ uniquize_deps (chain) last = d; next = d->next; while (next != 0) - if (streq (dep_name (d), dep_name (next)) - && d->ignore_mtime == next->ignore_mtime) + if (streq (dep_name (d), dep_name (next))) { struct dep *n = next->next; + /* If ignore_mtimes are not equal, one of these is an order-only + prerequisite and one isn't. That means that we should remove + the one that isn't and keep the one that is. Ideally we'd + like to keep the normal one always but that's hard, and + probably not very important, so just remove the second one and + force the first one to be normal. */ + if (d->ignore_mtime != next->ignore_mtime) + d->ignore_mtime = 0; last->next = n; if (next->name != 0 && next->name != d->name) free (next->name); |