From 7349ff92c20df6a9f4ea3e53383d99622960d74d Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Fri, 11 May 2012 18:20:26 +0000 Subject: gdb/ Implement multi-component --with-auto-load-dir. * NEWS (set auto-load scripts-directory, --with-auto-load-dir): New entries. (--with-auto-load-safe-path): Update the default value description. * auto-load.c (auto_load_dir, set_auto_load_dir, show_auto_load_dir): New. (auto_load_objfile_script): Add DEBUG_AUTO_LOAD output. Remove GDB_DATADIR NULL check. Replace GDB_DATADIR/auto-load by AUTO_LOAD_DIR. Support $ddir and multiple components in it. (_initialize_auto_load): Initialize also auto_load_dir. Install new "set auto-load scripts-directory". * config.in: Regenerate. * configure: Regenerate. * configure.ac (--with-auto-load-dir): New configure option. (--auto-load-safe-path): Change the default to --with-auto-load-dir. gdb/doc/ Implement multi-component --with-auto-load-dir. * gdb.texinfo (Auto-loading): New references for 'set auto-load scripts-directory' and 'show auto-load scripts-directory'. (Auto-loading safe path): Describe the new default. Move $ddir substituation reference to 'objfile-gdb.py file'. (objfile-gdb.py file): Describe script-name alias. Change real-name to script-name. Describe new 'set auto-load scripts-directory' and 'show auto-load scripts-directory'. --- gdb/configure.ac | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'gdb/configure.ac') diff --git a/gdb/configure.ac b/gdb/configure.ac index 1a889d9..97cd6ee 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -136,16 +136,26 @@ AS_HELP_STRING([--with-relocated-sources=PATH], [automatically relocate this pat [Relocated directory for source files. ]) ]) +AC_MSG_CHECKING([for default auto-load directory]) +AC_ARG_WITH(auto-load-dir, +AS_HELP_STRING([--with-auto-load-dir=PATH], + [directories from which to load auto-loaded scripts, use '$ddir' for -data-directory @<:@$ddir/auto-load@:>@]),, + [with_auto_load_dir='$ddir/auto-load']) +escape_dir=`echo $with_auto_load_dir | sed 's/[[$]]ddir\>/\\\\\\\\\\\\&/g'` +AC_DEFINE_DIR(AUTO_LOAD_DIR, escape_dir, + [Directories from which to load auto-loaded scripts.]) +AC_MSG_RESULT([$with_auto_load_dir]) + AC_MSG_CHECKING([for default auto-load safe-path]) AC_ARG_WITH(auto-load-safe-path, AS_HELP_STRING([--with-auto-load-safe-path=PATH], - [directories safe to hold auto-loaded files, use $ddir for --with-gdb-datadir path @<:@$ddir/auto-load@:>@]) + [directories safe to hold auto-loaded files, use $ddir for --with-gdb-datadir path @<:@--with-auto-load-dir@:>@]) AS_HELP_STRING([--without-auto-load-safe-path], [do not restrict auto-loaded files locations]), [if test "$with_auto_load_safe_path" = "no"; then with_auto_load_safe_path="/" fi], -[with_auto_load_safe_path='$ddir/auto-load']) +[with_auto_load_safe_path="$with_auto_load_dir"]) escape_dir=`echo $with_auto_load_safe_path | sed 's/[[$]]ddir\>/\\\\\\\\\\\\&/g'` AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir, [Directories safe to hold auto-loaded files.]) -- cgit v1.1