2008-05-08 14:38:07 +00:00
|
|
|
#!/usr/bin/perl
|
2008-09-23 14:02:31 +00:00
|
|
|
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
2008-05-08 14:38:07 +00:00
|
|
|
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
|
|
|
#
|
|
|
|
# Copyright 2003 by Wilson Snyder. This program is free software; you can
|
|
|
|
# redistribute it and/or modify it under the terms of either the GNU
|
|
|
|
# General Public License or the Perl Artistic License.
|
|
|
|
|
|
|
|
my $root = "..";
|
|
|
|
my $Debug;
|
|
|
|
|
2008-05-08 15:18:42 +00:00
|
|
|
### Must trim output before and after our file list
|
2008-05-08 14:38:07 +00:00
|
|
|
`cd $root && make dist-file-list`;
|
|
|
|
my $manifest_files = `cd $root && make dist-file-list`;
|
2008-05-08 15:18:42 +00:00
|
|
|
$manifest_files =~ s!.*begin-dist-file-list:!!sg;
|
|
|
|
$manifest_files =~ s!end-dist-file-list:.*$!!sg;
|
|
|
|
print "MF $manifest_files\n";
|
2008-05-08 14:38:07 +00:00
|
|
|
my %files;
|
|
|
|
foreach my $file (split /\s+/,$manifest_files) {
|
|
|
|
next if $file eq '';
|
|
|
|
$files{$file} |= 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
my $all_files = `cd $root && find . -type f -print`;
|
|
|
|
foreach my $file (split /\s+/,$all_files) {
|
|
|
|
next if $file eq '';
|
|
|
|
$file =~ s!^\./!!;
|
|
|
|
$files{$file} |= 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
my $skip = file_contents("$root/MANIFEST.SKIP");
|
|
|
|
foreach my $file (sort keys %files) {
|
|
|
|
foreach my $skip (split /\s+/,$skip) {
|
|
|
|
if ($file =~ /$skip/) {
|
|
|
|
$files{$file} |= 4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
foreach my $file (sort keys %files) {
|
|
|
|
my $tar = $files{$file}&1;
|
|
|
|
my $dir = $files{$file}&2;
|
|
|
|
my $skip = $files{$file}&4;
|
|
|
|
|
|
|
|
print +(($tar ? "TAR ":" ")
|
|
|
|
.($dir ? "DIR ":" ")
|
|
|
|
.($skip ? "SKIP ":" ")
|
|
|
|
." $file\n") if $Debug;
|
|
|
|
|
|
|
|
if ($dir && !$tar && !$skip) {
|
2008-11-25 02:38:45 +00:00
|
|
|
$Self->error("File not in manifest or MANIFEST.SKIP: $file");
|
2008-05-08 14:38:07 +00:00
|
|
|
} elsif (!$dir && $tar && !$skip) {
|
2008-11-25 02:38:45 +00:00
|
|
|
$Self->error("File in manifest, but not directory: $file");
|
2008-05-08 14:38:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ok(1);
|
|
|
|
1;
|