summaryrefslogtreecommitdiff
path: root/solenv/bin
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2011-09-18 12:01:13 +0200
committerDavid Tardon <dtardon@redhat.com>2011-09-18 12:03:34 +0200
commitebf6d5deba07b23ce3b340e1a0b6b53b0c63a0e9 (patch)
treefb7a80df44bc4123272d7fa2809441656f0c984a /solenv/bin
parent9617a776b42e4c37a30e28eb759c6fda6d8d9ca4 (diff)
add help
Diffstat (limited to 'solenv/bin')
-rwxr-xr-xsolenv/bin/install-gdb-printers46
1 files changed, 44 insertions, 2 deletions
diff --git a/solenv/bin/install-gdb-printers b/solenv/bin/install-gdb-printers
index 289a986e6667..3606dcae7082 100755
--- a/solenv/bin/install-gdb-printers
+++ b/solenv/bin/install-gdb-printers
@@ -35,6 +35,47 @@ die() {
exit 1
}
+usage() {
+ cat <<EOT
+Install gdb pretty printers and autoloaders for them.
+
+Usage:
+install-gdb-printers [ -a dir ] [ -i dir ] [ -p dir ] [ -c ] [ -L ]
+install-gdb-printers -h
+
+Options:
+-a dir The dir where autoloaders will be placed. Defaults to whatever -i
+ is.
+-c Create the autoloader's dir if it does not exist. This option only
+ makes sense if both -a and -i are used.
+-f Do not create subdirs in the autoloader's dir. This option is only
+ used during build.
+-h Show this help text.
+-i dir The dir where libreoffice is installed. Defaults to whatever -a is.
+-L Create symlinks to autoloaders already present in the build tree.
+ Only makes sense for dev. installation.
+-p dir The dir where pretty printers are placed.
+
+Env. variables:
+DESTDIR If set, it is prepended to all dir arguments.
+
+Examples:
+1) Make pretty printers usable in your dev. installation (this is
+ already done as part of make dev-install, but it would not have been
+ run if smoketest failed):
+
+install-gdb-printers -L
+
+2) Install pretty printers into /usr/share/libreoffice/gdb, with
+ autoloaders in /usr/share/gdb/auto-load (run
+ "info gdb 'Extending GDB' Python Auto-loading" to learn more) and
+ installation in /usr/lib64/libreoffice (this is what Fedora does):
+
+install-gdb-printers -a /usr/share/gdb/auto-load/usr/lib64/libreoffice -c \\
+ -i /usr/lib64/libreoffice -p /usr/share/libreoffice/gdb
+EOT
+}
+
make_autoload() {
local dir="${DESTDIR}${autoloaddir}"
${flat} || dir="${dir}/$2"
@@ -81,12 +122,13 @@ link=false
# are in the same dir.
flat=false
-# b de gh jklmno qrstuvwxyzABCDEFGHIJK MNOPQRSTUVWXYZ0123456789
-while getopts :a:cfi:p:L opt; do
+# b de g jklmno qrstuvwxyzABCDEFGHIJK MNOPQRSTUVWXYZ0123456789
+while getopts :a:cfhi:p:L opt; do
case ${opt} in
a) autoloaddir="${OPTARG}" ;;
c) create=true ;;
f) flat=true ;;
+ h) usage; exit ;;
i) installdir="${OPTARG}" ;;
p) pythondir="${OPTARG}" ;;
L) link=true ;;