mkfiles.pl 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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/txt_db",
  49. "crypto/pkcs7",
  50. "crypto/pkcs12",
  51. "crypto/comp",
  52. "crypto/engine",
  53. "crypto/ocsp",
  54. "crypto/ui",
  55. "crypto/krb5",
  56. "crypto/store",
  57. "crypto/pqueue",
  58. "fips",
  59. "fips/aes",
  60. "fips/des",
  61. "fips/dsa",
  62. "fips/dh",
  63. "fips/hmac",
  64. "fips/rand",
  65. "fips/rsa",
  66. "fips/sha",
  67. "ssl",
  68. "apps",
  69. "engines",
  70. "test",
  71. "tools"
  72. );
  73. foreach (@dirs) {
  74. &files_dir ($_, "Makefile");
  75. }
  76. exit(0);
  77. sub files_dir
  78. {
  79. my ($dir, $makefile) = @_;
  80. my %sym;
  81. open (IN, "$dir/$makefile") || die "Can't open $dir/$makefile";
  82. my $s="";
  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. $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g;
  110. $sym{$s}=$o;
  111. }
  112. }
  113. print "RELATIVE_DIRECTORY=$dir\n";
  114. foreach (sort keys %sym)
  115. {
  116. print "$_=$sym{$_}\n";
  117. }
  118. print "RELATIVE_DIRECTORY=\n";
  119. close (IN);
  120. }