[llvm-commits] [llvm-top] r39964 - /llvm-top/trunk/library.sh
Reid Spencer
rspencer at reidspencer.com
Tue Jul 17 00:12:53 PDT 2007
Author: reid
Date: Tue Jul 17 02:12:52 2007
New Revision: 39964
URL: http://llvm.org/viewvc/llvm-project?rev=39964&view=rev
Log:
Add a function that build scripts in the modules can use for correctly
processing the arguments passed to them.
Modified:
llvm-top/trunk/library.sh
Modified: llvm-top/trunk/library.sh
URL: http://llvm.org/viewvc/llvm-project/llvm-top/trunk/library.sh?rev=39964&r1=39963&r2=39964&view=diff
==============================================================================
--- llvm-top/trunk/library.sh (original)
+++ llvm-top/trunk/library.sh Tue Jul 17 02:12:52 2007
@@ -114,3 +114,17 @@
done
return 0
}
+
+process_builder_args() {
+ for arg in "$@" ; do
+ case "$arg" in
+ LLVM_TOP=*) LLVM_TOP=`echo "$arg" | sed -e 's/LLVM_TOP=//'` ;;
+ PREFIX=*) PREFIX=`echo "$arg" | sed -e 's/PREFIX=//'` ;;
+ MODULE=*) PREFIX=`echo "$arg" | sed -e 's/MODULE=//'` ;;
+ --*) OPTIONS_DASH_DASH="$OPTIONS_DASH_DASH $arg" ;;
+ -*) OPTIONS_DASH="$OPTIONS_DASH $arg" ;;
+ *=*) OPTIONS_ASSIGN="$OPTIONS_ASSIGN $arg" ;;
+ *) die 1 "Unrecognized option: $arg" ;;
+ esac
+ done
+}
More information about the llvm-commits
mailing list