3 # This script runs the OpenSSL Configure script, then processes the
4 # resulting file list into our local OpensslLib.inf and also takes
5 # a copy of opensslconf.h.
7 # This only needs to be done once by a developer when updating to a
8 # new version of OpenSSL (or changing options, etc.). Normal users
9 # do not need to do this, since the results are stored in the EDK2
10 # git repository for them.
12 OPENSSL_PATH
=$
(sed -n '/DEFINE OPENSSL_PATH/{s/.* \(openssl-[0-9.]*[a-z]*\)[[:space:]]*/\1/ p}' OpensslLib.inf
)
14 if ! cd "${OPENSSL_PATH}" ; then
15 echo "Cannot change to OpenSSL directory \"${OPENSSL_PATH}\""
68 echo '1,/# Autogenerated files list starts here/p'
69 echo '/# Autogenerated files list ends here/,$p'
70 echo '/# Autogenerated files list starts here/a\'
78 LIBSRC=$(echo "$LINE" | sed s/^LIBSRC=//)
79 for FILE in $LIBSRC; do
80 if [ "$FILE" != "b_print.c" ]; then
81 echo -e ' $
(OPENSSL_PATH
)/'$RELATIVE_DIRECTORY/$FILE\\r\\
90 filelist < "${OPENSSL_PATH}/MINFO" | sed -n -f - -i OpensslLib.inf
92 # We can tell Windows users to put this back manually if they can't run
93 # Configure. For now, until the git repository is fixed to store things
94 # sanely, also convert to DOS line-endings
95 unix2dos
-n "${OPENSSL_PATH}/crypto/opensslconf.h" opensslconf.h