APPROVE COMMIT 21.5
I don't see how the current setup for creating a .gdbinit ever worked
for anyone. It simply sources .gdbinit.in from srcdir to .gdbinit.in
in blddir, then processes that trivial file. I guess this would work
with build in srcdir, but not with configure --srcdir. There was
another problem, which is that the debugger init files now depend on
config.h. Thus, we really need to redo them any time config.h
changes. Since it takes essentially zero time, I've arranged to
always do it.
This patch
(1) moves the debugger templates from src/.gdbinit.in and
src/.dbxrc.in to etc/gdbinit.in and etc/dbxrc.in. I figure
hackers are more likely to notice them there.
(2) makes the configure code that hacks these guys dependent only on
existence of the template, not on nonexistence of the target.
(3) arranges for *brief* comments on licensing and where to find usage
hints in .gdbinit. I'd do it for .dbxrc too but I don't know the
comment syntax there. This is done using the imake XCOMM
convention, and it could be used in Makefile.in.in, too.
To apply this patch, you need to mv the templates as indicated in (1),
then apply it with patch -p1.
diff --git a/ChangeLog b/ChangeLog
index 4cd69e3..2e49bf6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -0,0 +1,6 @@
+2006-05-23 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * configure.ac: Look for debugger init file templates in etc/, not
+ src/. Debugger init files depend on config.h; recreate on every
+ configure. Support XCOMM convention. Update FSF copyright.
+
diff --git a/etc/ChangeLog b/etc/ChangeLog
index bd7f148..df4e687 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -0,0 +1,8 @@
+2006-05-23 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * gdbinit.in:
+ * dbxrc.in:
+ Moved from src/. Update FSF address. Improve comments.
+
+ * gdbinit.in: Use XCOMM for "don't edit" comment and copyright.
+
diff --git a/src/ChangeLog b/src/ChangeLog
index b701e3e..270d7fd 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -0,0 +1,5 @@
+2006-05-23 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * .gdbinit.in: Moved to etc.
+ * .dbxrc.in: Moved to etc.
+
diff --git a/configure.ac b/configure.ac
index 072b223..3a7e365 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,9 +34,7 @@ AC_COPYRIGHT(
[Configuration script for XEmacs. Largely divergent from FSF.
Guess values for system-dependent variables and create Makefiles.
-Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
-Copyright (C) 1997, 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
-Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+Copyright (C) 1992-1999, 2001-2006 Free Software Foundation, Inc.
Copyright (C) 1993, 1994, 1995 Board of Trustees, University of Illinois.
Copyright (C) 1996, 1997 Sun Microsystems, Inc.
Copyright (C) 1995, 1996, 2002, 2003, 2004 Ben Wing.
@@ -5576,16 +5574,18 @@ dnl ------------------------------------
dnl Create some auxiliary files for developers.
dnl ----------------------------------------------
+dnl Unlike TAGS, debugger init files depend on config.h.
+dnl Regenerate them locally on every configure.
dnl Create a .gdbinit useful for debugging XEmacs
-if test -f "$srcdir/src/.gdbinit.in" -a ! -f "src/.gdbinit.in"; then
+if test -f "$srcdir/etc/gdbinit.in"; then
test "$verbose" = "yes" && echo "creating
src/.gdbinit.in"
- echo "source $srcdir/src/.gdbinit.in" > "src/.gdbinit.in"
+ cp $srcdir/etc/gdbinit.in src/.gdbinit.in
fi
dnl Create a .dbxrc useful for debugging XEmacs
-if test -f "$srcdir/src/.dbxrc.in" -a ! -f "src/.dbxrc.in"; then
+if test -f "$srcdir/etc/dbxrc.in"; then
test "$verbose" = "yes" && echo "creating
src/.dbxrc.in"
- echo ". $srcdir/src/.dbxrc.in" > "src/.dbxrc.in"
+ echo ". $srcdir/etc/dbxrc.in" > "src/.dbxrc.in"
fi
dnl Create a useful TAGS file
@@ -6235,6 +6235,11 @@ dnl two brackets become one, but inside
dnl more, or something -- I don't understand, but Martin probably does.
dnl We put the brackets back later.
dnl [ben]
+dnl To insert comments that will remain in the generated file, we use the
+dnl imake XCOMM convention. Lines beginning with "XCOMM " exactly (no
+dnl leading whitespace, one trailing ASCII space, case sensitive) will be
+dnl transformed to shell/make/gdb comments in the generated file.
+dnl [sjt]
dnl MAKE_JUNK_C(filename):
dnl Copy a .in file to junk.c in preparation for passing through the
@@ -6283,7 +6288,9 @@ dnl Restore lines quoted above to origin
s/\\\([[\"]]\)/\1/g
s/^[[ TAB]]*\"//
s/\"[[ TAB]]*$//
-}' > Makefile.new
+}' \
+dnl Convert comments -- must come after the unquoting operations
+ -e 's/^XCOMM /\# /' > Makefile.new
chmod 444 Makefile.new
mv -f Makefile.new $2
])dnl CPP_MAKEFILE
@@ -6295,7 +6302,8 @@ AC_CONFIG_COMMANDS([default],
dnl Create a GNUmakefile and Makefile from Makefile.in.
dnl Create xemacs.def from xemacs.def.in in the same fashion,
-dnl if it exists (i.e. in the src/ directory).
+dnl if it exists (i.e. in the src/ directory). Ditto for the
+dnl debugger init files (in the src/ directory).
MAKE_JUNK_C(Makefile.in)
CPP_MAKEFILE(,Makefile)
CPP_MAKEFILE(-DUSE_GNU_MAKE,GNUmakefile)
diff --git a/src/.dbxrc.in b/etc/dbxrc.in
similarity index 96%
rename from src/.dbxrc.in
rename to etc/dbxrc.in
index d6b2711..08b1cd6 100644
--- a/src/.dbxrc.in
+++ b/etc/dbxrc.in
@@ -1,4 +1,8 @@
-## -*- ksh -*-
+## dbx init file for XEmacs -*- ksh -*-
+## This is the source file for src/.dbxrc. Edit it, and rerun configure.
+## (Running config.status is not enough.)
+## The generated file depends on src/config.h (currently only in one place).
+
## Copyright (C) 1998 Free Software Foundation, Inc.
## This file is part of XEmacs.
@@ -15,11 +19,14 @@
## You should have received a copy of the GNU General Public License
## along with XEmacs; see the file COPYING. If not, write to
-## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-## Boston, MA 02111-1307, USA.
+## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+## Boston, MA 02110-1301 USA
## Author: Martin Buchholz
+## Other contributors you could ask for help: Ivan Golubev, Jerry James,
+## Stephen Turnbull.
+
## You can use this file to debug XEmacs using Sun WorkShop's dbx.
## Some functions defined here require a running process, but most
@@ -49,7 +56,8 @@ ignore POLL
ignore IO
#ifdef VDB_POSIX
-ignore SIGSEGV SIGBUS
+ignore SIGSEGV
+ignore SIGBUS
#endif
document lbt << 'end'
diff --git a/src/.gdbinit.in b/etc/gdbinit.in
similarity index 92%
rename from src/.gdbinit.in
rename to etc/gdbinit.in
index ed4977f..20e084c 100644
--- a/src/.gdbinit.in
+++ b/etc/gdbinit.in
@@ -1,5 +1,17 @@
-## -*- ksh -*-
-## Copyright (C) 1998 Free Software Foundation, Inc.
+## gdb init file for XEmacs -*- ksh -*-
+## This is the source for src/.gdbinit. Edit it, and rerun configure.
+## (Running config.status is not enough.)
+## The generated file depends on src/config.h (currently only in one place).
+
+## To insert comments that will remain in the generated file, we use the
+## imake XCOMM convention. Lines beginning with "XCOMM " exactly (no
+## leading whitespace, one trailing ASCII space, case sensitive) will be
+## transformed to gdb command file comments in the generated file.
+
+XCOMM gdb init file for XEmacs
+XCOMM AUTOMATICALLY GENERATED FROM etc/gdbinit.in BY configure -- DO NOT EDIT.
+XCOMM See etc/gdbinit.in for licensing information and usage hints.
+XCOMM Copyright (C) 1998 Free Software Foundation, Inc.
## This file is part of XEmacs.
@@ -15,10 +27,13 @@
## You should have received a copy of the GNU General Public License
## along with XEmacs; see the file COPYING. If not, write to
-## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-## Boston, MA 02111-1307, USA.
+## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+## Boston, MA 02110-1301 USA
## Author: Martin Buchholz
+
+## Other contributors you could ask for help: Ivan Golubev, Jerry James,
+## Stephen Turnbull.
## Some useful commands for debugging emacs with gdb 4.16 or better.
##
--
School of Systems and Information Engineering
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.