Makefile.ssl -> Makefile
[openssl.git] / util / mkdef.pl
index ddc33c152b35e6e510f428f5ace96e2627945b73..8ff98470d8cd522d8376ce4e636f4e00cd226e9b 100755 (executable)
@@ -83,7 +83,7 @@ my @known_platforms = ( "__FreeBSD__", "PERL5", "NeXT",
 my @known_ossl_platforms = ( "VMS", "WIN16", "WIN32", "WINNT", "OS2" );
 my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
                         "CAST", "MD2", "MD4", "MD5", "SHA", "SHA0", "SHA1",
-                        "RIPEMD",
+                        "SHA256", "SHA512", "RIPEMD",
                         "MDC2", "RSA", "DSA", "DH", "EC", "ECDH", "ECDSA", "HMAC", "AES",
                         # Envelope "algorithms"
                         "EVP", "X509", "ASN1_TYPEDEFS",
@@ -98,7 +98,7 @@ my @known_algorithms = ( "RC2", "RC4", "RC5", "IDEA", "DES", "BF",
                         "DEPRECATED" );
 
 my $options="";
-open(IN,"<Makefile.ssl") || die "unable to open Makefile.ssl!\n";
+open(IN,"<Makefile") || die "unable to open Makefile!\n";
 while(<IN>) {
     $options=$1 if (/^OPTIONS=(.*)$/);
 }
@@ -221,6 +221,7 @@ my $ssl="ssl/ssl.h";
 $ssl.=" ssl/kssl.h";
 
 my $crypto ="crypto/crypto.h";
+$crypto.=" crypto/o_dir.h";
 $crypto.=" crypto/des/des.h crypto/des/des_old.h" ; # unless $no_des;
 $crypto.=" crypto/idea/idea.h" ; # unless $no_idea;
 $crypto.=" crypto/rc4/rc4.h" ; # unless $no_rc4;
@@ -478,7 +479,7 @@ sub do_defs
                                        push(@tag,$1);
                                        $tag{$1}=-1;
                                }
-                       } elsif (/^\#\s*ifdef\s+(.*)/) {
+                       } elsif (/^\#\s*ifdef\s+(\S*)/) {
                                push(@tag,"-");
                                push(@tag,$1);
                                $tag{$1}=1;
@@ -511,7 +512,7 @@ sub do_defs
                                }
                        } elsif (/^\#\s*endif/) {
                                my $tag_i = $#tag;
-                               while($tag[$tag_i] ne "-") {
+                               while($tag_i > 0 && $tag[$tag_i] ne "-") {
                                        my $t=$tag[$tag_i];
                                        print STDERR "DEBUG: \$t=\"$t\"\n" if $debug;
                                        if ($tag{$t}==2) {
@@ -1138,7 +1139,7 @@ sub print_test_file
 sub get_version {
    local *MF;
    my $v = '?';
-   open MF, 'Makefile.ssl' or return $v;
+   open MF, 'Makefile' or return $v;
    while (<MF>) {
      $v = $1, last if /^VERSION=(.*?)\s*$/;
    }