GNU bug report logs - #12372
arbitrary suffix sources are not added to the tags

Previous Next

Package: automake;

Reported by: Юрий Пухальский <aikipooh <at> gmail.com>

Date: Thu, 6 Sep 2012 15:12:01 UTC

Severity: minor

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12372 in the body.
You can then email your comments to 12372 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#12372; Package automake. (Thu, 06 Sep 2012 15:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Юрий Пухальский <aikipooh <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Thu, 06 Sep 2012 15:12:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Юрий Пухальский <aikipooh <at> gmail.com>
To: bug-automake <at> gnu.org
Subject: arbitrary suffix sources are not added to the tags
Date: Thu, 6 Sep 2012 19:11:10 +0400
So the .am file is like this:

.POSIX:

SUFFIXES = .pc

.pc.lo:
	cp $*.pc $*.c
	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS)
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $@ $*.c
	rm -f $*.c

CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
	$(LDFLAGS) -o $@

noinst_LTLIBRARIES=libfoo.la

libfoo_la_SOURCES=foo.pc bar.c

The libfoo_la_SOURCES are not added to the tags list and the tags
goals are not generated:

excerpt from the Makefile.in
---------
tags: TAGS
TAGS:

ctags: CTAGS
CTAGS:
---------

Adding them to the TAGS_FILES explicitly (as Stefano had advised)
doesn't help. It seems that it's being overridden.

---------- Forwarded message ----------
From: Юрий Пухальский <aikipooh <at> gmail.com>
Date: Mon, Jul 23, 2012 at 4:49 PM
Subject: bug#7824: Automatic chaining of make suffix rules (was: Re:
bug#7824: won't fix)
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 7824 <at> debbugs.gnu.org, Automake List <automake <at> gnu.org>


On Mon, Jul 23, 2012 at 4:42 PM, Stefano Lattarini
<stefano.lattarini <at> gmail.com> wrote:
> [Re-adding the list, as this discussion is worth being registered in
> the archives IMHO]
>
Ok.

>>>> The situation is that both of the approaches (.pc.c rule and .pc.lo
>>>> rule) have problems entailed.
>>>
>>>>  * .pc.lo rule doesn't create tags for *.pc sources.
>>>>
>>> Try to add the relevant '.pc' files to $(TAGS_FILES) explicitly.  It should
>>> solve your issue.  If it doesn't, you've found a new Automake bug, which I
>>> will gladly fix :-)
>>
>> Ah, ok! I knew there must be something like that.
>> But why in the first place it doesn't do it automatically? I have it
>> in the _SOURCES… Is it afraid of the .pc extension?
>>
> I'm not sure actually.  Might be a tiny bug in automake.  Care to open a
> new report about the issue, so I won't forget?  I'll get to it eventually,
> but not right now.

-- 
«Every person has a certain horizon. When it narrows and becomes
infinitely small, it changes into a point and then the person says:
“This is my point of view.”»




Information forwarded to bug-automake <at> gnu.org:
bug#12372; Package automake. (Fri, 07 Sep 2012 09:17:02 GMT) Full text and rfc822 format available.

Message #8 received at 12372 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Юрий Пухальский <aikipooh <at> gmail.com>
Cc: 12372 <at> debbugs.gnu.org,
	"automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#12372: arbitrary suffix sources are not added to the tags
Date: Fri, 07 Sep 2012 11:16:03 +0200
severity 12372 minor
close 12372
thanks

On 09/06/2012 05:11 PM, Юрий Пухальский wrote:
> So the .am file is like this:
> 
> .POSIX:
> 
> SUFFIXES = .pc
> 
> .pc.lo:
> 	cp $*.pc $*.c
> 	$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile
> $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS)
> $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o $@ $*.c
> 	rm -f $*.c
> 
> CCLD = $(CC)
> LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
> 	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
> 	$(LDFLAGS) -o $@
> 
> noinst_LTLIBRARIES=libfoo.la
> 
> libfoo_la_SOURCES=foo.pc bar.c
> 
> The libfoo_la_SOURCES are not added to the tags list and the tags
> goals are not generated:
>
I'm not able to reproduce this failure with the latest version of Automake
(1.12.4).  In fact ...

