This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: libiberty TAGS


On Jun 18, 2015, at 1:35 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Mike Stump <mikestump@comcast.net> writes:
> 
>> +       cd $(srcdir) && etags `for i in $(CFILES); do echo $(srcdir)/$$i ; done`
> 
> This doesn't work with a relative $(srcdir).

Sure it does.  I had tested with:

srcdir = ../../gcc/libiberty

which is a pretty typical relative srcdir, is it not?

Anyway, I see your point.  How about:

diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index f06cc69..11e5ce6 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -409,8 +409,9 @@ stamp-noasandir:
 
 etags tags: TAGS etags-subdir
 
+VPATH = @srcdir@
 TAGS: $(CFILES)
-       etags `for i in $(CFILES); do echo $(srcdir)/$$i ; done`
+       cd $(srcdir) && etags $(CFILES)
 
 # The standalone demangler (c++filt) has been moved to binutils.
 # But make this target work anyway for demangler hacking.

Ok?

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