X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=util%2Fmkfiles.pl;h=0e4f71e04dcadc5a71f8325dc18ce301d0a758ff;hp=55a313cdb0ec3de02ddfdf9b4fbbd63e240cd58a;hb=0ef1ce49eeed417c143a8c1bf77ce0d843306e3d;hpb=eef0c1f34c7b7d6a38e02f3294eb509aef081749 diff --git a/util/mkfiles.pl b/util/mkfiles.pl index 55a313cdb0..0e4f71e04d 100755 --- a/util/mkfiles.pl +++ b/util/mkfiles.pl @@ -26,14 +26,14 @@ my @dirs = ( "crypto/aes", "crypto/camellia", "crypto/seed", +"crypto/modes", +"crypto/cmac", "crypto/bn", "crypto/rsa", "crypto/dsa", "crypto/dso", "crypto/dh", "crypto/ec", -"crypto/ecdh", -"crypto/ecdsa", "crypto/buffer", "crypto/bio", "crypto/stack", @@ -46,6 +46,7 @@ my @dirs = ( "crypto/pem", "crypto/x509", "crypto/x509v3", +"crypto/cms", "crypto/conf", "crypto/txt_db", "crypto/pkcs7", @@ -54,20 +55,29 @@ my @dirs = ( "crypto/engine", "crypto/ocsp", "crypto/ui", -"crypto/krb5", -"crypto/store", -"crypto/pqueue", +#"crypto/store", "crypto/whrlpool", "crypto/ts", +"crypto/srp", +"crypto/ct", +"crypto/async", +"crypto/chacha", +"crypto/poly1305", +"crypto/blake2", +"crypto/kdf", "ssl", "apps", "engines", -"engines/ccgost", "test", "tools" ); +%top; + +my $fipscanisteronly = 0; + foreach (@dirs) { + next if ($fipscanisteronly && !(-d $_)); &files_dir ($_, "Makefile"); } @@ -85,9 +95,9 @@ my $s=""; while () { - chop; + s|\R$||; s/#.*//; - if (/^(\S+)\s*=\s*(.*)$/) + if (/^([^\s=]+)\s*=\s*(.*)$/) { $o=""; ($s,$b)=($1,$2); @@ -95,10 +105,10 @@ while () { if ($b =~ /\\$/) { - chop($b); + $b=$`; $o.=$b." "; - $b=; - chop($b); + $b = "" unless defined($b = ); + $b =~ s{\R$}{}; } else { @@ -110,8 +120,8 @@ while () $o =~ s/\s+$//; $o =~ s/\s+/ /g; - $o =~ s/\$[({]([^)}]+)[)}]/$sym{$1}/g; - $sym{$s}=$o; + $o =~ s/\$[({]([^)}]+)[)}]/$top{$1} or $sym{$1}/ge; + $sym{$s}=($top{$s} or $o); } } @@ -121,7 +131,20 @@ foreach (sort keys %sym) { print "$_=$sym{$_}\n"; } +if ($dir eq "." && defined($sym{"BUILDENV"})) + { + foreach (split(' ',$sym{"BUILDENV"})) + { + /^(.+)=/; + $top{$1}=$sym{$1}; + } + } + print "RELATIVE_DIRECTORY=\n"; close (IN); +if ($dir eq "." && $sym{FIPSCANISTERONLY} eq "y") + { + $fipscanisteronly = 1; + } }