> excerpt from the Makefile.in
> ---------
> tags: TAGS
> TAGS:
> 
> ctags: CTAGS
> CTAGS:
> ---------
>
... in my case, the generated makefile reads:

  ctags: CTAGS
  CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
		$(TAGS_FILES) $(LISP)
	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
	unique=`for i in $$list; do \
	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
	  done | \
	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
	      END { if (nonempty) { for (i in files) print i; }; }'`; \
	test -z "$(CTAGS_ARGS)$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$unique

(and similarly for TAGS/tags), which is correct.

Anyway, I've added a new test case (see patch below) to check against this
bug, to ensure it won't surreptitiously represent itself.

In case the problem persists for you also with Autoamke 1.12.4, feel free
to re-open this ticket.

Thanks,
  Stefano

> Adding them to the TAGS_FILES explicitly (as Stefano had advised)
> doesn't help. It seems that it's being overridden.
> 
> ---------- Forwarded message ----------
> From: Юрий Пухальский <aikipooh <at> gmail.com>
> Date: Mon, Jul 23, 2012 at 4:49 PM
> Subject: bug#7824: Automatic chaining of make suffix rules (was: Re:
> bug#7824: won't fix)
> To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
> Cc: 7824 <at> debbugs.gnu.org, Automake List <automake <at> gnu.org>
> 
> 
> On Mon, Jul 23, 2012 at 4:42 PM, Stefano Lattarini
> <stefano.lattarini <at> gmail.com> wrote:
>> [Re-adding the list, as this discussion is worth being registered in
>> the archives IMHO]
>>
> Ok.
> 
>>>>> The situation is that both of the approaches (.pc.c rule and .pc.lo
>>>>> rule) have problems entailed.
>>>>
>>>>>  * .pc.lo rule doesn't create tags for *.pc sources.
>>>>>
>>>> Try to add the relevant '.pc' files to $(TAGS_FILES) explicitly.  It should
>>>> solve your issue.  If it doesn't, you've found a new Automake bug, which I
>>>> will gladly fix :-)
>>>
>>> Ah, ok! I knew there must be something like that.
>>> But why in the first place it doesn't do it automatically? I have it
>>> in the _SOURCES… Is it afraid of the .pc extension?
>>>
>> I'm not sure actually.  Might be a tiny bug in automake.  Care to open a
>> new report about the issue, so I won't forget?  I'll get to it eventually,
>> but not right now.
> 

-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----8<-----

From 94b7b8ecd4bae85782b45a9bb36f42c4d2b93805 Mon Sep 17 00:00:00 2001
Message-Id: <94b7b8ecd4bae85782b45a9bb36f42c4d2b93805.1347009166.git.stefano.lattarini <at> gmail.com>
From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Date: Fri, 7 Sep 2012 10:42:42 +0200
Subject: [PATCH] coverage: expose automake bug#12372 (tags-related)

That bug is somehow already been fixed in the latest automake
version (1.12.4); but exercise it anyway in the testsuite, to
ensure we won't regress.

* t/tags-pr12372.sh: New test.
* t/list-of-tests.mk: Add it.

Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
---
 t/list-of-tests.mk |  1 +
 t/tags-pr12372.sh  | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100755 t/tags-pr12372.sh

diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 8e1093a..c20fead 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -1154,6 +1154,7 @@ t/tap-summary-color.sh \
 t/tags.sh \
 t/tags2.sh \
 t/tagsub.sh \
+t/tags-pr12372.sh \
 t/tar.sh \
 t/tar2.sh \
 t/tar3.sh \
diff --git a/t/tags-pr12372.sh b/t/tags-pr12372.sh
new file mode 100755
index 0000000..d46927e
--- /dev/null
+++ b/t/tags-pr12372.sh
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure tags are processed also for files with non-standard
+# extensions.  See automake bug#12372.
+
+required='cc etags'
+. ./defs || exit 1
+
+cat >> configure.ac <<'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+all-local: tags
+.pc.o:
+	sed -e 's/\[/{/' -e 's/\]/}/' $(srcdir)/$*.pc >$*.c
+	$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $*.c
+	rm -f $*.c
+
+LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
+noinst_PROGRAMS = foo
+foo_SOURCES = foo-main.pc barbar.c
+END
+
+echo 'int main(void) [ return bar(1); ]' > foo-main.pc
+echo 'int bar(int x) { return !x; }' > barbar.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+cat TAGS
+$FGREP foo-main.pc TAGS
+$FGREP barbar.c TAGS
+
+$MAKE distcheck
+
+:
-- 
1.7.12




