[flang] Simplified git clone in README
authorStephane Chauveau <stephane@chauveau-central.net>
Thu, 8 Feb 2018 14:59:02 +0000 (15:59 +0100)
committerGitHub <noreply@github.com>
Fri, 9 Feb 2018 09:09:20 +0000 (10:09 +0100)
Original-commit: flang-compiler/f18@198d2e6c8a8a0ffee461acc76f7d1a252ad366da
Reviewed-on: https://github.com/flang-compiler/f18/pull/6
Tree-same-pre-rewrite: false

flang/README.md

index b5c1a24..9251e3f 100644 (file)
     ROOT=$(pwd)
     REL=release_50
     
-    git clone https://git.llvm.org/git/llvm.git/
-    cd llvm/
-    git checkout $REL
-    
-    cd $ROOT/llvm/tools
-    git clone https://git.llvm.org/git/clang.git/
-    git checkout $REL
-    
-    cd $ROOT/llvm/projects
-    git clone https://git.llvm.org/git/openmp.git/ 
-    cd openmp
-    git checkout $REL
-    
-    cd $ROOT/llvm/projects
-    git clone https://git.llvm.org/git/libcxx.git/
-    cd libcxx
-    git checkout $REL
-    
-    cd $ROOT/llvm/projects
-    git clone https://git.llvm.org/git/libcxxabi.git/
-    cd libcxxabi
-    git checkout $REL
+    # To build LLVM and Clang, we only need the head of the requested branch. 
+    # Remove --single-branch --depth=1 if you want access to the whole repository
+
+    git clone --branch $REL --single-branch --depth=1 https://git.llvm.org/git/llvm.git/       llvm
+
+    # The following sub-repositories are probably not needed unless you also want to 
+    # build clang: 
+
+    git clone --branch $REL --single-branch --depth=1 https://git.llvm.org/git/clang.git/      llvm/tools/clang
+    git clone --branch $REL --single-branch --depth=1 https://git.llvm.org/git/openmp.git/     llvm/projects/openmp
+    git clone --branch $REL --single-branch --depth=1 https://git.llvm.org/git/libcxx.git/     llvm/projects/libcxx
+    git clone --branch $REL --single-branch --depth=1 https://git.llvm.org/git/libcxxabi.git/  llvm/projects/libcxxabi
+
     
-    # List the version of all git sub-directories 
-    # They should all match $REL
-    for dir in $(find "$ROOT" -name .git) ; do 
+    # List the version of all git sub-directories. They should all match $REL
+    for dir in $(find "$ROOT/llvm" -name .git) ; do 
       cd $dir/.. ; 
       printf " %-15s %s\n" "$(git rev-parse --abbrev-ref HEAD)" "$(pwd)" ; 
     done