Fix: When downloading any file failed to vendor/dep, the make command will always failed except removing the /vender/dep folder manually

Signed-off-by: hooklee2000 <hooklee2000@gmail.com>
This commit is contained in:
hooklee2000 2020-09-04 14:33:49 +08:00
parent 2d086ba06b
commit 9dc80b778f
3 changed files with 32 additions and 15 deletions

View File

@ -59,6 +59,7 @@ phony += dist-clean
dist-clean:
@$(RM) -rf build/bin
@$(RM) -rf build/out
@$(RM) -rf vendor/dep
phony += test
test:

View File

@ -44,24 +44,39 @@ build_linux_arm64_gcc4() {
# wget compress dep
get_rocksdb_compress_dep() {
#################################################################
## Might check the dep files each in individual if wget failed ##
#################################################################
if [ ! -d "${RootPath}/vendor/dep" ]; then
mkdir -p ${RootPath}/vendor/dep
cd ${RootPath}/vendor/dep
wget http://www.zlib.net/zlib-1.2.11.tar.gz
wget https://astuteinternet.dl.sourceforge.net/project/bzip2/bzip2-1.0.6.tar.gz
wget https://codeload.github.com/facebook/zstd/zip/v1.4.5
wget https://codeload.github.com/lz4/lz4/tar.gz/v1.9.2
tar zxf zlib-1.2.11.tar.gz
tar zxf bzip2-1.0.6.tar.gz
unzip v1.4.5
tar zxf v1.9.2
#rm -rf zlib-1.2.11.tar.gz bzip2-1.0.6.tar.gz v1.4.5 v1.9.2
cd ${RootPath}
fi
cd ${RootPath}
cd ${RootPath}/vendor/dep
if [ ! -d "${RootPath}/vendor/dep/zlib-1.2.11" ]; then
wget http://www.zlib.net/zlib-1.2.11.tar.gz
tar zxf zlib-1.2.11.tar.gz
fi
if [ ! -d "${RootPath}/vendor/dep/bzip2-1.0.6" ]; then
wget https://sourceforge.net/projects/bzip2/files/bzip2-1.0.6.tar.gz
tar zxf bzip2-1.0.6.tar.gz
fi
if [ ! -d "${RootPath}/vendor/dep/zstd-1.4.5" ]; then
wget https://codeload.github.com/facebook/zstd/zip/v1.4.5
unzip v1.4.5
fi
if [ ! -d "${RootPath}/vendor/dep/lz4-1.9.2" ]; then
wget https://codeload.github.com/lz4/lz4/tar.gz/v1.9.2
tar zxf v1.9.2
fi
#rm -rf zlib-1.2.11.tar.gz bzip2-1.0.6.tar.gz v1.4.5 v1.9.2
cd ${RootPath}
}

View File

@ -294,6 +294,7 @@ clean() {
dist_clean() {
$RM -rf ${BuildBinPath}
$RM -rf ${BuildOutPath}
$RM -rf ${VendorPath}/dep
}
cmd=${1:-"all"}