automake
[Top][All Lists]
Advanced

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

Re: [revised patch 1/1] support AC_SUBST'able automake rules


From: Michael Bletzinger
Subject: Re: [revised patch 1/1] support AC_SUBST'able automake rules
Date: Fri, 09 Feb 2001 11:18:51 -0600

"Lars J. Aas" wrote:
> 
> On Fri, Feb 09, 2001 at 10:48:38AM -0600, Michael Bletzinger wrote:
> : The thing is, that since every AC_SUBST'd variable is transformed into a
> : make variable, you can already specify all sorts of derived stuff using
> : make variables in Makefile.am's with the CVS automake. For example:
> :
> : in the configure.in
> :
> : AC_SUBST(arch)
> : AC_SUBST(nonthreaded)
> : AC_SUBST(nonthreaded_sources)
> :
> :
> : and in the Makefile.am
> :
> : foo_SOURCES = foo.c fee_$(arch).c
> :
> : lib_LTLIBRARIES = libfoo_$(nonthreaded).la
> :
> : libfoo___nonthreaded__la_SOURCES = foo.c $(nonthreaded_sources)
> 
> Ah, I missed this "hack" when I started trying.  I don't consider it to
> be "supported", though, since you need to transform the characters...
> 
> : So I'm not sure that doing autoconf substitution really adds anything.
> 
> If nothing else, it will de-obfuscate such hacks as the one above :)

Well one person's hack is another person's cool trick :-)

On the minus side using an autoconf substitution limits the characters
you can use for target names because the name has to translate to a make
variable.  That's why the character transformation is in automake.

On the plus side using autoconf will resolve all of the targets after
configure is run while using make variables will postpone the resolution
until the make install step.

I don't have a problem with your patch.  I just want to collect enough
information so that these things can be written up in the docs.

        Michael

> 
>   Lars J
> --
> Innovation is one percent inspiration and ninetynine percent perspiration,
> and in my case; twice that...  -- Norville Barnes, `The Hudsucker Proxy'

-- 
------------------------------------------------------------------
Michael Bletzinger      Software Developer, Alliance Computational
address@hidden  Environment & Security
217 265 5137            NCSA



reply via email to

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