Commit | Line | Data |
---|---|---|
f9496167 QL |
1 | #!/bin/sh\r |
2 | #\r | |
3 | # This script runs the OpenSSL Configure script, then processes the\r | |
4 | # resulting file list into our local OpensslLib.inf and also takes\r | |
5 | # a copy of opensslconf.h.\r | |
6 | #\r | |
7 | # This only needs to be done once by a developer when updating to a\r | |
8 | # new version of OpenSSL (or changing options, etc.). Normal users\r | |
9 | # do not need to do this, since the results are stored in the EDK2\r | |
10 | # git repository for them.\r | |
11 | \r | |
12 | OPENSSL_PATH=$(sed -n '/DEFINE OPENSSL_PATH/{s/.* \(openssl-[0-9.]*[a-z]*\)[[:space:]]*/\1/ p}' OpensslLib.inf)\r | |
13 | \r | |
14 | if ! cd "${OPENSSL_PATH}" ; then\r | |
15 | echo "Cannot change to OpenSSL directory \"${OPENSSL_PATH}\""\r | |
16 | exit 1\r | |
17 | fi\r | |
18 | \r | |
19 | ./Configure UEFI \\r | |
20 | no-asm \\r | |
21 | no-bf \\r | |
22 | no-camellia \\r | |
23 | no-capieng \\r | |
24 | no-cast \\r | |
25 | no-cms \\r | |
26 | no-deprecated \\r | |
27 | no-dgram \\r | |
28 | no-dsa \\r | |
29 | no-dynamic-engine \\r | |
30 | no-ec \\r | |
31 | no-ecdh \\r | |
32 | no-ecdsa \\r | |
33 | no-engine \\r | |
34 | no-engines \\r | |
35 | no-err \\r | |
36 | no-filenames \\r | |
37 | no-fp-api \\r | |
38 | no-hw \\r | |
39 | no-idea \\r | |
40 | no-jpake \\r | |
41 | no-krb5 \\r | |
42 | no-locking \\r | |
43 | no-mdc2 \\r | |
44 | no-posix-io \\r | |
45 | no-pqueue \\r | |
46 | no-rc2 \\r | |
47 | no-rcs \\r | |
48 | no-rfc3779 \\r | |
49 | no-ripemd \\r | |
50 | no-scrypt \\r | |
51 | no-sct \\r | |
52 | no-seed \\r | |
53 | no-sha0 \\r | |
54 | no-sock \\r | |
55 | no-srp \\r | |
56 | no-ssl \\r | |
57 | no-stdio \\r | |
58 | no-threads \\r | |
59 | no-ts \\r | |
60 | no-ui \\r | |
61 | no-whirlpool \\r | |
62 | || exit 1\r | |
63 | \r | |
64 | make files\r | |
65 | cd -\r | |
66 | \r | |
67 | function filelist ()\r | |
68 | {\r | |
69 | echo '1,/# Autogenerated files list starts here/p'\r | |
70 | echo '/# Autogenerated files list ends here/,$p'\r | |
71 | echo '/# Autogenerated files list starts here/a\'\r | |
72 | \r | |
73 | while read LINE; do\r | |
74 | case "$LINE" in\r | |
75 | RELATIVE_DIRECTORY=*)\r | |
76 | eval "$LINE"\r | |
77 | ;;\r | |
78 | LIBSRC=*)\r | |
79 | LIBSRC=$(echo "$LINE" | sed s/^LIBSRC=//)\r | |
80 | if [ "$RELATIVE_DIRECTORY" != "ssl" ]; then\r | |
81 | for FILE in $LIBSRC; do\r | |
82 | if [ "$FILE" != "b_print.c" ]; then\r | |
83 | echo -e ' $(OPENSSL_PATH)/'$RELATIVE_DIRECTORY/$FILE\\r\\\r | |
84 | fi\r | |
85 | done\r | |
86 | fi\r | |
87 | ;;\r | |
88 | esac\r | |
89 | done\r | |
90 | echo -e \\r\r | |
91 | }\r | |
92 | \r | |
93 | filelist < "${OPENSSL_PATH}/MINFO" | sed -n -f - -i OpensslLib.inf\r | |
94 | \r | |
95 | # We can tell Windows users to put this back manually if they can't run\r | |
96 | # Configure.\r | |
97 | cp "${OPENSSL_PATH}/crypto/opensslconf.h" .\r |