llvm.org GIT mirror llvm / 410b46a
Improved svn repo searching for 'make update' Use a simple recursive bash function to search for svn repos for the 'make update' target thus including projects like clang-tools-extra. Reviewers: bkramer, echristo git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173650 91177308-0d34-0410-b5e6-96231b3b80d8 Edwin Vane 6 years ago
1 changed file(s) with 17 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
247247 SVN = svn
248248 SVN-UPDATE-OPTIONS =
249249 AWK = awk
250 SUB-SVN-DIRS = $(AWK) '/I|\? / {print $$2}' \
251 | LC_ALL=C xargs $(SVN) info 2>/dev/null \
252 | $(AWK) '/^Path:\ / {print $$2}'
250
251 # Multiline variable defining a recursive function for finding svn repos rooted at
252 # a given path. svnup() requires one argument: the root to search from.
253 define SUB_SVN_DIRS
254 svnup() {
255 dirs=`svn status --no-ignore $$1 | awk '/I|\? / {print $$2}' | LC_ALL=C xargs svn info 2>/dev/null | awk '/^Path:\ / {print $$2}'`;
256 if [ "$$dirs" = "" ]; then
257 return;
258 fi;
259 for f in $$dirs; do
260 echo $$f;
261 svnup $$f;
262 done
263 }
264 endef
265 export SUB_SVN_DIRS
253266
254267 update:
255268 $(SVN) $(SVN-UPDATE-OPTIONS) update $(LLVM_SRC_ROOT)
256 @ $(SVN) status --no-ignore $(LLVM_SRC_ROOT) | $(SUB-SVN-DIRS) | xargs $(SVN) $(SVN-UPDATE-OPTIONS) update
269 @eval $$SUB_SVN_DIRS; $(SVN) status --no-ignore $(LLVM_SRC_ROOT) | svnup $(LLVM_SRC_ROOT) | xargs $(SVN) $(SVN-UPDATE-OPTIONS) update
257270
258271 happiness: update all check-all
259272