Hello,

I've got a project which at one stage consisted of several separate libraries, 
each in its own directory. This was needlessly fine grained though and so now
it consists of just one library, but still with multiple subdirectories.

Eg:

eg_SOURCES = a/a.c b/b.c c/c.c

Previously this was all home-cooked Makefiles without autoconf, automake, etc.
I've managed to get this working in autoconf by using VPATH. However I create
shared libraries, and so libtool and automake are really useful for me.

However if the above snippet is in Makefile.am automake tells me:

automake: Makefile.am: not supported: source file `a/a.c' is in subdirectory

The obvious solution is:
eg_SOURCES = a.c b.c c.c
VPATH += @srcdir@/a:@srcdir@/b:@srcdir@/c

This prevents the error from automake, but it doesn't add this exactly "as is" 
to the Makefile.in. Instead it adds:

VPATH = @srcdir@/a:@srcdir@/b:@srcdir@/c

Notice the lack of a plus sign.

In turn, config.status seems to completely remove this line when producing
Makefile from Makefile.in (unless it's +=). Is there a simple solution to
this? This is really my first venture into any of autoconf and automake so I'm 
still stumbling quit a bit. (Indeed it took me a while to even realise that
automake and libtool existed - is there a decent FAQ I can go to?)

Cheers,

James

-- 
James Bonfield ([EMAIL PROTECTED])   Tel: 01223 402499   Fax: 01223 213556
Medical Research Council - Laboratory of Molecular Biology,
Hills Road, Cambridge, CB2 2QH, England.
Also see Staden Package WWW site at http://www.mrc-lmb.cam.ac.uk/pubseq/

Reply via email to