Severity set to 'minor' from 'normal' Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 07 Sep 2012 09:17:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 12372 <at> debbugs.gnu.org and Юрий Пухальский <aikipooh <at> gmail.com> Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 07 Sep 2012 09:17:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#12372; Package automake. (Fri, 07 Sep 2012 11:45:02 GMT) Full text and rfc822 format available.

Message #15 received at 12372 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Юрий Пухальский <aikipooh <at> gmail.com>
Cc: 12372 <at> debbugs.gnu.org
Subject: Re: bug#12372: arbitrary suffix sources are not added to the tags
Date: Fri, 07 Sep 2012 13:44:13 +0200
[Re-adding the list, please keep it in the loop in future answers]

On 09/07/2012 01:16 PM, Юрий Пухальский wrote:
> Ok, got it.
>
> The automake version i've tried is 1.12.3, the latest available
> from the site.
> 
> If there is .pc.lo rule, .pc don't get into the tags and for .pc-only
> sourced libraries nothing gets to the tags.
> But if i add .c file to the sources, the target is generated and all
> the sources go there alongside this .c file.
> 
> If there is no .pc.lo rule, .pc go to the tags regardless whether
> there is .c file with them or not.
> 
> The makefile to play is like this:
> 
> SUFFIXES = .pc
> .pc.lo:
>         touch $*.lo
> noinst_LTLIBRARIES=libfoo.la
> libfoo_la_SOURCES=foo.pc # bar.c
> 
I'll try to get a better look this evening or tomorrow.

Thanks,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#12372; Package automake. (Tue, 11 Sep 2012 09:26:02 GMT) Full text and rfc822 format available.

Message #18 received at 12372 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Юрий Пухальский <aikipooh <at> gmail.com>
Cc: 12372 <at> debbugs.gnu.org
Subject: Re: bug#12372: arbitrary suffix sources are not added to the tags
Date: Tue, 11 Sep 2012 11:24:32 +0200
On 09/07/2012 01:44 PM, Stefano Lattarini wrote:
> [Re-adding the list, please keep it in the loop in future answers]
> 
> On 09/07/2012 01:16 PM, Юрий Пухальский wrote:
>> Ok, got it.
>>
>> The automake version i've tried is 1.12.3, the latest available
>> from the site.
>>
>> If there is .pc.lo rule, .pc don't get into the tags and for .pc-only
>> sourced libraries nothing gets to the tags.
>> But if i add .c file to the sources, the target is generated and all
>> the sources go there alongside this .c file.
>>
>> If there is no .pc.lo rule, .pc go to the tags regardless whether
>> there is .c file with them or not.
>>
>> The makefile to play is like this:
>>
>> SUFFIXES = .pc
>> .pc.lo:
>>         touch $*.lo
>> noinst_LTLIBRARIES=libfoo.la
>> libfoo_la_SOURCES=foo.pc # bar.c
>>
> I'll try to get a better look this evening or tomorrow.
> 
OK, with your new information, I can reproduce the bug in the maint
branch of Automake  But luckily, the overhauling of tags support done
in master has fixed it there already, so the bug will be gone in 1.13.
Thus I'm not reopening this ticket.

Patches exposing the bug in maint and documenting its fixing in master
(with a NEWS entry) will follow shorty.

Thanks,
  Stefano




Information forwarded to bug-automake <at> gnu.org:
bug#12372; Package automake. (Tue, 11 Sep 2012 09:42:01 GMT) Full text and rfc822 format available.

Message #21 received at 12372 <at> debbugs.gnu.org (full text, mbox):

From: Юрий Пухальский <aikipooh <at> gmail.com>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>
Cc: 12372 <at> debbugs.gnu.org
Subject: Re: bug#12372: arbitrary suffix sources are not added to the tags
Date: Tue, 11 Sep 2012 13:40:37 +0400
Ok, nice to hear:)
Thank you for your effort!

PS. I've started the ticket at Autstin about chain rules and the POSIX
standard. We'll see what they tell.

