Ludovic Courtès wrote:
Hello,
A couple of questions about "cross-directory support" (info "(automake)
Alternative").
Suppose the following layout:
Makefile.am -> SUBDIRS = src
src/
Makefile.am -> libfoo_SOURCES = a.c b.c c.c
a.c
b.c
c.c
Switching to a non-recursive `make' model goes like this:
Makefile.am -> libfoo_SOURCES = src/a.c src/b.c src/c.c
src/
a.c
b.c
c.c
Questions:
1. Is it possible to avoid repeating `src/' in the second case?
2. Can we somehow arrange the second case so that `libfoo' is built in
`$top_builddir/src' (as in the first case) rather than
`$top_builddir'?
May be no. I know projects that use same source file in different
libraries. It is normal build of different libraries to use different
preprocessor directives to same source.
Roumen