[Patch] Fixup more relative directories when building --enable-debug

Brad Spencer spencer@infointeractive.com
Tue Jan 7 22:04:00 GMT 2003


On Tue, Jan 07, 2003 at 03:27:08PM -0600, Benjamin Kosnik wrote:
> 
> >I'm finally getting a chance to try out the new --enable-debug, and I
> >ran into a snag when compiling off the cvs trunk.  Some of the errors
> >are shown below.
> 
> Huh. How are you configuring? Are you using separate build and src
> directories? (Just curious)

Yes, completely as usual.  It struck me as odd that it didn't work.
My path to configure starts with "../", though.  Perhaps that's it?

../../cvs-gcc/gcc/configure  --with-dwarf2 --enable-languages=c,c++
--enable-threads=single --disable-shared
--prefix=/build/eng-linux1/spencer/test-gcc --with-gnu-as
--with-gnu-ld --with-as=/build/eng-linux1/spencer/test-gcc/bin/as
--with-ld=/build/eng-linux1/spencer/test-gcc/bin/ld --disable-multilib
--enable-concept-checks --enable-clocale=gnu --enable-debug

> > And by the way, is there a reason this isn't just done with a pipe? 
> 
> No. I didn't know how else to do it, and the other ways I could think of
> ended up not working. As it stands, the additional debug rule is pretty
> small, so if you can think of a better way to do this feel free.

Ok.  Here's a new patch with the stream piped through a few "sed"s (I'm
no sed expert).  They should be equivalent except for the temporary
files, and it certainly appears to test okay for me.

-- 
------------------------------------------------------------------
Brad Spencer - spencer@infointeractive.com - "It's quite nice..."
Systems Architect | InfoInterActive Corp. | A Canadian AOL Company
-------------- next part --------------
Index: Makefile.in
===================================================================
RCS file: /cvsroot/gcc/gcc/libstdc++-v3/src/Makefile.in,v
retrieving revision 1.164
diff -u -p -r1.164 Makefile.in
--- Makefile.in	6 Jan 2003 21:22:59 -0000	1.164
+++ Makefile.in	7 Jan 2003 22:01:47 -0000
@@ -594,13 +594,13 @@ stamp-debug: 
 	if test ! -d ${debugdir}; then \
 	  mkdir -p ${debugdir}; \
 	  (cd ${debugdir}; \
-	  cp ../Makefile .; \
-	  sed 's/top_builddir = ../top_builddir = ..\/../g' \
-	  < Makefile > temp.1; \
-	  sed 's/all-local: build_debug/all-local:/g' < temp.1 > temp.2; \
+	  sed 's/top_builddir = \.\./top_builddir = ..\/../g' \
+	  < ../Makefile | \
+	  sed 's/srcdir = \.\./srcdir = ..\/../g' | \
+	  sed 's/glibcpp_basedir = \.\./glibcpp_basedir = ..\/../g' | \
+	  sed 's/all-local: build_debug/all-local:/g' | \
 	  sed 's/install-data-local: install_debug/install-data-local:/g' \
-	  < temp.2 > temp.3; \
-          mv temp.3 Makefile) ; \
+	  > Makefile) ; \
 	fi; \
 	echo `date` > stamp-debug; 
 


More information about the Libstdc++ mailing list