On Tue, Sep 11, 2012 at 1:24 PM, Stefano Lattarini
<stefano.lattarini <at> gmail.com> wrote:
> On 09/07/2012 01:44 PM, Stefano Lattarini wrote:
>> [Re-adding the list, please keep it in the loop in future answers]
>>
>> On 09/07/2012 01:16 PM, Юрий Пухальский wrote:
>>> Ok, got it.
>>>
>>> The automake version i've tried is 1.12.3, the latest available
>>> from the site.
>>>
>>> If there is .pc.lo rule, .pc don't get into the tags and for .pc-only
>>> sourced libraries nothing gets to the tags.
>>> But if i add .c file to the sources, the target is generated and all
>>> the sources go there alongside this .c file.
>>>
>>> If there is no .pc.lo rule, .pc go to the tags regardless whether
>>> there is .c file with them or not.
>>>
>>> The makefile to play is like this:
>>>
>>> SUFFIXES = .pc
>>> .pc.lo:
>>>         touch $*.lo
>>> noinst_LTLIBRARIES=libfoo.la
>>> libfoo_la_SOURCES=foo.pc # bar.c
>>>
>> I'll try to get a better look this evening or tomorrow.
>>
> OK, with your new information, I can reproduce the bug in the maint
> branch of Automake  But luckily, the overhauling of tags support done
> in master has fixed it there already, so the bug will be gone in 1.13.
> Thus I'm not reopening this ticket.
>
> Patches exposing the bug in maint and documenting its fixing in master
> (with a NEWS entry) will follow shorty.
>
> Thanks,
>   Stefano



-- 
«Every person has a certain horizon. When it narrows and becomes
infinitely small, it changes into a point and then the person says:
“This is my point of view.”»




Information forwarded to bug-automake <at> gnu.org:
bug#12372; Package automake. (Tue, 11 Sep 2012 09:48:02 GMT) Full text and rfc822 format available.

Message #24 received at 12372 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: automake-patches <at> gnu.org
Cc: 12372 <at> debbugs.gnu.org, aikipooh <at> gmail.com
Subject: [FYI 1/2] {maint} coverage: expose automake bug#12372 (tags-related)
Date: Tue, 11 Sep 2012 11:46:06 +0200
That bug is somehow already been fixed in the latest automake
version (1.12.4); but exercise it anyway in the testsuite, to
ensure we won't regress.

* t/tags-pr12372.sh: New test.
* t/list-of-tests.mk: Add it.

Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
---
 t/list-of-tests.mk |  1 +
 t/tags-pr12372.sh  | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100755 t/tags-pr12372.sh

diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 8e1093a..c20fead 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -1154,6 +1154,7 @@ t/tap-summary-color.sh \
 t/tags.sh \
 t/tags2.sh \
 t/tagsub.sh \
+t/tags-pr12372.sh \
 t/tar.sh \
 t/tar2.sh \
 t/tar3.sh \
diff --git a/t/tags-pr12372.sh b/t/tags-pr12372.sh
new file mode 100755
index 0000000..d46927e
--- /dev/null
+++ b/t/tags-pr12372.sh
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure tags are processed also for files with non-standard
+# extensions.  See automake bug#12372.
+
+required='cc etags'
+. ./defs || exit 1
+
+cat >> configure.ac <<'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+all-local: tags
+.pc.o:
+	sed -e 's/\[/{/' -e 's/\]/}/' $(srcdir)/$*.pc >$*.c
+	$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $*.c
+	rm -f $*.c
+
+LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
+noinst_PROGRAMS = foo
+foo_SOURCES = foo-main.pc barbar.c
+END
+
+echo 'int main(void) [ return bar(1); ]' > foo-main.pc
+echo 'int bar(int x) { return !x; }' > barbar.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+cat TAGS
+$FGREP foo-main.pc TAGS
+$FGREP barbar.c TAGS
+
+$MAKE distcheck
+
+:
-- 
1.7.12





Information forwarded to bug-automake <at> gnu.org:
bug#12372; Package automake. (Tue, 11 Sep 2012 09:48:02 GMT) Full text and rfc822 format available.

Message #27 received at 12372 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: automake-patches <at> gnu.org
Cc: 12372 <at> debbugs.gnu.org, aikipooh <at> gmail.com
Subject: [FYI 2/2] {maint} coverage: better exposure for automake bug#12372
	(tags-related)
