pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files - Accept "\"...\"" as valid CPP...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a563ca89fe6c
branches:  trunk
changeset: 506984:a563ca89fe6c
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Tue Jan 24 20:07:54 2006 +0000

description:
- Accept "\"...\"" as valid CPP macro, as some old configure scripts need
  it that way. In --debug mode, a warning is printed.

diffstat:

 pkgtools/pkglint/files/pkglint.pl |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 9094be793561 -r a563ca89fe6c pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Tue Jan 24 20:04:04 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Tue Jan 24 20:07:54 2006 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.481 2006/01/23 01:51:46 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.482 2006/01/24 20:07:54 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -2464,6 +2464,9 @@
                        if ($macval =~ qr"^\\\"(?:\$\{[A-Z0-9_]+:Q\}|[^\$])*\\\"") {
                                # Everything's fine.
 
+                       } elsif ($macval =~ qr"^\"\\\"(?:\$\{[A-Z0-9_]+\}|[^\$])*\\\"\"") {
+                               $opt_debug and $line->log_warning("Not the best style for CPP macros, but accepted.");
+
                        } elsif ($macval =~ regex_unresolved && $macval =~ qr"[\"']") {
                                $line->log_warning("Unusual macro value ${macval}.");
                                $line->explain(



Home | Main Index | Thread Index | Old Index