diff options
author | abs <abs> | 2000-01-03 15:21:45 +0000 |
---|---|---|
committer | abs <abs> | 2000-01-03 15:21:45 +0000 |
commit | e219f1f8125b8c7374b6675d5c74feeeb1e41a26 (patch) | |
tree | 1457816faef9d0e9c3948d946aa86824a8c23447 /pkgtools | |
parent | bb221c05f5b334674f52466b07c04eaf5b6f1003 (diff) | |
download | pkgsrc-e219f1f8125b8c7374b6675d5c74feeeb1e41a26.tar.gz |
.if parsing is now a touch less braindamaged (still lousy)
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkglint/Makefile | 4 | ||||
-rwxr-xr-x | pkgtools/pkglint/files/lintpkgsrc.pl | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index 88a977a29e9..5265ea6ea01 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.32 1999/12/29 01:51:16 wiz Exp $ +# $NetBSD: Makefile,v 1.33 2000/01/03 15:21:45 abs Exp $ # -DISTNAME= pkglint-1.91 +DISTNAME= pkglint-1.92 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkglint/files/lintpkgsrc.pl b/pkgtools/pkglint/files/lintpkgsrc.pl index 748ccf8060e..1fb6dda968a 100755 --- a/pkgtools/pkglint/files/lintpkgsrc.pl +++ b/pkgtools/pkglint/files/lintpkgsrc.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl -# $NetBSD: lintpkgsrc.pl,v 1.14 1999/12/22 22:07:31 abs Exp $ +# $NetBSD: lintpkgsrc.pl,v 1.15 2000/01/03 15:21:45 abs Exp $ # Written by David Brownlee <abs@netbsd.org>. # @@ -354,7 +354,10 @@ sub parse_makefile $test = parse_expand_vars($1, \%vars); # XX This is _so_ wrong - need to parse this correctly $test =~ s/"//g; - if ( $test =~ /^(\S+)\s+==\s+(\S+)$/ && $1 ne $2 ) + + if ( $test =~ /^defined\((\S+)\)$/ && !defined($vars{$1}) ) + { ++$if_false; } + elsif ( $test =~ /^(\S+)\s+==\s+(\S+)$/ && $1 ne $2 ) { ++$if_false; } } } |