aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-11-10 00:49:42 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-11-10 00:49:42 +0000
commit1e5b24330b11fb2631c7bc2892ba6364309fe385 (patch)
treee7c5029c194b25c8b35e36817ee2bb88d56fecab /utils
parent17afb0664861507c9bd968f1678d8cca69b2851d (diff)
downloadexternal_llvm-1e5b24330b11fb2631c7bc2892ba6364309fe385.zip
external_llvm-1e5b24330b11fb2631c7bc2892ba6364309fe385.tar.gz
external_llvm-1e5b24330b11fb2631c7bc2892ba6364309fe385.tar.bz2
llvm-build: Tidy up options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/llvm-build/llvmbuild/main.py49
1 files changed, 29 insertions, 20 deletions
diff --git a/utils/llvm-build/llvmbuild/main.py b/utils/llvm-build/llvmbuild/main.py
index f635526..2a9ef5d 100644
--- a/utils/llvm-build/llvmbuild/main.py
+++ b/utils/llvm-build/llvmbuild/main.py
@@ -487,32 +487,41 @@ configure_file(\"%s\"
def main():
from optparse import OptionParser, OptionGroup
parser = OptionParser("usage: %prog [options]")
- parser.add_option("", "--source-root", dest="source_root", metavar="PATH",
+
+ group = OptionGroup(parser, "Input Options")
+ group.add_option("", "--source-root", dest="source_root", metavar="PATH",
help="Path to the LLVM source (inferred if not given)",
action="store", default=None)
- parser.add_option("", "--print-tree", dest="print_tree",
- help="Print out the project component tree [%default]",
- action="store_true", default=False)
- parser.add_option("", "--write-llvmbuild", dest="write_llvmbuild",
+ group.add_option("", "--llvmbuild-source-root",
+ dest="llvmbuild_source_root",
+ help=(
+ "If given, an alternate path to search for LLVMBuild.txt files"),
+ action="store", default=None, metavar="PATH")
+ parser.add_option_group(group)
+
+ group = OptionGroup(parser, "Output Options")
+ group.add_option("", "--print-tree", dest="print_tree",
+ help="Print out the project component tree [%default]",
+ action="store_true", default=False)
+ group.add_option("", "--write-llvmbuild", dest="write_llvmbuild",
help="Write out the LLVMBuild.txt files to PATH",
action="store", default=None, metavar="PATH")
- parser.add_option("", "--write-library-table",
- dest="write_library_table", metavar="PATH",
- help="Write the C++ library dependency table to PATH",
- action="store", default=None)
- parser.add_option("", "--write-cmake-fragment",
- dest="write_cmake_fragment", metavar="PATH",
- help="Write the CMake project information to PATH",
- action="store", default=None)
- parser.add_option("", "--write-make-fragment",
+ group.add_option("", "--write-library-table",
+ dest="write_library_table", metavar="PATH",
+ help="Write the C++ library dependency table to PATH",
+ action="store", default=None)
+ group.add_option("", "--write-cmake-fragment",
+ dest="write_cmake_fragment", metavar="PATH",
+ help="Write the CMake project information to PATH",
+ action="store", default=None)
+ group.add_option("", "--write-make-fragment",
dest="write_make_fragment", metavar="PATH",
- help="Write the Makefile project information to PATH",
+ help="Write the Makefile project information to PATH",
+ action="store", default=None)
+ parser.add_option_group(group)
action="store", default=None)
- parser.add_option("", "--llvmbuild-source-root",
- dest="llvmbuild_source_root",
- help=(
- "If given, an alternate path to search for LLVMBuild.txt files"),
- action="store", default=None, metavar="PATH")
+ parser.add_option_group(group)
+
(opts, args) = parser.parse_args()
# Determine the LLVM source path, if not given.