automake
[Top][All Lists]
Advanced

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

automake and AC_CONFIG_FILES templates


From: Harlan Stenn
Subject: automake and AC_CONFIG_FILES templates
Date: Wed, 12 Jun 2002 04:13:50 -0400
User-agent: EMH/1.10.0 SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd)

An application I'm working with preprocesses the Makefile.am's to find the
ones that build libraries, and creates a file that contains the path to each
library:

 libfoo_la_LIBDEP = /path/to/libfoo.la
 libbar_la_LIBDEP = /path/to/libbar.la
 ...
 ALL_LIBS = \
        /path/to/libfoo.la \
        /path/to/libbar.la \
        ...

and then each Makefile.am simply lists the needed lib*_la_LIBDEPs as
dependencies and LDADDs.

As was discussed in an earlier email, one problem with this is that putting
the "include" of this info first in the Makefile.am is not "early" enough -
automake puts the dependency rules even earlier in the generated Makefile.in
so that when the dependencies are scanned the variables are "empty", but
when it comes time to link things the valuise are instantiated, causing the
link to fail.

(I know this was failing in automake-1.5; I won't be able to test if this is
still the case in the 1.6.* stuff for at least a week).

I was attempting to solve this problem using:

  AC_CONFIG_FILES(Makefile:global-vars.mk:Makefile.in)

where "global-vars.mk" would handle fetching the library dependency variable
definitions first, followed by the rest of the Makefile.in.

Unfortunately, automake 1.5 and 1.6.1b are unable to determine that I want
to have it convert Makefile.am to Makefile.in using this style of
AC_CONFIG_FILES() specification.

Suggestions?

H



reply via email to

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