summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint/files
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 /pkgtools/pkglint/files
parent6f76911baf9b028a3b2b8b57400deb2cfa7e7e4f (diff)
downloadpkgsrc-8de2459cd580392bd4c93a2d6d0b3bc365aa464b.tar.gz
.if parsing is now a touch less braindamaged (still lousy)
Diffstat (limited to 'pkgtools/pkglint/files')
-rwxr-xr-xpkgtools/pkglint/files/lintpkgsrc.pl7
1 files changed, 5 insertions, 2 deletions
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; }
}
}