automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libs.am/AR = ar


From: Ralf Corsepius
Subject: Re: libs.am/AR = ar
Date: 09 May 2002 08:50:34 +0200

Am Don, 2002-05-09 um 06.40 schrieb Tom Tromey:
> >>>>> "Ralf" == Ralf Corsepius <address@hidden> writes:
> 
> Ralf> Simple question:
> Ralf> Why is AR = ar hard-coded into libs.am?
> 
> In theory it shouldn't matter.  If you redefine it, even in
> configure.in, your redefinition should have precedence.  If this
> doesn't happen, then that is a bug. 
Now, things are becoming fishy (cf. below)


> If it doesn't happen in 1.6.1,
> I'll fix it for 1.6.2.  Can you check?

With a simple test-case I can't reproduce the problem (autoconf-2.52 +
automake-1.6.1):

# ./configure --host=sparc-rtems
..
checking for sparc-rtems-ar... sparc-rtems-ar
..
# make
source='hello.c' object='hello.o' libtool=no \
depfile='.deps/hello.Po' tmpdepfile='.deps/hello.TPo' \
depmode=gcc3 /bin/sh ./depcomp \
sparc-rtems-gcc       -g -O2 -c `test -f 'hello.c' || echo './'`hello.c
rm -f libhello.a
sparc-rtems-ar cru libhello.a hello.o 
sparc-rtems-ranlib libhello.a

# grep AR Makefile
[..]
AR = sparc-rtems-ar
noinst_LIBRARIES = libhello.a
LIBRARIES = $(noinst_LIBRARIES)
libhello_a_AR = $(AR) cru
[..]

# grep AR@ config.status
[..]
s,@AR@,sparc-rtems-ar,;t t
s,@ac_ct_AR@,,;t t

What is ac_ct_AR? Where does it come from?


But the real-world example exhibits the problem:
# ../../../../../cpukit-standalone/cpukit/libfs/configure 
--prefix=/opt/rtems --host=sparc-rtems --build=i686-pc-linux-gnu
--target=sparc-rtems --disable-multilib 
--with-target-subdir=sparc-rtems --exec-prefix=/opt/rtems/sparc-rtems
..
checking for sparc-rtems-ar... sparc-rtems-ar
..
# make
ar cru libimfs.a  [...]
sparc-rtems-ranlib libimfs.a


# grep AR src/imfs/Makefile
[..]
libimfs_a_AR = $(AR) cru
AR = ar
[..]
Note: For some reason the order is different than above.

# grep @AR@ config.status 
[..]
s,@AR@,sparc-rtems-ar,;t t

Note: No ac_ct_AR?


Furthermore:

"automake" doesn't emit a warning nor error, neither for the simple
example nor the real-world code.

But "automake -v" does for the simple example:
...
automake: refusing to override the user definition of:

  AR (User, where = aclocal.m4:757) =
  {
    TRUE => @AR@
  }
automake: with `TRUE' => `ar'
..

And does not for the real-world code.


Using autoconf-2.52 + automake-1-6-branch gives the same results wrt.
this. (automake emits errors in other neighboring config-subdirs and
even emits a perl error at one place.)

Ralf






reply via email to

[Prev in Thread] Current Thread [Next in Thread]