Date: Tue, 11 Sep 2012 11:46:07 +0200
Alas, in contrast with what is said in the commit message of previous
commit 'v1.12.3-14-g94b7b8e', that bug is still present also in the
current maint branch (which will become automake version 1.12.4); it
is just that it only triggers when a _SOURCES variable contains only
files with custom extension.

* t/tags-pr12372.sh: Extend.
* t/list-of-tests.mk: Add it.

Suggested-by: Юрий Пухальский <aikipooh <at> gmail.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
---
 t/list-of-tests.mk |  1 +
 t/tags-pr12372.sh  | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index c20fead..6effe77 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -41,6 +41,7 @@ t/pr8365-remake-timing.sh \
 t/lex-subobj-nodep.sh \
 t/remake-am-pr10111.sh \
 t/remake-m4-pr10111.sh \
+t/tags-pr12372.sh \
 t/txinfo5.sh \
 $(perl_fake_XFAIL_TESTS)
 
diff --git a/t/tags-pr12372.sh b/t/tags-pr12372.sh
index d46927e..66b40a0 100755
--- a/t/tags-pr12372.sh
+++ b/t/tags-pr12372.sh
@@ -22,6 +22,7 @@ required='cc etags'
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
+AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
 END
 
@@ -35,10 +36,25 @@ all-local: tags
 LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
 noinst_PROGRAMS = foo
 foo_SOURCES = foo-main.pc barbar.c
+SUBDIRS = sub
+END
+
+mkdir sub
+cat > sub/Makefile.am <<'END'
+all-local: tags
+.pc.o:
+	sed -e 's/@/a/g' $(srcdir)/$*.pc >$*.c
+	$(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c $*.c
+	rm -f $*.c
+
+LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@
+noinst_PROGRAMS = zap
+zap_SOURCES = zardoz.pc
 END
 
 echo 'int main(void) [ return bar(1); ]' > foo-main.pc
 echo 'int bar(int x) { return !x; }' > barbar.c
+echo 'int m <at> in(void) { return 0; }' > sub/zardoz.pc
 
 $ACLOCAL
 $AUTOCONF
@@ -48,8 +64,10 @@ $AUTOMAKE
 
 $MAKE
 cat TAGS
+cat sub/TAGS
 $FGREP foo-main.pc TAGS
 $FGREP barbar.c TAGS
+$FGREP zardoz.pc sub/TAGS
 
 $MAKE distcheck
 
-- 
1.7.12





Information forwarded to bug-automake <at> gnu.org:
bug#12372; Package automake. (Tue, 11 Sep 2012 09:50:02 GMT) Full text and rfc822 format available.

Message #30 received at 12372 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: automake-patches <at> gnu.org
Cc: 12372 <at> debbugs.gnu.org, aikipooh <at> gmail.com
Subject: [FYI] {master} tags: automake bug bug#12372 is fixed
Date: Tue, 11 Sep 2012 11:48:48 +0200
It has been fixed as a side effect of the overhauling of tags support.

* t/list-of-tests.mk (XFAIL_TESTS): No longer list 'tags-pr12372.sh'.
* NEWS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini <at> gmail.com>
---
 NEWS               | 5 +++++
 t/list-of-tests.mk | 1 -
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index f243d8c..46aa8cd 100644
--- a/NEWS
+++ b/NEWS
@@ -127,10 +127,15 @@ New in 1.13:
     specifying the name of such targets in invocations of the new
     'AM_EXTRA_RECURSIVE_TARGETS' m4 macro.
 
+* Tags:
+
   - Any failure in the recipe of the "tags", "ctags", "cscope" or
     "cscopelist" targets in a subdirectory is now propagated to the
     top-level make invocation.
 
+  - Tags are correctly computed also for files in _SOURCES variables that
+    only list files with non-standard suffixes (see automake bug#12372).
+
 * Improvements to aclocal and related rebuilds rules:
 
   - The Autoconf-provided macro AC_CONFIG_MACRO_DIR is now traced by
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index c024171..3708ef7 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -41,7 +41,6 @@ t/pr8365-remake-timing.sh \
 t/lex-subobj-nodep.sh \
 t/remake-am-pr10111.sh \
 t/remake-m4-pr10111.sh \
-t/tags-pr12372.sh \
 t/txinfo5.sh \
 $(perl_fake_XFAIL_TESTS)
 
-- 
1.7.12





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 09 Oct 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 255 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.