mkfiles.pl revision 162911
1272343Sngie#!/usr/local/bin/perl 2272343Sngie# 3272343Sngie# This is a hacked version of files.pl for systems that can't do a 'make files'. 4272343Sngie# Do a perl util/mkminfo.pl >MINFO to build MINFO 5272343Sngie# Written by Steve Henson 1999. 6272343Sngie 7272343Sngie# List of directories to process 8272343Sngie 9272343Sngiemy @dirs = ( 10272343Sngie".", 11272343Sngie"crypto", 12272343Sngie"crypto/md2", 13272343Sngie"crypto/md4", 14272343Sngie"crypto/md5", 15272343Sngie"crypto/sha", 16272343Sngie"crypto/mdc2", 17272343Sngie"crypto/hmac", 18272343Sngie"crypto/ripemd", 19272343Sngie"crypto/des", 20272343Sngie"crypto/rc2", 21272343Sngie"crypto/rc4", 22272343Sngie"crypto/rc5", 23272343Sngie"crypto/idea", 24272343Sngie"crypto/bf", 25272343Sngie"crypto/cast", 26272343Sngie"crypto/aes", 27272343Sngie"crypto/camellia", 28272343Sngie"crypto/bn", 29272343Sngie"crypto/rsa", 30272343Sngie"crypto/dsa", 31272343Sngie"crypto/dso", 32272343Sngie"crypto/dh", 33272343Sngie"crypto/ec", 34272343Sngie"crypto/ecdh", 35272343Sngie"crypto/ecdsa", 36272343Sngie"crypto/buffer", 37272343Sngie"crypto/bio", 38272343Sngie"crypto/stack", 39272343Sngie"crypto/lhash", 40272343Sngie"crypto/rand", 41272343Sngie"crypto/err", 42"crypto/objects", 43"crypto/evp", 44"crypto/asn1", 45"crypto/pem", 46"crypto/x509", 47"crypto/x509v3", 48"crypto/conf", 49"crypto/txt_db", 50"crypto/pkcs7", 51"crypto/pkcs12", 52"crypto/comp", 53"crypto/engine", 54"crypto/ocsp", 55"crypto/ui", 56"crypto/krb5", 57"crypto/store", 58"crypto/pqueue", 59"ssl", 60"apps", 61"engines", 62"test", 63"tools" 64); 65 66foreach (@dirs) { 67 &files_dir ($_, "Makefile"); 68} 69 70exit(0); 71 72sub files_dir 73{ 74my ($dir, $makefile) = @_; 75 76my %sym; 77 78open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile"; 79 80my $s=""; 81 82while (<IN>) 83 { 84 chop; 85 s/#.*//; 86 if (/^(\S+)\s*=\s*(.*)$/) 87 { 88 $o=""; 89 ($s,$b)=($1,$2); 90 for (;;) 91 { 92 if ($b =~ /\\$/) 93 { 94 chop($b); 95 $o.=$b." "; 96 $b=<IN>; 97 chop($b); 98 } 99 else 100 { 101 $o.=$b." "; 102 last; 103 } 104 } 105 $o =~ s/^\s+//; 106 $o =~ s/\s+$//; 107 $o =~ s/\s+/ /g; 108 109 $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g; 110 $sym{$s}=$o; 111 } 112 } 113 114print "RELATIVE_DIRECTORY=$dir\n"; 115 116foreach (sort keys %sym) 117 { 118 print "$_=$sym{$_}\n"; 119 } 120print "RELATIVE_DIRECTORY=\n"; 121 122close (IN); 123} 124