Subject: arbitrary suffix sources are not added to the tags

From: Юрий Пухальский <[email-masked]>
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: Юрий Пухальский <[email-masked]>
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 <[email-masked]>
Cc: [email-masked], Automake List <[email-masked]>

On Mon, Jul 23, 2012 at 4:42 PM, Stefano Lattarini
<[email-masked]> 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.”»