#
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
#
# This script works out which files from a stock Perl 5.8.3 distribution need
# to be integrated into ON. It MUST be run inside a stock perl distribution
# directory AFTER the InstallPerl script has been run, as it uses the contents
# of the MANIFEST, build.touched, test.log and install.packlist files to figure
# out which files are needed in ON. The parameter for this script is the name
# of the output CSV file, which can be viewed in StarOffice.
#
use strict;
use warnings;
#
# Compare two files, return 0 for different, 1 for the same.
#
sub file_cmp
{
# Quick check - they must exist and be the same size.
# Open the files.
# Compare.
while (1) {
$len1 = -1;
$len2 = -2;
last;
}
}
}
#
# Main.
#
# %file is indexed by (path, filename)
# Check args.
# Check cwd is a valid perl build dir.
# Open output CSV file.
# Read the MANIFEST.
my ($p, $f);
} else {
$p = '';
$f = $line;
}
}
# Read build.touched.
my ($p, $f);
} else {
$p = '';
$f = $line;
}
}
# Read test.log.
my %test;
my $file = $1;
$test{$_} = 1;
$test{$_} = 1;
}
}
}
# Read install.packlist and build a hash indexed by (filename, path).
my %inst;
my $inst_pfx;
my ($p, $f);
} else {
$p = '';
$f = $line;
}
$inst{$f}{$p} = 1;
}
# Go through the MANIFEST files, trying to match to installed files.
my $v = $file{$p}{$f};
#
# Easy cases: Files that map directly into the install tree
#
#
# Brute force: Compare the manifest file against each file with
# the same name in the install tree.
#
} else {
$mfst .= $f;
}
}
}
}
}
# Intuit where we think the 5.8.x files should go in S10.
my $v = $file{$p}{$f};
#
# Some directories and files we can ignore completely,
# for example other architectures.
#
#
# Stuff that we don't want from the top-level directory.
#
$f =~ m{^(?:[Cc]onfigure.*|Makefile\.SH|Policy_sh.SH|
#
# We don't want README and other such files.
#
#
# Pod files need a little finesse.
# We don't want any that are links to README files in the
# top-level directory, unless they are the Solaris or Unicode
# ones. We also exclude some others that aren't relevant,
# and include some that would otherwise be missed.
#
$_ =~ s{^perl}{};
} else {
}
# perldelta.pod is a symlink, but we need to copy it.
} else {
}
#
# We only want test scripts that are actually run.
#
} else {
}
#
# Anything in the MANIFEST and touched during the
# build and install should be included.
#
} else {
}
}
}
#
# Files that we need to treat specially.
#
# Write CSV contents.
}
}
}