On Mon, Mar 07, 2005 at 02:07:41PM +0100, [EMAIL PROTECTED] wrote:
> Hello,
> 
> I build my project in a single directory using automake, like this:
> 
> AUTOMAKE_OPTIONS = dejagnu
> bin_PROGRAMS = zzz
> noinst_PROGRAMS = test1 test2 test3
> noinst_LTLIBRARIES = libzzz.la
> zzz_SOURCES = zzz.c
> libzzz_la_SOURCES = a/a.c b/b.c
> AM_CFLAGS = -g -Wall -std=c99 -I$(top_srcdir)/include @ZZZ_CFLAGS@ 
> -DSYSCONFDIR=\"@[EMAIL PROTECTED]"
> zzz_LDADD = @ZZZ_LIBS@ $(top_builddir)/libzzz.la
> test1_LDADD = @ZZZ_LIBS@ $(top_builddir)/libzzz.la
> test2_LDADD = @ZZZ_LIBS@ $(top_builddir)/libzzz.la
> test3_LDADD = @ZZZ_LIBS@ $(top_builddir)/libzzz.la
> 
> Now I want to separate the production targets from the regression tests.
> I moved the noinst_PROGRAMS to testsuite/Makefile.am and
> AC_SUBST(AM_CFLAGS) in configure.ac. However, now I've got two problems:
[...]
> 2. More importantly, I can't build the project any more: make
>    immediately dives into testsuite/, files under which require
>    libzzz.la, which is going to be built later. If I "make libzzz.la
>    all", everything works fine.

Use `SUBDIRS = . testsuite' in your Makefile.am, this will force the
directory processing order.

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.


Reply via email to