This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Two libraries from the same sources


Hello, Tom!

> Pavel> Thank you! This is exactly what I need.
> Pavel> However...
> Pavel> There is a rule for test1-test1.o, but it is empty!
> 
> Thanks, I've fixed this.

Thank you! It is much better!

I've already started hacking (unhacking?) the GNU GRUB.

There are following defects with the same example.

 Makefile.am:
AUTOMAKE_OPTIONS = foreign
bin_PROGRAMS = test1
test1_SOURCES = test1.c
test1_CFLAGS = -DXM12

 configure.in:
AC_INIT
AM_INIT_AUTOMAKE(test, 0.1)
AC_PROG_CC
AC_OUTPUT(Makefile)

$ automake && grep test1-test1 Makefile.in 
am_test1_OBJECTS =  test1-test1.o
test1-test1.o: test1.c
test1-test1.o: test1.c
test1-test1.lo: test1.c

Defect 1. There are two rules for test1-test1.o
One of them is empty, the other is not.

Defect 2. There is a rule for test1-test1.lo but libtool is not mentioned
anywhere.

Defect 3. The rule for test1-test1.o lacks $(CFLAGS)
In my opinion, $(CFLAGS) should be there because:
1) $(CPPFLAGS) is there anyway
2) Setting CFLAGS is supposed to affect every invocation of the C compiler
3) $(CFLAGS) rarely contains something which one wants to disable for
paricular objects.

Hopefully, this is not hard to fix.

Best wishes,
Pavel Roskin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]