[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overriding Automake rules inn Makefile.am.
From: |
Lars J. Aas |
Subject: |
Re: Overriding Automake rules inn Makefile.am. |
Date: |
Thu, 19 Jul 2001 11:33:34 +0200 |
User-agent: |
Mutt/1.2.5i |
On Wed, Jul 18, 2001 at 10:04:01PM -0600, Tom Tromey wrote:
: >>>>> "Lars" == Lars J Aas <address@hidden> writes:
: Lars> I'm adding make-rules to Automake.am that override rules that
: Lars> Automake generate (a non-standard-name library build rule). I
: Lars> figured Automake would pick up on this and not output the rule,
: Lars> but it doesn't, so GNU make warns about duplicate rules.
:
: Do you have a simple test case?
: This ought to work.
It actually does, until I add an @AC_SUBST@ into the target name.
In this example, I use a nonstandard library name, but it doesn't
matter -- it's still duplicated if it's called "address@hidden@.a"
Lars J
# configure.ac
AC_INIT(fakelib,0.0)
AC_PROG_CC
RANLIB=:
AC_SUBST(RANLIB)
AM_INIT_AUTOMAKE(fakelib,0.0)
SUBST=hei
AC_SUBST(SUBST)
AC_CONFIG_FILES(Makefile)
AC_OUTPUT
# Makefile.am
noinst_LIBRARIES = address@hidden@.lib
address@hidden@_lib_SOURCES = abra.c kadabra.c
# then we override the target rule:
address@hidden@.lib: Makefile $(address@hidden@_lib_OBJECTS)
$(address@hidden@_lib_DEPENDENCIES)
@echo here we do some custom stuff, instead of invoking the linker