Subject: [FYI 2/2] {maint} coverage: better exposure for automake bug#12372 (tags-related)

From: Stefano Lattarini <[email-masked]>
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: Юрий Пухальский <[email-masked]>
Signed-off-by: Stefano Lattarini <[email-masked]>
---
 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@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