pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/pkgtools/pkglint Teach lintpkgsrc how to handle empty(...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f6ea279665e6
branches: trunk
changeset: 462744:f6ea279665e6
user: wiz <wiz%pkgsrc.org@localhost>
date: Sat Oct 11 08:03:40 2003 +0000
description:
Teach lintpkgsrc how to handle empty() conditionals.
Closes second part of PR 23126.
Welcome to 3.65!.
diffstat:
pkgtools/pkglint/Makefile | 4 ++--
pkgtools/pkglint/files/lintpkgsrc.pl | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (41 lines):
diff -r f600c9f8e72b -r f6ea279665e6 pkgtools/pkglint/Makefile
--- a/pkgtools/pkglint/Makefile Sat Oct 11 07:59:10 2003 +0000
+++ b/pkgtools/pkglint/Makefile Sat Oct 11 08:03:40 2003 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.171 2003/10/06 08:50:40 grant Exp $
+# $NetBSD: Makefile,v 1.172 2003/10/11 08:03:40 wiz Exp $
#
-DISTNAME= pkglint-3.64
+DISTNAME= pkglint-3.65
WRKSRC= ${WRKDIR}
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
diff -r f600c9f8e72b -r f6ea279665e6 pkgtools/pkglint/files/lintpkgsrc.pl
--- a/pkgtools/pkglint/files/lintpkgsrc.pl Sat Oct 11 07:59:10 2003 +0000
+++ b/pkgtools/pkglint/files/lintpkgsrc.pl Sat Oct 11 08:03:40 2003 +0000
@@ -1,6 +1,6 @@
#!@PREFIX@/bin/perl
-# $NetBSD: lintpkgsrc.pl,v 1.85 2003/10/06 08:50:40 grant Exp $
+# $NetBSD: lintpkgsrc.pl,v 1.86 2003/10/11 08:03:40 wiz Exp $
# Written by David Brownlee <abs%netbsd.org@localhost>.
#
@@ -1049,13 +1049,15 @@
$test =~ s/\r/""/g;
debug("conditional: $test\n");
- # XXX Could do something with target and empty
+ # XXX Could do something with target
while ( $test =~ /(target|empty|make|defined|exists)\s*\(([^()]+)\)/ )
{
if ($1 eq 'exists')
{ $_ = (-e $2) ?1 :0; }
elsif( $1 eq 'defined')
{ $_ = (defined($${vars}{$2}) ?1 :0); }
+ elsif( $1 eq 'empty')
+ { $_ = ((not defined($${vars}{$2}) or (length($${vars}{$2}) == 0)) ?1 :0); }
else
{ $_ = 0; }
$test =~ s/$1\s*\([^()]+\)/$_/;
Home |
Main Index |
Thread Index |
Old Index