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]

Patch for bug in `make tags'


I'm using the most recent cvs gdb.

When I run `make tags' I see this:

    creche. make tags
    Making TAGS
    ../../src/gdb/gdbtk.c: No such file or directory
    ../../src/gdb/gdbtk-cmds.c: No such file or directory
    ../../src/gdb/gdbtk-hooks.c: No such file or directory
    ../../src/gdb/gdbtk-varobj.c: No such file or directory
    ../../src/gdb/gdbtk-wrapper.c: No such file or directory

The problem here is that the tags target runs $(DEPFILES) through a
`s/.o/.c/'.  This fails because gdbtk.o is in the build directory but
the corresponding source file is not in $(srcdir).

The appended patch fixes this bug and also changes `make tags' to
generate tags for the Insight Tcl sources, if they are in the tree.

Ok to commit?

2000-11-21  Tom Tromey  <tromey@cygnus.com>

	* Makefile.in (TAGS): Correctly find gdbtk*.c files.  Also,
	generate tags for gdbtk Tcl sources.

Tom

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.47
diff -u -r1.47 Makefile.in
--- Makefile.in	2000/11/10 23:02:56	1.47
+++ Makefile.in	2000/11/21 23:46:01
@@ -871,11 +871,17 @@
 	  $(srcdir)/$(XM_FILE) \
 	  $(srcdir)/$(NAT_FILE) \
 	`(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
-		echo $(srcdir)/$$i ; \
+		case "$$i" in \
+		  gdbtk*) echo $(srcdir)/gdbtk/generic/$$i ;; \
+		  *) echo $(srcdir)/$$i ;; \
+		esac; \
 	done ; for i in $(TAGFILES_WITH_SRCDIR); do \
 		echo $$i ; \
 	done) | sed -e 's/\.o$$/\.c/'` \
-	`find $(srcdir)/config -name '*.h' -print`
+	`find $(srcdir)/config -name '*.h' -print` \
+	--lang=none \
+	--regex='/[ \t]*\(proc\|method\|itcl_class\|body\)[ \t]+\([^ \t]+\)/\1/' \
+	`find $(srcdir)/gdbtk \( -name '*.tcl' -o -name '*.ith' -o -name '*.itb' \) -print`
 
 tags: TAGS
 

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