[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 |
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:
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
libzzz.la, which is going to be built later. If I "make libzzz.la
all", everything works fine.
How can I overcome these problems (esp. the second one)?
I've put the sources to
http://ata.cs.hun.edu.tr/~ibr/z/z0.tgz main and test together
http://ata.cs.hun.edu.tr/~ibr/z/z1.tgz main and test separate, AM_CFLAGS copied
http://ata.cs.hun.edu.tr/~ibr/z/z2.tgz main and test separate, AM_CFLAGS
AC_SUBSTed
Thanks in advance,
Baurzhan.
- adding subdirectories,
ibr <=
Re: adding subdirectories, Stepan Kasal, 2005/03/07