
1: #!/usr/local/bin/perl 2: # 3: # This is a hacked version of files.pl for systems that can't do a 'make files'. 4: # Do a perl util/mkminfo.pl >MINFO to build MINFO 5: # Written by Steve Henson 1999. 6: 7: # List of directories to process 8: 9: my @dirs = ( 10: ".", 11: "crypto", 12: "crypto/md2", 13: "crypto/md4", 14: "crypto/md5", 15: "crypto/sha", 16: "crypto/mdc2", 17: "crypto/hmac", 18: "crypto/ripemd", 19: "crypto/des", 20: "crypto/rc2", 21: "crypto/rc4", 22: "crypto/rc5", 23: "crypto/idea", 24: "crypto/bf", 25: "crypto/cast", 26: "crypto/aes", 27: "crypto/camellia", 28: "crypto/seed", 29: "crypto/bn", 30: "crypto/rsa", 31: "crypto/dsa", 32: "crypto/dso", 33: "crypto/dh", 34: "crypto/ec", 35: "crypto/ecdh", 36: "crypto/ecdsa", 37: "crypto/buffer", 38: "crypto/bio", 39: "crypto/stack", 40: "crypto/lhash", 41: "crypto/rand", 42: "crypto/err", 43: "crypto/objects", 44: "crypto/evp", 45: "crypto/asn1", 46: "crypto/pem", 47: "crypto/x509", 48: "crypto/x509v3", 49: "crypto/conf", 50: "crypto/txt_db", 51: "crypto/pkcs7", 52: "crypto/pkcs12", 53: "crypto/comp", 54: "crypto/engine", 55: "crypto/ocsp", 56: "crypto/ui", 57: "crypto/krb5", 58: "crypto/store", 59: "crypto/pqueue", 60: "ssl", 61: "apps", 62: "engines", 63: "test", 64: "tools" 65: ); 66: 67: foreach (@dirs) { 68: &files_dir ($_, "Makefile"); 69: } 70: 71: exit(0); 72: 73: sub files_dir 74: { 75: my ($dir, $makefile) = @_; 76: 77: my %sym; 78: 79: open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile"; 80: 81: my $s=""; 82: 83: while (<IN>) 84: { 85: chop; 86: s/#.*//; 87: if (/^(\S+)\s*=\s*(.*)$/) 88: { 89: $o=""; 90: ($s,$b)=($1,$2); 91: for (;;) 92: { 93: if ($b =~ /\\$/) 94: { 95: chop($b); 96: $o.=$b." "; 97: $b=<IN>; 98: chop($b); 99: } 100: else 101: { 102: $o.=$b." "; 103: last; 104: } 105: } 106: $o =~ s/^\s+//; 107: $o =~ s/\s+$//; 108: $o =~ s/\s+/ /g; 109: 110: $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g; 111: $sym{$s}=$o; 112: } 113: } 114: 115: print "RELATIVE_DIRECTORY=$dir\n"; 116: 117: foreach (sort keys %sym) 118: { 119: print "$_=$sym{$_}\n"; 120: } 121: print "RELATIVE_DIRECTORY=\n"; 122: 123: close (IN); 124: }