From 9c4ad6973eedb074a9381e14a6c1eeeb285c2465 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Tue, 11 Sep 2012 11:15:41 +0200 Subject: [PATCH] coverage: better exposure for automake bug#12372 (tags-related) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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: Юрий Пухальский Signed-off-by: Stefano Lattarini --- 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 c20feadf2..6effe7700 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 d46927e5d..66b40a096 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 -- 2.47.2