This is the mail archive of the gdb-patches@sourceware.org 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]

make TAGS "skipping ./: it is not a regular file"


Remember this:

   http://sourceware.org/ml/gdb-patches/2012-08/msg00504.html

?

Back then I didn't dig deep enough into the second item.  Now I did.
The problem is here:

  GDB_NM_FILE = @GDB_NM_FILE@
  TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR)
	  @echo Making TAGS
	  @etags $(srcdir)/$(GDB_NM_FILE) \
	  `(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
		  echo $(srcdir)/$$i ; \
	  done ; for i in $(TAGFILES_WITH_SRCDIR); do \
		  echo $$i ; \
	  done) | sed -e 's/\.o$$/\.c/'` \
	  `find $(srcdir)/config -name '*.h' -print`

If GDB_NM_FILE is empty, the first argument to etags is just
$(srcdir)/, which is a directory.

The patch below fixes that.  If someone has a better/cleaner/more
elegant idea, I'm all ears.

OK to commit to the trunk?

2013-04-02  Eli Zaretskii  <eliz@gnu.org>

	* Makefile.in (TAGS): If GDB_NM_FILE is empty, don't pass it
          to etags.

--- gdb/Makefile.in~0	2013-04-02 11:35:49.142382400 +0300
+++ gdb/Makefile.in	2013-04-02 20:22:23.018050500 +0300
@@ -1209,7 +1209,7 @@
 GDB_NM_FILE = @GDB_NM_FILE@
 TAGS: $(TAGFILES_NO_SRCDIR) $(TAGFILES_WITH_SRCDIR)
 	@echo Making TAGS
-	etags $(srcdir)/$(GDB_NM_FILE) \
+	etags `(test -n "$(GDB_NM_FILE)" && echo "$(srcdir)/$(GDB_NM_FILE)")` \
 	`(for i in $(DEPFILES) $(TAGFILES_NO_SRCDIR); do \
 		echo $(srcdir)/$$i ; \
 	done ; for i in $(TAGFILES_WITH_SRCDIR); do \


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