[llvm-commits] [PATCH] Improved svn repo searching for 'make update'
Edwin Vane
edwin.vane at intel.com
Thu Jan 24 12:37:43 PST 2013
Hi echristo,
Use a simple recursive bash function to search for svn repos for the
'make update' target thus including projects like clang-tools-extra.
http://llvm-reviews.chandlerc.com/D326
Files:
Makefile
Index: Makefile
===================================================================
--- Makefile
+++ Makefile
@@ -248,13 +248,24 @@
SVN = svn
SVN-UPDATE-OPTIONS =
AWK = awk
-SUB-SVN-DIRS = $(AWK) '/I|\? / {print $$2}' \
- | LC_ALL=C xargs $(SVN) info 2>/dev/null \
- | $(AWK) '/^Path:\ / {print $$2}'
+
+# Multiline variable defining a recursive function for finding svn repos rooted at
+# a given path. svnup() requires one argument: the root to search from.
+define SUB-SVN-DIRS
+function svnup() {
+ dirs=`svn status --no-ignore $1 | awk '/I|\? / {print $2}' | LC_ALL=C xargs svn info 2>/dev/null | awk '/^Path:\ / {print $2}'`;
+ if [ "$dirs" = "" ]; then
+ return;
+ fi
+ for f in $dirs; do
+ svnup $f;
+ done
+}
+endef
update:
$(SVN) $(SVN-UPDATE-OPTIONS) update $(LLVM_SRC_ROOT)
- @ $(SVN) status --no-ignore $(LLVM_SRC_ROOT) | $(SUB-SVN-DIRS) | xargs $(SVN) $(SVN-UPDATE-OPTIONS) update
+ @ $(SUB-SVN-DIRS); $(SVN) status --no-ignore $(LLVM_SRC_ROOT) | svnup $(LLVM_SRC_ROOT) | xargs $(SVN) $(SVN-UPDATE-OPTIONS) update
happiness: update all check-all
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D326.1.patch
Type: text/x-patch
Size: 1098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130124/9ae98b52/attachment.bin>
More information about the llvm-commits
mailing list