diff options
author | rillig <rillig@pkgsrc.org> | 2006-09-08 07:45:36 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-09-08 07:45:36 +0000 |
commit | 3b132a687299e1e3c28c8b6406be901e75988ed8 (patch) | |
tree | 3b4232156ecc6716de3da0f3217ab982d2bd5234 | |
parent | 042332daf4fb982b4e678c2b93b3979173c06e9e (diff) | |
download | pkgsrc-3b132a687299e1e3c28c8b6406be901e75988ed8.tar.gz |
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.
-rw-r--r-- | pkgtools/pkglint/files/makevars.map | 4 | ||||
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 11 |
2 files changed, 9 insertions, 6 deletions
diff --git a/pkgtools/pkglint/files/makevars.map b/pkgtools/pkglint/files/makevars.map index dada58db0f8..a4dca474906 100644 --- a/pkgtools/pkglint/files/makevars.map +++ b/pkgtools/pkglint/files/makevars.map @@ -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 @@ GAMEGRP UserGroupName [$system] 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 --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 5217dc23676..e2ddef0cd6f 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -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_gt => qr"^((?:\$\{[\w_]+\}|[\w_]|-[^\d])+)>=(.*)$" 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 @@ sub checkline_other_absolute_pathname($$) { } 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 @@ sub checkline_mk_shelltext($$) { "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"^\$") { |