diff options
author | rillig <rillig@pkgsrc.org> | 2005-08-21 10:20:13 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-08-21 10:20:13 +0000 |
commit | 815d49418bec36f9765e271fbc5689cdb6d8fe25 (patch) | |
tree | e131d0b88e8f2e50c3d2ba3077d54a8d5cc783b8 /pkgtools | |
parent | b5a201135e56e3f875d962f6ba9a92117797c936 (diff) | |
download | pkgsrc-815d49418bec36f9765e271fbc5689cdb6d8fe25.tar.gz |
Generally warn about the use of the := operator in Makefiles.
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/files/pkglint.pl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index 3b184c7e940..0841521026e 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.249 2005/08/21 08:55:52 rillig Exp $ +# $NetBSD: pkglint.pl,v 1.250 2005/08/21 10:20:13 rillig Exp $ # # This version contains lots of changes necessary for NetBSD packages # done by: @@ -360,7 +360,7 @@ my $regex_pkgname = qr"^((?:[\w.+]|-[^\d])+)-(\d(?:\w|\.\d)*)$"; my $regex_unresolved = qr"\$\{"; my $regex_url = qr"^(?:http://|ftp://|#)"; # allow empty URLs my $regex_url_directory = qr"(?:http://|ftp://)\S+/"; -my $regex_varassign = qr"^([A-Z_a-z0-9.]+)\s*(=|\?=|\+=)\s*(.*)"; +my $regex_varassign = qr"^([A-Z_a-z0-9.]+)\s*(=|\?=|\+=|:=)\s*(.*)"; # Global variables my $pkgdir; @@ -1297,6 +1297,14 @@ sub checklines_Makefile($) { if ($cont == $opt_contblank + 1) { $line->log_warning("${cont} contiguous blank lines, should be at most ${opt_contblank}."); } + + if ($text =~ $regex_varassign) { + my ($varname, $op, $value) = ($1, $2, $3); + + if ($op eq ":=") { + $line->log_warning("Please use \"=\" instead of \":=\" if possible."); + } + } } checklines_trailing_empty_lines($lines); |