automake
[Top][All Lists]
Advanced

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

Re: Nesting and final linking ?


From: Ralf Wildenhues
Subject: Re: Nesting and final linking ?
Date: Thu, 7 Aug 2008 13:20:05 +0200
User-agent: Mutt/1.5.18 (2008-07-21)

Hi Nick,

* nickthefarrow wrote on Thu, Aug 07, 2008 at 10:17:57AM CEST:
> 
> Making all in .
> make[2]: Entering directory `/home/nick/libwhite'
> make[2]: *** No rule to make target `src/common/libcommon.la', needed by 
> `libwhite.la'.  Stop.
> make[2]: Leaving directory `/home/nick/libwhite'
[...]
> my top level makefile.am is
> ----------------------------------
> SUBDIRS = . ./src/common/

This is the culprit.  By listing '.' early in SUBDIRS you are in effect
telling Automake to build things in the current Makefile first, and only
then go into the src/common sub directory.  Solution is to list '.' last
or not at all (in which it will default to being last).

BTW, please drop the leading './' from that name here, it may confuse
some non-GNU make IIRC (they typically don't treat 'file' and './file'
as identical).

> AC_CONFIG_SUBDIRS([src/common])
> AC_OUTPUT(Makefile src/common/Makefile)

FWIW, listing arguments in AC_OUTPUT is a bit old-fashioned.  The new
way would be:
  AC_CONFIG_FILES([Makefile src/common/Makefile])
  AC_OUTPUT

Also, there is some bug lingering here: when you list src/common in
AC_CONFIG_SUBDIRS, then you are effectively saying that there is another
configure script in the src/common directory.  If that is the case, then
it should also be the case that that configure script creates the
Makefile in that directory; but your AC_OUTPUT line tells the toplevel
configure script to create the Makefile.  If both configure scripts do
this (and you can be certain that they won't produce identical results),
then things will get confused pretty quickly.

If you don't need another configure script in src/common, you can simply
remove the AC_CONFIG_SUBDIRS line.

Hope that helps.

Cheers,
Ralf




reply via email to

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