This is the mail archive of the automake@gnu.org mailing list for the Automake project. See the Automake home page for more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GNOME build tool - linking with uninstalled libs



Hello Tom,

On 27 Apr 1999 23:02:23 -0600
Tom Tromey <tromey@cygnus.com> wrote:

> If you look at the Gnome Makefiles, you'll see that in practice they
> very *rarely* use includedir, but instead make their own directories.
> E.g., from gnome-libs/libgnome/Makefile.am:
> 
>     libgnomeincludedir = $(includedir)/libgnome
>     libgnomeinclude_HEADERS = \
Quick prototyping revealed that whether it is include_HEADERS or
otherwise does not really matter.  Please see the code below:
(I must thank you and other automake maintainers for being able
to make it this simple.)

# AM_CHECK_HEADER(LIBRARY-NAME, MAKEFILE_AM)
# This is not compatible with AC_CHECK_HEADEER
AC_DEFUN(AM_CHECK_HEADER, [
# automake generates install rule if *include_HEADERS is defined
# in Makefile.am
if ! `grep include_HEADERS [$2] > /dev/null` ; then
   AC_MSG_ERROR( *** No header files for lib[$1] *** )
fi

# There may be more than one rule
for HEADERS in `grep include_HEADERS [$2] | \
    sed 's/include_HEADERS[ ]*=.*$/includeHEADERS/'`
do
    # rule name is install-*includeHEADERS
    install_lib[$1]_HEADERS="$install_lib[$1]_HEADERS \
    install-$HEADERS"
done
])

If the headers do not need to be generated with BUILD_SOURCES, I
can simply call:
    $(MAKE) -C $(libfoo_la_DIR) $(install_libfoo_HEADERS)

I still need to figure out how to trigger other rules that might
be involved in the BUILD_SOURCES cases.

I also realize that I really need to extend automake.  Attaching
the rule like this and $(libfoo_la_HEADERS) to the dependency
list for foo is very redundant to what automake does on
Makefile.am for libfoo already.

Zen

----------/* E-Mail : <atmczen@ibm.net > */----------