[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: *Where* lots of _examples_ of Makefile.am/configure.ac'sforcomplex
Re: *Where* lots of _examples_ of Makefile.am/configure.ac'sforcomplex trees of source code?
Thu, 17 Apr 2003 23:13:08 +0100
> I've slowly read thru Automake manual regarding
> using Autotools if lots
> of /subdirectories/ of source code.
> I know toplevel Makefile.am has SUBDIRS line.
> Subdirectories have their own _SOURCES line.
> configure.ac gets AC_CONFIG_SUBDIRS(dir1 dir2 ...).
> This is confusing to me because now it seems
> like I need not only a Makefile.am in every subdirectory,
> but also, a configure.ac, etc.
You don't need a configure.ac in every subdirectory. If your top-level
configure.ac does all the checks you need, then that's enough. All the sources
in the subdirectories can use the generated config.h.
You need SUBDIRS in Makefile.am, to get the generated Makefiles to recurse
into subdirectories and do whatever they do there (e.g.: build from sources).
I think AC_CONFIG_SUBDIRS is used when a package includes other packages that
have their own configure scripts, e.g.: gdb, binutils, gcc.
Bye, Rich =]
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]