63 lines
1.9 KiB
Bash
Executable File
63 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script will fully regenerate the kit/ folder from the latest public
|
|
# BoringSSL source code.
|
|
|
|
set -e
|
|
|
|
echo "While using the build files generated by this script does not require the"
|
|
echo "full suite of BoringSSL development dependencies, you WILL need them to"
|
|
echo "run this script."
|
|
echo
|
|
echo "Consult the documentation for the latest version of BoringSSL to ensure"
|
|
echo "you have the needed packages."
|
|
echo
|
|
echo " https://boringssl.googlesource.com/boringssl/+/HEAD/BUILDING.md"
|
|
echo
|
|
read -p "Press [Enter] to continue or [CTRL-C] to abort..."
|
|
echo
|
|
|
|
echo "1) Delete and recreate kit/"
|
|
|
|
rm -fr kit
|
|
mkdir kit
|
|
cd kit
|
|
|
|
echo "2) Clone the BoringSSL repository as src/"
|
|
|
|
git clone https://boringssl.googlesource.com/boringssl src
|
|
|
|
echo "3) Write the hash of the latest commit out to BORINGSSL_REVISION"
|
|
|
|
echo `cd src && git show -s --pretty=%H` > BORINGSSL_REVISION
|
|
|
|
echo "4) Remove the .git directory from BoringSSL"
|
|
|
|
rm -fr src/.git
|
|
|
|
echo "5) Remove the extra copy of gTest from BoringSSL to save space"
|
|
|
|
rm -fr src/third_party/googletest
|
|
|
|
echo "6) Remove the fuzzing corpus from BoringSSL to save space"
|
|
|
|
rm -fr src/fuzz
|
|
|
|
echo "7) Generate the build files using generate_build_files.py"
|
|
|
|
# You might expect to see the targets "android" and "gyp" here, but
|
|
# BoringSSL only supports Soong with their Android target now, so we have
|
|
# to use the Eureka target instead to get an Android Makefile that is
|
|
# compatible with the NDK.
|
|
python ./src/util/generate_build_files.py eureka gyp
|
|
mv eureka.mk sources.mk
|
|
|
|
echo "8) Enable pathname relativization for the generated .gypi file"
|
|
|
|
# The names BoringSSL chooses by default are incompatible with Gyp's
|
|
# pathname relativization. Replacing them with compatible names fixes
|
|
# including the generated .gypi files from outside the kit/ directory.
|
|
sed -i 's/_sources/_files/g' boringssl.gypi
|
|
|
|
echo "Done."
|