mkfiles.pl 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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/camellia",
  26. "crypto/seed",
  27. "crypto/bn",
  28. "crypto/rsa",
  29. "crypto/dsa",
  30. "crypto/dso",
  31. "crypto/dh",
  32. "crypto/ec",
  33. "crypto/ecdh",
  34. "crypto/ecdsa",
  35. "crypto/buffer",
  36. "crypto/bio",
  37. "crypto/stack",
  38. "crypto/lhash",
  39. "crypto/rand",
  40. "crypto/err",
  41. "crypto/objects",
  42. "crypto/evp",
  43. "crypto/asn1",
  44. "crypto/pem",
  45. "crypto/x509",
  46. "crypto/x509v3",
  47. "crypto/conf",
  48. "crypto/jpake",
  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. "crypto/cms",
  60. "fips",
  61. "fips/aes",
  62. "fips/des",
  63. "fips/dsa",
  64. "fips/dh",
  65. "fips/hmac",
  66. "fips/rand",
  67. "fips/rsa",
  68. "fips/sha",
  69. "ssl",
  70. "apps",
  71. "engines",
  72. "test",
  73. "tools"
  74. );
  75. foreach (@dirs) {
  76. &files_dir ($_, "Makefile");
  77. }
  78. exit(0);
  79. sub files_dir
  80. {
  81. my ($dir, $makefile) = @_;
  82. my %sym;
  83. open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile";
  84. my $s="";
  85. while (<IN>)
  86. {
  87. chop;
  88. s/#.*//;
  89. if (/^(\S+)\s*=\s*(.*)$/)
  90. {
  91. $o="";
  92. ($s,$b)=($1,$2);
  93. for (;;)
  94. {
  95. if ($b =~ /\\$/)
  96. {
  97. chop($b);
  98. $o.=$b." ";
  99. $b=<IN>;
  100. chop($b);
  101. }
  102. else
  103. {
  104. $o.=$b." ";
  105. last;
  106. }
  107. }
  108. $o =~ s/^\s+//;
  109. $o =~ s/\s+$//;
  110. $o =~ s/\s+/ /g;
  111. $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g;
  112. $sym{$s}=$o;
  113. }
  114. }
  115. print "RELATIVE_DIRECTORY=$dir\n";
  116. foreach (sort keys %sym)
  117. {
  118. print "$_=$sym{$_}\n";
  119. }
  120. print "RELATIVE_DIRECTORY=\n";
  121. close (IN);
  122. }