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 /file.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 'file.c')
-rw-r--r-- | file.c | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -680,15 +680,30 @@ static void print_file (f) struct file *f; { - register struct dep *d; + struct dep *d; + struct dep *ood = 0; putchar ('\n'); if (!f->is_target) puts (_("# Not a target:")); printf ("%s:%s", f->name, f->double_colon ? ":" : ""); + /* Print all normal dependencies; note any order-only deps. */ for (d = f->deps; d != 0; d = d->next) - printf (" %s", dep_name (d)); + if (! d->ignore_mtime) + printf (" %s", dep_name (d)); + else if (! ood) + ood = d; + + /* Print order-only deps, if we have any. */ + if (ood) + { + printf (" | %s", dep_name (ood)); + for (d = ood->next; d != 0; d = d->next) + if (d->ignore_mtime) + printf (" %s", dep_name (d)); + } + putchar ('\n'); if (f->precious) |