remove trailing slashes from srcdir so gdb-mode won't get cranky
authorK. Richard Pixley <rich@cygnus>
Wed, 11 Mar 1992 06:07:29 +0000 (06:07 +0000)
committerK. Richard Pixley <rich@cygnus>
Wed, 11 Mar 1992 06:07:29 +0000 (06:07 +0000)
ChangeLog
configure

index 2e868f2d096f1d2a1557fe82745babd785ec0ded..6e86ed67021c0c1e5eaba77c8a6383ed046d1e8e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 Tue Mar 10 21:49:18 1992  K. Richard Pixley  (rich@mars.cygnus.com)
 
+       * configure: remove trailing slashes from srcdir.  Otherwise emacs
+         gdb mode gets cranky.
+
        * Makefile.in: drop flex.  make stamp files work.
 
        * configure: use relative paths for configure and srcdir whenever
index 61c0dc915c5d1bd04ba0dbeeb55f9f0668bbe152..2061182fc00317e4d43ddf75dbe154a80fdfd546 100755 (executable)
--- a/configure
+++ b/configure
@@ -108,7 +108,8 @@ do
                exec_prefixoption="-exec_prefix=${exec_prefix}"
                next_exec_prefix=
        elif [ -n "${next_site}" ] ; then site=${arg} ; next_site=
-       elif [ -n "${next_srcdir}" ] ; then srcdir=${arg} ; next_srcdir=
+       # remove any possible trailing slash from srcdir.  See note below.
+       elif [ -n "${next_srcdir}" ] ; then srcdir=`echo ${arg} | sed -e 's:/$::'` ; next_srcdir=
        elif [ -n "${next_program_prefix}" ] ; then
                program_prefix=${arg}
                program_prefixoption="-program_prefix=${program_prefix}"
@@ -185,8 +186,12 @@ do
                -site | --site | --sit)
                        next_site=yes
                        ;;
+               # remove trailing slashes.  Otherwise, when the file name gets
+               # bolted into an object file as debug info, it has two slashes in
+               # it.  Ordinarily this is ok, but emacs takes double slash to
+               # mean "forget the first part".
                -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-                       srcdir=`echo ${arg} | sed 's/^[-a-z]*=//'`
+                       srcdir=`echo ${arg} | sed 's/^[-a-z]*=//' | sed -e 's:/$::'`
                        ;;
                -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
                        next_srcdir=yes