summaryrefslogtreecommitdiff
path: root/pkgtools/pkglint
diff options
context:
space:
mode:
authorhubertf <hubertf>2001-02-25 05:20:02 +0000
committerhubertf <hubertf>2001-02-25 05:20:02 +0000
commitae5a40f275b7d7136d54826814373d5063e04f12 (patch)
treec6a554c207a33e624a01405fbb2f0e8e6846fb00 /pkgtools/pkglint
parenta753e3df91cdc99aabc59d87ac260acdd2edb79d (diff)
downloadpkgsrc-ae5a40f275b7d7136d54826814373d5063e04f12.tar.gz
Bump to 1.39:
Catch a few cases where MKDIR/INSTALL -d can be replaced by INSTALL_*_DIR
Diffstat (limited to 'pkgtools/pkglint')
-rw-r--r--pkgtools/pkglint/Makefile4
-rw-r--r--pkgtools/pkglint/files/pkglint.pl25
2 files changed, 24 insertions, 5 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile
index 2852d2ef1c0..16a3acc4f46 100644
--- a/pkgtools/pkglint/Makefile
+++ b/pkgtools/pkglint/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.80 2001/02/22 14:47:32 wiz Exp $
+# $NetBSD: Makefile,v 1.81 2001/02/25 05:20:02 hubertf Exp $
#
-DISTNAME= pkglint-2.38
+DISTNAME= pkglint-2.39
CATEGORIES= pkgtools devel
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl
index 2cedcc82310..1fe3c0911e5 100644
--- a/pkgtools/pkglint/files/pkglint.pl
+++ b/pkgtools/pkglint/files/pkglint.pl
@@ -12,11 +12,12 @@
# 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.40 2001/02/22 14:47:33 wiz Exp $
+# $NetBSD: pkglint.pl,v 1.41 2001/02/25 05:20:02 hubertf Exp $
#
# This version contains some changes necessary for NetBSD packages
-# done by Hubert Feyrer <hubertf@netbsd.org> and
-# Thorsten Frueauf <frueauf@netbsd.org>
+# done by Hubert Feyrer <hubertf@netbsd.org>,
+# Thorsten Frueauf <frueauf@netbsd.org>, Thomas Klausner <wiz@netbsd.org>
+# and others.
#
use Getopt::Std;
@@ -774,6 +775,24 @@ sub checkmakefile {
&perror("WARN: use of NO_PACKAGE to enforce license restrictions ".
"is deprecated.");
}
+ print "OK: checking for MKDIR.\n" if ($verbose);
+ if ($whole =~ m|\${MKDIR}.*(\${PREFIX}[/0-9a-zA-Z\${}]*)|) {
+ &perror("WARN: \${MKDIR} $1: consider using INSTALL_*_DIR");
+ }
+ print "OK: checking for unneeded INSTALL -d.\n" if ($verbose);
+ if ($whole =~ m|\${INSTALL}(.*)\n|) {
+ $args = $1;
+ if ($args =~ /-d/) {
+ if ($args !~ /-[ogm]/) {
+ &perror("WARN: \${INSTALL}$args: " .
+ "consider using INSTALL_*_DIR");
+ }
+ }
+ }
+ print "OK: checking for unneeded failure check on directory creation.\n" if ($verbose);
+ if ($whole =~ /\n\t-(.*(MKDIR|INSTALL.*-d|INSTALL_.*_DIR).*)/g) {
+ &perror("WARN: $1: no need to use '-' before command");
+ }
#
# whole file: direct use of command names