2 # FIPS distribution filter.
3 # Takes tarball listing and removes unnecessary files and directories.
8 foreach (split / /, "FIPS_EX_OBJ AES_ENC BN_ASM DES_ENC SHA1_ASM_OBJ MODES_ASM_OBJ")
14 my @objlist = split / /, $objs;
16 foreach (@objlist) { $tarobjs{"$1.c"} = 1 if /([^\/]+).o$/};
18 $tarobjs{"ncbc_enc.c"} = 1;
20 foreach (split / /, $ENV{LINKDIRS} ) { $cdirs{$_} = 1 };
27 "Makefile.shared" => 1,
38 # Keep top level files in list
41 next unless exists $keep{$_};
45 next unless (/^(fips\/|crypto|util|test|include|ms)/);
47 if (/^crypto\/([^\/]+)/)
49 # Skip unused directories under crypto/
50 next if -d "crypto/$1" && !exists $cdirs{$1};
51 # Keep assembly language dir, Makefile or certain extensions
52 if (!/\/asm\// && !/\/Makefile$/ && !/\.(in|pl|h)$/)
54 # If C source file must be on list.
55 next if !/(\w+\.c)$/ || !exists $tarobjs{$1};
60 next unless /Makefile/ || /dummytest.c/;