diff options
author | rillig <rillig@pkgsrc.org> | 2005-09-05 13:27:36 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-09-05 13:27:36 +0000 |
commit | ffc5bb897055faaf208911ed605fa955ab5e4e79 (patch) | |
tree | 724ed019bb4ef417bda08f569879f483d60148f5 /pkgtools | |
parent | 79ca200edf5410745815331fa777a635843b77a8 (diff) | |
download | pkgsrc-ffc5bb897055faaf208911ed605fa955ab5e4e79.tar.gz |
Replaced two instances of ad-hoc regular expressions with regex_varassign.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index e6fe0c1cc9f..65cb987cf89 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -11,7 +11,7 @@ # Freely redistributable. Absolutely no warranty. # # From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp -# $NetBSD: pkglint.pl,v 1.279 2005/09/05 13:06:20 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.280 2005/09/05 13:27:36 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -1168,7 +1168,7 @@ sub readmakefile($$$$) { sub checkline_Makefile_vartype($$) { my ($line, $vartypes) = @_; - if ($line->text =~ qr"^([A-Z_a-z0-9.]+)\s*(=|\?=|\+=)\s*(.*)") { + if ($line->text =~ $regex_varassign) { my ($varname, $op, $value) = ($1, $2, $3); if ($value =~ qr"\$") { # ignore values that contain other variables @@ -1252,8 +1252,8 @@ sub checklines_deprecated_variables($) { } foreach my $line (@{$lines}) { - if ($line->text =~ qr"^([A-Z][A-Z0-9_]*)\s*[!+?]?=") { - my ($varname) = ($1); + if ($line->text =~ $regex_varassign) { + my ($varname, undef, undef) = ($1, $2, $3); if (exists($vars{$varname})) { $line->log_warning("${varname} is deprecated. $vars{$varname}"); } |