automake
[Top][All Lists]
Advanced

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

Re: Copy files in VPATH build


From: Steffen Dettmer
Subject: Re: Copy files in VPATH build
Date: Mon, 8 Nov 2010 15:14:00 +0100

On Sun, Oct 31, 2010 at 1:09 PM, Jason Curl <address@hidden> wrote:
>>> * On Oct 30, 2010, at 5:17 PM, Jason Curl<address@hidden>  wrote:
>>>> When building my package with "./configure" everything works well as
>>>> some datafiles that are required for tests are in the correct place
>>>> (my tests don't need to be installed with "make install"). However,
>>>> when I use VPATH builds with "../configure", I don't know how to get
>>>> my data files copied from the source to the current build path.

> cpreadini:
>   address@hidden@/cpfiles.sh @srcdir@/read.ini ./read.ini

For some similar cases here we simply made some `read.ini.in' and
used AC_CONFIG_FILES (of course requires not to have @token@ in
the read.ini file), maybe not nice but pragmatic :)

Why are the copies needed?
Most of our tests working on input data files either create the
files:

check_PROGRAMS=readtest
readtest_DEPENDENCIES=$(LIBDEPS) read.ini
read.ini: Makefile
        echo "; autogen by Makefile.am" > read.ini
        @echo "[test]" >> read.ini
        @echo "opt=val" >> read.ini
CLEANFILES=read.ini

(BTW, is this right?)

or have something like

TESTS=readtest.sh

with a readtest.sh (could even be autogenerated):

test -z "$srcdir" && srcdir=.
./readtest --ini-file=$srcdir/read.ini

Is this done right and portable?

oki,

Steffen



reply via email to

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