mkfiles.pl 1.7 KB

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