aboutsummaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authoreik <eik@FreeBSD.org>2004-05-16 18:46:47 +0800
committereik <eik@FreeBSD.org>2004-05-16 18:46:47 +0800
commite564bd42c4b37e044823f9efab1ac68b0f43f0d5 (patch)
tree7767288785c0c32bbadb78fb0212d1cc96a74f05 /Tools
parent920a99a1d3ed88fc42ad7efb3d1c5595b68dccf3 (diff)
downloadfreebsd-ports-graphics-e564bd42c4b37e044823f9efab1ac68b0f43f0d5.tar.gz
freebsd-ports-graphics-e564bd42c4b37e044823f9efab1ac68b0f43f0d5.tar.zst
freebsd-ports-graphics-e564bd42c4b37e044823f9efab1ac68b0f43f0d5.zip
FWIIW, spawn fewer processes.
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/chkversion.pl15
1 files changed, 12 insertions, 3 deletions
diff --git a/Tools/scripts/chkversion.pl b/Tools/scripts/chkversion.pl
index 413e518e12d..f1cbca3fc0b 100755
--- a/Tools/scripts/chkversion.pl
+++ b/Tools/scripts/chkversion.pl
@@ -79,10 +79,17 @@ my $useindex = !-w "$versiondir";
my $versionfile =
$useindex
- ? "$portsdir/".`cd $portsdir; make -VINDEXFILE`
+ ? "$portsdir/".`cd $portsdir; /usr/bin/make -VINDEXFILE`
: "$versiondir/VERSIONS";
chomp $versionfile;
+my %cachedenv = ('WITH_OPENSSL_BASE' => 'yes');
+foreach (qw(ARCH OPSYS OSREL OSVERSION PKGINSTALLVER PORTOBJFORMAT UID)) {
+ $cachedenv{$_} = `cd $portsdir; /usr/bin/make -V$_`;
+ chomp $cachedenv{$_};
+}
+my $makeenv = join ' ', '/usr/bin/env', map { "$_='$cachedenv{$_}'" } keys %cachedenv;
+
my %pkgname;
sub wanted {
@@ -96,7 +103,8 @@ sub wanted {
|| $File::Find::name =~ m"^$portsdir/([^/]+/[^/]+)$"os
&& ($File::Find::prune = 1)
&& (
- $pkgname{$1} = `cd "$File::Find::name"; make -VPKGNAME 2>/dev/null`,
+ $pkgname{$1} =
+ `cd "$File::Find::name"; $makeenv /usr/bin/make -VPKGNAME 2>/dev/null`,
chomp $pkgname{$1}
);
}
@@ -152,7 +160,8 @@ if (%backwards) {
foreach (sort keys %backwards) {
print " - $_: $backwards{$_}\n";
if ($cvsblame && -d "$portsdir/$_/CVS") {
- my @cvslog = `cd "$portsdir/$_"; cvs -R log -N -r. Makefile`;
+ my @cvslog =
+ `cd "$portsdir/$_"; /usr/bin/cvs -R log -N -r. Makefile`;
print map "\t" . $_, grep /^-/ .. /^=/, @cvslog;
print "\n";
}