[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automake 1.5
Gary V. Vaughan
Re: Automake 1.5
Sat, 1 Sep 2001 11:28:19 +0100
On Fri, Aug 31, 2001 at 08:32:31AM +0200, Tim Van Holder wrote:
> On 30 Aug 2001 20:15:02 +0100, Gary V. Vaughan wrote:
> > On Thu, Aug 30, 2001 at 01:38:40PM +0200, Akim Demaille wrote:
> > >
> > > | 29 m4_SOURCES = main.c m4.h freeze.c stackovf.c $(M4OBJS)
> > >
> > M4OBJS=
> > m4_pattern_allow([^m4_getopt_h$])
> > m4_getopt_h=src/getopt.h
> > rm -f $m4_getopt_h
> > AC_CHECK_FUNC(getopt_long, ,
> > [M4OBJS="getopt1.$ac_objext getopt.$ac_objext"
> > echo linking src/gnu-getopt.h to $m4_getopt_h
> > $LN_S ./gnu-getopt.h $m4_getopt_h])
> > AC_SUBST(M4OBJS)
> > The Makefile.am snippet is in the quote above, and relies on
> > automake's property of creating a make variable from every AC_SUBST.
> > Obviously, this has worked until we upgraded to automake-1.5. Any
> > advice?
> If I remember correctly, automake needs to know about all the sources so
> it can properly set up compilation, dependency tracking, etc.
> In cases like this, I think you're supposed to use
> EXTRA_m4_SOURCES = getopt1.c getopt.c
> m4_LDADD = $(M4OBJS)
> in Makefile.am (the configure.ac snippet can remain unchanged
I think this info must have been lurking in my subconcious, since we
already had the EXTRA_m4_SOURCES declaration. Moving the $(M4OBJS)
reference from m4_SOURCES to m4_LDADD does allow Automake 1.5 to parse
out Makefile.am again though. Thanks!
Was this a deliberate change in semantics to enforce some sanity
(which is fine), or would you not rather keep compatibility with
version 1.4 (which seems to just ignore variables in this case)?
> using AC_CONFIG_LINKS instead of a manual echo/$LN_S might be nice).
> That way, automake can do its magic based on the source files, and will
> build and link them as required.
Good call! Done.
())_. Gary V. Vaughan gary@(oranda.demon.co.uk|gnu.org)
( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____
/ )= GNU Hacker http://www.gnu.org/software/libtool \' `&
`(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/
|[Prev in Thread]
||[Next in Thread]|
- Re: Automake 1.5,
Gary V. Vaughan <=