summaryrefslogtreecommitdiff
path: root/implicit.c
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@kolpackov.net>2009-09-25 15:51:11 +0000
committerBoris Kolpackov <boris@kolpackov.net>2009-09-25 15:51:11 +0000
commitc7eec446add4c4134db9f0e54f241b57bfd97136 (patch)
tree252668457e4323d36344fc63c25f9cd6e6fd6fd7 /implicit.c
parenta926c43747d5d0e964dcc45e50447f1adb49f380 (diff)
downloadmake-c7eec446add4c4134db9f0e54f241b57bfd97136.tar.gz
Performance improvement.
Diffstat (limited to 'implicit.c')
-rw-r--r--implicit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/implicit.c b/implicit.c
index 6db4d0ed..c3e35f7e 100644
--- a/implicit.c
+++ b/implicit.c
@@ -390,6 +390,10 @@ pattern_search (struct file *file, int archive,
}
}
+ /* Bail out early if we haven't found any rules. */
+ if (nrules == 0)
+ goto done;
+
/* If we have found a matching rule that won't match all filenames,
retroactively reject any non-"terminal" rules that do always match. */
if (specific_rule_matched)