]> ruderich.org/simon Gitweb - blhc/blhc.git/commitdiff
Document $cc_regex;
authorSimon Ruderich <simon@ruderich.org>
Wed, 11 Apr 2012 11:36:42 +0000 (13:36 +0200)
committerSimon Ruderich <simon@ruderich.org>
Wed, 11 Apr 2012 11:36:42 +0000 (13:36 +0200)
bin/blhc

index 518626d54429f6570def1af01e9d163491732782..4682d9b86f0d22c210653665ced35f11d893566e 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -31,8 +31,9 @@ our $VERSION = '0.01';
 
 # Regex to catch compiler commands.
 my $cc_regex = qr/
-    (?<!\.)(?:cc|gcc|g\+\+|c\+\+)
-    (?:-[\d.]+)?
+    (?<!\.)                # ignore file names, e.g. "test.gcc"
+    (?:cc|gcc|g\+\+|c\+\+)
+    (?:-[\d.]+)?           # version suffix, e.g. "gcc-4.6"
     /x;
 # Full regex which matches the complete compiler name. Used in a few places to
 # prevent false negatives.