From 86433b6eced78e65ed3dc0ab0b2eceb76be54350 Mon Sep 17 00:00:00 2001 From: Alexey Brodkin Date: Wed, 15 Jul 2020 00:50:17 +0300 Subject: [PATCH] build_clang.sh: Allow unmanned instllation To get a completely env independent setup we may want to install Clang/LLVM to the target folder as well. So let's allow user to do it in a scripted way just adding ENABLE_CLANG_INSTALL=1 for execution string. --- build_clang.sh | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/build_clang.sh b/build_clang.sh index 5790fec..e70c49a 100755 --- a/build_clang.sh +++ b/build_clang.sh @@ -130,12 +130,21 @@ else fi fi -echo "" -echo "Done!" -echo "" -echo -n "cd into '$PWD/$stage' and type 'make install' to install " -echo "clang/llvm to '$INSTALLPREFIX'" -echo "" +if [ -z "$ENABLE_CLANG_INSTALL" ]; then + echo "" + echo "Done!" + echo "" + echo -n "cd into '$PWD/$stage' and type 'make install' to install " + echo "clang/llvm to '$INSTALLPREFIX'" + echo "" +else + pushd $stage &>/dev/null + $MAKE install -j $JOBS VERBOSE=1 + popd &>/dev/null + echo "" + echo "Done!" + echo "" +fi popd &>/dev/null # llvm popd &>/dev/null