[Top][All Lists]

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

adding subdirectories

From: ibr
Subject: adding subdirectories
Date: Mon, 7 Mar 2005 14:07:41 +0100
User-agent: Mutt/1.5.6+20040907i


I build my project in a single directory using automake, like this:

bin_PROGRAMS = zzz
noinst_PROGRAMS = test1 test2 test3
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@ 
zzz_LDADD = @ZZZ_LIBS@ $(top_builddir)/
test1_LDADD = @ZZZ_LIBS@ $(top_builddir)/
test2_LDADD = @ZZZ_LIBS@ $(top_builddir)/
test3_LDADD = @ZZZ_LIBS@ $(top_builddir)/

Now I want to separate the production targets from the regression tests.
I moved the noinst_PROGRAMS to testsuite/ and
AC_SUBST(AM_CFLAGS) in However, now I've got two problems:

1. I was able to escape variable expansion with a backslash
   ("\$(top_srcdir)"), but @sysconfdir@ remains unexpanded.

2. More importantly, I can't build the project any more: make
   immediately dives into testsuite/, files under which require, which is going to be built later. If I "make
   all", everything works fine.

How can I overcome these problems (esp. the second one)?

I've put the sources to  main and test together  main and test separate, AM_CFLAGS copied  main and test separate, AM_CFLAGS 

Thanks in advance,

reply via email to

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