summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2000-01-03 15:21:45 +0000
committerabs <abs@pkgsrc.org>2000-01-03 15:21:45 +0000
commit8de2459cd580392bd4c93a2d6d0b3bc365aa464b (patch)
tree1457816faef9d0e9c3948d946aa86824a8c23447
parent6f76911baf9b028a3b2b8b57400deb2cfa7e7e4f (diff)
downloadpkgsrc-8de2459cd580392bd4c93a2d6d0b3bc365aa464b.tar.gz
.if parsing is now a touch less braindamaged (still lousy)
-rw-r--r--pkgtools/pkglint/Makefile4
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl7
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; }
}
}