[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#644021: [checks/{rules,debhelper}] parse continuation lines correctly



* Niels Thykier <niels@thykier.net>, 2011-10-02, 09:45:
With the attached patch debian/rules parsers in checks/rules and checks/debhelper will parse continuation lines correctly.

This breaks at least t/tests/rules-build-dep-pattern, so I have not applied it. I assume it is because one of the capture patterns now include a "\n" (which it didn't before due to m// vs m//s ).

Indeed, but that's a latent bug in the existing code, not in my patch. :P Please see the attachment for a fix. :)

Finally, (double-check) comment lines can be extended in make, right[1]?

Surprisingly, yes, you can have multi-line comments in makefiles.

--
Jakub Wilk
diff --git a/checks/rules b/checks/rules
--- a/checks/rules
+++ b/checks/rules
@@ -269,7 +269,7 @@
             $_ = quotemeta $_;
             s/\\\$\\\([^\):]+\\:([^=]+)\\=([^\)]+)\1\\\)/$2.*/g;
             qr/^$_$/;
-        } split (m/ /o, $2);
+        } split (' ', $2);
         for my $target (@current_targets) {
             if ($target =~ m/%/o) {
                 my $pattern = quotemeta $target;

Reply to: