X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=CryptoPkg%2FLibrary%2FOpensslLib%2Fprocess_files.sh;h=9f10409824d12b9f99071458924b5ad6a8e87aac;hb=823005621ef4757130f009c48dc96b099cccadf7;hp=6f069ce264ac07a1095e75987aaae8808546d534;hpb=4e719ab5d1de26fbd3285c346053ec905ec1a053;p=mirror_edk2.git diff --git a/CryptoPkg/Library/OpensslLib/process_files.sh b/CryptoPkg/Library/OpensslLib/process_files.sh index 6f069ce264..9f10409824 100755 --- a/CryptoPkg/Library/OpensslLib/process_files.sh +++ b/CryptoPkg/Library/OpensslLib/process_files.sh @@ -1,8 +1,8 @@ #!/bin/sh # -# This script runs the OpenSSL Configure script, then processes the -# resulting file list into our local OpensslLib.inf and also takes -# a copy of opensslconf.h. +# This script runs the OpenSSL Configure script, then processes the resulting +# file list into our local OpensslLib.inf and OpensslLibCrypto.inf, and also +# takes a copy of opensslconf.h. # # This only needs to be done once by a developer when updating to a # new version of OpenSSL (or changing options, etc.). Normal users @@ -10,6 +10,12 @@ # git repository for them. OPENSSL_PATH=$(sed -n '/DEFINE OPENSSL_PATH/{s/.* \(openssl-[0-9.]*[a-z]*\)[[:space:]]*/\1/ p}' OpensslLib.inf) +OPENSSL_CRYPTO_PATH=$(sed -n '/DEFINE OPENSSL_PATH/{s/.* \(openssl-[0-9.]*[a-z]*\)[[:space:]]*/\1/ p}' OpensslLibCrypto.inf) + +if [ "$OPENSSL_PATH" != "$OPENSSL_CRYPTO_PATH" ]; then + echo "OPENSSL_PATH diverges between OpensslLib.inf and OpensslLibCrypto.inf" + exit 1 +fi if ! cd "${OPENSSL_PATH}" ; then echo "Cannot change to OpenSSL directory \"${OPENSSL_PATH}\"" @@ -65,6 +71,8 @@ cd - function filelist () { + SSL_SELECT="$1" + echo '1,/# Autogenerated files list starts here/p' echo '/# Autogenerated files list ends here/,$p' echo '/# Autogenerated files list starts here/a\' @@ -76,18 +84,25 @@ function filelist () ;; LIBSRC=*) LIBSRC=$(echo "$LINE" | sed s/^LIBSRC=//) - for FILE in $LIBSRC; do + if [ "$RELATIVE_DIRECTORY" != "ssl" ] || + [ "$SSL_SELECT" = "crypto-and-ssl" ]; then + for FILE in $LIBSRC; do if [ "$FILE" != "b_print.c" ]; then echo -e ' $(OPENSSL_PATH)/'$RELATIVE_DIRECTORY/$FILE\\r\\ fi - done + done + fi ;; esac done echo -e \\r } -filelist < "${OPENSSL_PATH}/MINFO" | sed -n -f - -i OpensslLib.inf +filelist crypto-and-ssl < "${OPENSSL_PATH}/MINFO" \ +| sed -n -f - -i OpensslLib.inf + +filelist crypto-only < "${OPENSSL_PATH}/MINFO" \ +| sed -n -f - -i OpensslLibCrypto.inf # We can tell Windows users to put this back manually if they can't run # Configure. For now, until the git repository is fixed to store things