diff options
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) |