pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint/files Improved the heuristics for det...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/012ff2317043
branches:  trunk
changeset: 518398:012ff2317043
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Fri Sep 08 07:45:36 2006 +0000

description:
Improved the heuristics for detecting absolute pathnames.

Not only CFLAGS, but also {FOO}_CFLAGS should be passed through the :M*
operator before being passed to the shell.

diffstat:

 pkgtools/pkglint/files/makevars.map |   4 ++--
 pkgtools/pkglint/files/pkglint.pl   |  11 +++++++----
 2 files changed, 9 insertions(+), 6 deletions(-)

diffs (58 lines):

diff -r 4acf17d01067 -r 012ff2317043 pkgtools/pkglint/files/makevars.map
--- a/pkgtools/pkglint/files/makevars.map       Fri Sep 08 07:41:46 2006 +0000
+++ b/pkgtools/pkglint/files/makevars.map       Fri Sep 08 07:45:36 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: makevars.map,v 1.136 2006/07/27 18:59:32 rillig Exp $
+# $NetBSD: makevars.map,v 1.137 2006/09/08 07:45:36 rillig Exp $
 #
 
 # This file contains the guessed type of some variables, according to
@@ -317,7 +317,7 @@
 GAMEMODE               FileMode [$system]
 GAMEOWN                        UserGroupName [$system]
 GCC_REQD               List of Version [$package_list]
-GENERATE_PLIST         List of ShellWord [m:a,c:a]
+GENERATE_PLIST         List of ShellWord [$package_list]
 # ^^ List of Shellcommand, terminated with a semicolon
 GNU_ARCH               { mips }
 GNU_CONFIGURE          Yes [c:s,m:s]
diff -r 4acf17d01067 -r 012ff2317043 pkgtools/pkglint/files/pkglint.pl
--- a/pkgtools/pkglint/files/pkglint.pl Fri Sep 08 07:41:46 2006 +0000
+++ b/pkgtools/pkglint/files/pkglint.pl Fri Sep 08 07:45:36 2006 +0000
@@ -1,5 +1,5 @@
 #! @PERL@
-# $NetBSD: pkglint.pl,v 1.672 2006/08/31 06:49:59 rillig Exp $
+# $NetBSD: pkglint.pl,v 1.673 2006/09/08 07:45:36 rillig Exp $
 #
 
 # pkglint - static analyzer and checker for pkgsrc packages
@@ -1781,7 +1781,7 @@
 use constant regex_dependency_wildcard
                                => qr"^((?:\$\{[\w_]+\}|[\w_]|-[^\d\[])+)-(?:\[0-9\]|\d.*)$";
 use constant regex_gnu_configure_volatile_vars
-                               => qr"^(?:CFLAGS||CPPFLAGS|CXXFLAGS|FFLAGS|LDFLAGS|LIBS)$";
+                               => qr"^(?:.*_)?(?:CFLAGS||CPPFLAGS|CXXFLAGS|FFLAGS|LDFLAGS|LIBS)$";
 use constant regex_mk_comment  => qr"^ *\s*#(.*)$";
 use constant regex_mk_cond     => qr"^\.(\s*)(if|ifdef|ifndef|else|elif|endif|for|endfor|undef)(?:\s+([^\s#][^#]*?))?\s*(?:#.*)?$";
 use constant regex_mk_dependency=> qr"^([^\s:]+(?:\s*[^\s:]+)*):\s*([^#]*?)(?:\s*#.*)?$";
@@ -3649,6 +3649,9 @@
                } elsif ($before =~ qr"\+\s*[\"']$") {
                        # Something like foodir + '/lib'
 
+               } elsif ($before =~ qr"\w$") {
+                       # Something like $dir/lib
+
                } else {
                        $opt_debug_misc and $line->log_debug("before=${before}");
                        checkword_absolute_pathname($line, $path);
@@ -4423,8 +4426,8 @@
                                "the many INSTALL_*_DIR macros is appropriate, since INSTALLATION_DIRS",
                                "takes care of that.",
                                "",
-                               "Note that you should only do this if the package creates _all_ directories",
-                               "it needs before trying to install files into them.");
+                               "Note that you should only do this if the package creates _all_",
+                               "directories it needs before trying to install files into them.");
                }
 
                if ($state == SCST_INSTALL_DIR2 && $shellword =~ qr"^\$") {



Home | Main Index | Thread Index | Old Index