diff mbox

libiberty TAGS

Message ID A66644EF-2C0B-4669-B210-6AA5916303A7@comcast.net
State New
Headers show

Commit Message

Mike Stump June 18, 2015, 8:54 p.m. UTC
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:


Ok?
diff mbox

Patch

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.