Subject: Re: bug#7824: 1.11 doesn't add sources with nonstandard suffixes when making a binary

From: "ralf.wildenhues" <[email-masked]>
Date: Thu, 13 Jan 2011 20:07:41 +0100

* Юрий Пухальский wrote on Wed, Jan 12, 2011 at 03:21:11PM CET:
> -----------------------------
> SUFFIXES = .pc
> 
> .pc.lo:
> 	cp $(srcdir)/$*.pc $(builddir)/$*.c
> 	$(LTCOMPILE) -c $(builddir)/$*.c
> 	rm -f $(builddir)/$*.c
> 
> noinst_PROGRAMS = 1 2
> 
> 1_SOURCES = 1.pc

Program sources are not compiled into .lo files, but into .$(OBJEXT)
files.  So you would need a .pc.$(OBJEXT) rule.  You can use $(COMPILE)
instead of $(LTCOMPILE).

> db_src = 1.pc
> 2_SOURCES = dummy.c
> 2_LDADD = $(db_src:.pc=.lo)
> -----------------------------
> 1 is not built:
> --------------------------------
> devfe:~/tmp/test>make
> /bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2   -o 1
> libtool: link: gcc -g -O2 -o 1
> gcc: no input files
> make: *** [1] Error 1