I have this directory structure:
libfoo
projectfoo
projectThere are two separate things that have to be build here, a libtool library (libfoo
) and an executable (foo
) using that library.
I could just place a configure.ac
file into each foo/libfoo
and foo/foo
and everything would be fine.
However I would like to be able to build both projects at once, so I thought about placing an additional configure.ac
into the top level foo
directory.
Is this a good idea?
If yes, how would the AC_OUTPUT
makro be used in such a case?
Does the top level configure.ac
file generate all the Makefile
s in the whole tree or are there separate AC_OUTPUT
makros in the sub directories that each output there Makefile
s?
Since both projects have different dependencies I would think the subdir ac files do the output of their makefiles?
Can the two projects in the sub dirs still be build separately in this case?
There is a AC_CONFIG_SUBDIRS
macro that does what I want, it recurses into subdirs and executes the configure.ac
files there.
The sub dir projects can still be build independently.
My Makefile.am
only contains SUBDIRS = libfoo foo
now.
The configure.ac
file contains AC_CONFIG_SUBDIRS=([libfoo foo])
.