automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: adding subdirectories


From: Nicolas Joly
Subject: Re: adding subdirectories
Date: Mon, 7 Mar 2005 14:27:25 +0100
User-agent: Mutt/1.5.8i

On Mon, Mar 07, 2005 at 02:07:41PM +0100, address@hidden 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=\"@address@hidden"
> 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

[Prev in Thread] Current Thread [Next in Thread]