]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - bin/blhc
Fix indentation.
[blhc/blhc.git] / bin / blhc
index 0fbf4c9a2de11c12192b184cdb749a2e36152c25..4713e287ad870f96d15ba8d6829fa54cf817970d 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -48,7 +48,7 @@ my @source_preprocess_compile_cpp = (
     # C++
     qw( cc cp cxx cpp CPP c++ C ),
     # Objective-C++
-    qw( mm Mr),
+    qw( mm M ),
 );
 my @source_preprocess_compile = (
     # C
@@ -62,7 +62,7 @@ my @source_preprocess_compile = (
 );
 my @source_preprocess_no_compile = (
     # Assembly
-    qw( s ),
+    qw( S sx ),
 );
 my @source_preprocess = (
     @source_preprocess_compile,
@@ -87,7 +87,7 @@ my @source_no_preprocess_compile = (
 );
 my @source_no_preprocess_no_compile = (
     # Assembly
-    qw( S sx ),
+    qw( s ),
 );
 my @source_no_preprocess = (
     @source_no_preprocess_compile,
@@ -441,7 +441,8 @@ if (not Getopt::Long::GetOptions(
             'color'    => \$option_color,
             'arch=s'   => \$option_arch,
             'buildd'   => \$option_buildd,
-        )) {
+        )
+        or scalar @ARGV == 0) {
     require Pod::Usage;
     Pod::Usage::pod2usage(2);
 }
@@ -622,40 +623,38 @@ FILE: foreach my $file (@ARGV) {
                 next;
             }
 
-            if (not $continuation) {
-                # Use the complete line if a line continuation occurred.
-                if (defined $complete_line) {
-                    $line = $complete_line;
-                    $complete_line = undef;
-                }
-
-                # Ignore lines with no compiler commands.
-                next if not $non_verbose
-                        and not $line =~ /\b$cc_regex(?:\s|\\)/o;
-                # Ignore lines with no filenames with extensions. May miss
-                # some non-verbose builds (e.g. "gcc -o test" [sic!]), but
-                # shouldn't be a problem as the log will most likely contain
-                # other non-verbose commands which are detected.
-                next if not $non_verbose
-                        and not $line =~ /$file_extension_regex/o;
-
-                # Ignore false positives.
-                #
-                # `./configure` output.
-                next if not $non_verbose
-                        and $line =~ /^(?:checking|(?:C|c)onfigure:) /;
-                next if $line =~ /^\s*(?:Host\s+)?(?:C(?:\+\+)?\s+)?
-                                   (?:C|c)ompiler[\s.]*:?\s+
-                                 /xo;
-                next if $line =~ /^\s*(?:- )?(?:HOST_)?(?:CC|CXX)\s*=\s*$cc_regex_full\s*$/o;
-
-                # Check if additional hardening options were used. Used to
-                # ensure they are used for the complete build.
-                $harden_pie     = 1 if any_flags_used($line, @def_cflags_pie, @def_ldflags_pie);
-                $harden_bindnow = 1 if any_flags_used($line, @def_ldflags_bindnow);
-
-                push @input, $line;
+            # Use the complete line if a line continuation occurred.
+            if (defined $complete_line) {
+                $line = $complete_line;
+                $complete_line = undef;
             }
+
+            # Ignore lines with no compiler commands.
+            next if not $non_verbose
+                    and not $line =~ /\b$cc_regex(?:\s|\\)/o;
+            # Ignore lines with no filenames with extensions. May miss
+            # some non-verbose builds (e.g. "gcc -o test" [sic!]), but
+            # shouldn't be a problem as the log will most likely contain
+            # other non-verbose commands which are detected.
+            next if not $non_verbose
+                    and not $line =~ /$file_extension_regex/o;
+
+            # Ignore false positives.
+            #
+            # `./configure` output.
+            next if not $non_verbose
+                    and $line =~ /^(?:checking|(?:C|c)onfigure:) /;
+            next if $line =~ /^\s*(?:Host\s+)?(?:C(?:\+\+)?\s+)?
+                                (?:C|c)ompiler[\s.]*:?\s+
+                                /xo;
+            next if $line =~ /^\s*(?:- )?(?:HOST_)?(?:CC|CXX)\s*=\s*$cc_regex_full\s*$/o;
+
+            # Check if additional hardening options were used. Used to
+            # ensure they are used for the complete build.
+            $harden_pie     = 1 if any_flags_used($line, @def_cflags_pie, @def_ldflags_pie);
+            $harden_bindnow = 1 if any_flags_used($line, @def_ldflags_bindnow);
+
+            push @input, $line;
         }
     }