This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Handle True64's make


Hello,

Given `cli/cli-interp.c', True64's make was helpfuly expanding it to "/full/path/to/src/gdb/cli/cli-interp.c". Unfortunatly, the init.c generator code was also expanding it, giving /full/path/to/src/gdb//full/path/to/src/gdb/cli/cli-interp.c. Oops! Since such files didn't exist, such files _initialize_*() functions were being missed, and hence, things like the cli interpreter were not being registered. This lead to a gdb with no known interpreter!

The attached avoids this problem.

committed,
Andrew
2003-03-20  Andrew Cagney  <cagney at redhat dot com>

	* Makefile.in (init.c): Don't add $(srcdir) prefix when a file
	already has a full path.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.345
diff -u -r1.345 Makefile.in
--- Makefile.in	20 Mar 2003 22:09:54 -0000	1.345
+++ Makefile.in	20 Mar 2003 22:36:36 -0000
@@ -966,6 +966,13 @@
 # everything else.  The catch is that other modules still take the
 # address of these builtin types forcing them to be variables, sigh!
 
+# NOTE: cagney/2003-03-18: The sed pattern ``s|^\([^ /]...'' is
+# anchored on the first column and excludes the ``/'' character so
+# that it doesn't add the $(srcdir) prefix to any file that already
+# has an absolute path.  It turns out that $(DEC)'s True64 make
+# automatically adds the $(srcdir) prefixes when it encounters files
+# in sub-directories such as cli/ and mi/.
+
 INIT_FILES = $(OBS) $(TSOBS) $(CONFIG_OBS) $(CONFIG_INITS)
 init.c: $(INIT_FILES)
 	@echo Making init.c
@@ -985,7 +992,7 @@
 	    -e '/[a-z0-9A-Z_]*-exp.tab.o/d' \
 	    -e 's/\.o/.c/' \
 	    -e 's,signals\.c,signals/signals\.c,' \
-	    -e 's|\([^  ][^     ]*\)|$(srcdir)/\1|g' | \
+	    -e 's|^\([^  /][^     ]*\)|$(srcdir)/\1|g' | \
 	while read f; do grep '^_initialize_[a-z_0-9A-Z]* *(' $$f 2>/dev/null; done | \
 	sed -e 's/^.*://' -e 's/^\([a-z_0-9A-Z]*\).*/\1/' | \
 	( echo _initialize_gdbtypes ; grep -v '^_initialize_gdbtypes$$' ) > init.l-tmp

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]