diff options
author | Diana Picus <diana.picus@linaro.org> | 2016-04-22 16:47:57 +0300 |
---|---|---|
committer | Diana Picus <diana.picus@linaro.org> | 2016-04-27 11:12:58 +0300 |
commit | 416bc4fa97ca57032c7e1ae8402510e5cc033938 (patch) | |
tree | a2eb0de1610d6dc0eb7b6fc87c0a55cc7bf3905e | |
parent | ec97c50454eb23d0b549e9ae01cbdfa537cdb2b9 (diff) |
Typos & nitpicks
Fix some typos in the READMEs.
Nit #1: Use full path when cloning repo
If we use the basename, we're forced to run the script from the directory where
we want the whole thing to live. By using the full path, we can run the script
from anywhere.
Nit #2: Use more general name for variable (generator vs ninja)
Nit #3 (noticed by Renato): Set generator explicitly in llvm-build
When ninja is not found, we use make for the build. However, we don't tell
cmake about it and instead let it choose its own default generator. This commit
explicitly sets the cmake generator to "Unix Makefiles", in case cmake's default
generator for the current platform is not make.
In order to get this to work, it was necessary to make some changes to the
safe_run helper function, so we wouldn't lose the quotes around "Unix
Makefiles".
Change-Id: I9592645d517d006b0e680a2996d498e57f009400
-rw-r--r-- | README.txt | 4 | ||||
-rwxr-xr-x | helpers/llvm-build | 6 | ||||
-rwxr-xr-x | helpers/llvm-common | 5 | ||||
-rwxr-xr-x | helpers/llvm-prepare | 3 | ||||
-rw-r--r-- | test-suite/README.txt | 2 |
5 files changed, 9 insertions, 11 deletions
@@ -2,7 +2,7 @@ LLVM Development Helper Scripts =============================== These scripts are meant to help you setup and develop around LLVM and its -sub-projects. There are many perks when developing with LLVM, but the scripts +sub-projects. There are many quirks when developing with LLVM, but the scripts can only cover part of them, while others have to be explained via documents. The directory is split in multiple parts: @@ -17,7 +17,7 @@ how to manage them in the long run. Helpers: Scripts that setup the Git/Svn repositories, check-out, validate branches, build and test LLVM in its multiple forms. Since the repositories have an intricate relationship (symlinks inside the llvm tree), dealing with them is -not part of the scripts, and they assume the setup is conciously correct. +not part of the scripts, and they assume the setup is consciously correct. Monitor: Scripts to help you monitor buildbots. diff --git a/helpers/llvm-build b/helpers/llvm-build index 8d2fab4..5b4f27d 100755 --- a/helpers/llvm-build +++ b/helpers/llvm-build @@ -61,10 +61,10 @@ fi ## Choose between make and ninja make=make -ninja= +generator="Unix Makefiles" if which ninja 2>&1 > /dev/null; then make=ninja - ninja="-G Ninja" + generator="Ninja" fi ## Debug mode, make it lighter @@ -83,7 +83,7 @@ cd $build_dir ## Re-run CMake file files are damaged / not there if [ ! -f build.ninja ] && [ ! -f Makefile ]; then echo " + Configuring Build" - safe_run cmake $ninja $LLVM_SRC \ + safe_run cmake -G "$generator" $LLVM_SRC \ -DCMAKE_BUILD_TYPE=$build_type \ -DLLVM_BUILD_TESTS=True \ -DLLVM_ENABLE_ASSERTIONS=True \ diff --git a/helpers/llvm-common b/helpers/llvm-common index 5cf3f4a..d7de48f 100755 --- a/helpers/llvm-common +++ b/helpers/llvm-common @@ -43,10 +43,9 @@ get_branches() { } safe_run() { - CMD="$*" - $CMD + "$@" if [[ $? != 0 ]]; then - echo "'$CMD' failed, bailing out" + echo "'$@' failed, bailing out" exit 1 fi } diff --git a/helpers/llvm-prepare b/helpers/llvm-prepare index a6cd8cf..babc77c 100755 --- a/helpers/llvm-prepare +++ b/helpers/llvm-prepare @@ -11,12 +11,11 @@ function prepare() { src=$1 origin=$2 svn=$3 - dir=`basename $src` # Clone Linaro repo if [ ! -d $src/.git ]; then mkdir -p $src cd $src/.. - safe_run git clone $origin $dir + safe_run git clone $origin $src fi # Link with upstream SVN if [[ $LLVM_GITRW = 'yes' && ! -d $src/.git/svn ]]; then diff --git a/test-suite/README.txt b/test-suite/README.txt index c41d543..1d1ca12 100644 --- a/test-suite/README.txt +++ b/test-suite/README.txt @@ -6,7 +6,7 @@ correct options or a single test. The latter is really useful to run as part of the bisect, or as a debug build to investigate problems, all of which can be automatically ran using these scripts. -The entry point is run.sh, and the rest are utulities that are either used +The entry point is run.sh, and the rest are utilities that are either used by it or in conjunction with it. The setup script should get your tree configured correctly in order to run the tests. This is the tree that you need to setup on the 'test' directory for bisecting problems (see 'bisect' |