Author: adam-guest
Date: 2008-07-07 22:32:17 +0000 (Mon, 07 Jul 2008)
New Revision: 1567

Modified:
   trunk/debian/changelog
   trunk/scripts/checkbashisms.pl
Log:
Strip leading @s from makefile lines

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-07-07 17:50:57 UTC (rev 1566)
+++ trunk/debian/changelog      2008-07-07 22:32:17 UTC (rev 1567)
@@ -11,6 +11,7 @@
     + Treat """" as "" when removing quotes
     + Catch shell script wrappers which use "foo $0 $@ &\nexec true"
     + Don't treat '. "a b"' as a sourced script being passed arguments
+    + Strip leading @s from makefile lines
   * debchange: Also collapse UNRELEASED stanzas when -d is used
   * debcheckout:
     + Improve git repository handling with --file

Modified: trunk/scripts/checkbashisms.pl
===================================================================
--- trunk/scripts/checkbashisms.pl      2008-07-07 17:50:57 UTC (rev 1566)
+++ trunk/scripts/checkbashisms.pl      2008-07-07 22:32:17 UTC (rev 1567)
@@ -140,27 +140,6 @@
        chomp;
        my $orig_line = $_;
 
-       if ($makefile) {
-           $last_continued = $continued;
-           if (/[^\\]\\$/) {
-               $continued = 1;
-           } else {
-               $continued = 0;
-           }
-
-           # Don't match lines that look like a rule if we're in a
-           # continuation line before the start of the rules
-           if (/^[\w%-]+:+\s.*?;?(.*)$/ and !($last_continued and 
!$found_rules)) {
-               $found_rules = 1;
-               $_ = $1 if $1;
-           } 
-
-           last if m%^(export )?SHELL\s*:?=\s*(/bin/)?bash\s*%;
-
-           s/^\t//;
-           s/(\$){2}/$1/;
-       }
-
        # We want to remove end-of-line comments, so need to skip
        # comments that appear inside balanced pairs
        # of single or double quotes
@@ -188,6 +167,28 @@
            $_ = $orig_line;
        }
 
+       if ($makefile) {
+           $last_continued = $continued;
+           if (/[^\\]\\$/) {
+               $continued = 1;
+           } else {
+               $continued = 0;
+           }
+
+           # Don't match lines that look like a rule if we're in a
+           # continuation line before the start of the rules
+           if (/^[\w%-]+:+\s.*?;?(.*)$/ and !($last_continued and 
!$found_rules)) {
+               $found_rules = 1;
+               $_ = $1 if $1;
+           } 
+
+           last if m%^(export )?SHELL\s*:?=\s*(/bin/)?bash\s*%;
+
+           s/^\t//;
+           s/(\$){2}/$1/;
+           s/^[\s\t]*@//;
+       }
+
        if ($cat_string ne "" and m/^\Q$cat_string\E$/) {
            $cat_string = "";
            next;



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to