automake
[Top][All Lists]
Advanced

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

Re: How do a copy a file?


From: Dr. David Kirkby
Subject: Re: How do a copy a file?
Date: Fri, 18 Apr 2003 04:18:27 +0100

Harlan Stenn wrote:
> 
> Have your script do a "pwd" so you can make sure you are in the directory
> you think you are in.
> 
> 
Thanks, a good suggestion. I should have thought of that earlier!!

It throws some light on the problem, but don't really solve it. 

There is the revised script with the pwd


pwd
top_srcdir=$top_srcdir top_builddir=$top_builddir
ls -l $top_srcdir/examples/undefined_permittivities.bmp
cp $top_srcdir/examples/undefined_permittivities.bmp
$top_builddir/tmp/undefined_permittivities.bmp
Zo=`$top_builddir/src/non_gui/atlc
$top_builddir/tmp/undefined_permittivities.bmp`
echo Zo = $Zo

and here is the output after:

autoreconf 
configure 
make clean 
make distcheck

/export/home/davek/sources/sources/atlc-4.3.1/=build/tests
../../examples/undefined_permittivities.bmp: No such file or directory
cp: cannot access ../../examples/undefined_permittivities.bmp
cannot open ../tmp/undefined_permittivities.bmp
Zo =
FAIL: 15a-undefined_permittivities.test


It would appear it needs and extra ../ to find the file, as when I cd
to where pwd says it is, the file is not where it thinks. 


i.e.
cd /export/home/davek/sources/sources/atlc-4.3.1/=build/tests
ls ../../examples/undefined_permittivities.bmp
../../examples/undefined_permittivities.bmp: No such file or directory

But it is found if I go up one level:
cd /export/home/davek/sources/sources/atlc-4.3.1/=build/tests
ls ../../../examples/undefined_permittivities.bmp
../../../examples/undefined_permittivities.bmp

However, if I add the ../, it will break it for a normal build (i.e.
not 'make distcheck'), as it currently works fine for more normal
builds, where one builds the executables in the source tree.  

The top directory (where configure.ac resides) is in fact a symbolic
link to somewhere else. But I went to real place, rather than the
linked one and found the same problem. 

I have in tests/Makefile.am

TESTS_ENVIRONMENT = \
top_builddir=$(top_builddir) \
top_srcdir=$(top_srcdir) \
built_with_posix_threads=$(built_with_posix_threads)

but there is nothing like that in the top level Makefile.am. Is that
the right thing to do ??? I'm running out of ideas. 

-- 
Dr. David Kirkby,
Senior Research Fellow,
Department of Medical Physics,
University College London,
11-20 Capper St, London, WC1E 6JA.
Tel: 020 7679 6408 Fax: 020 7679 6269
Internal telephone: ext 46408
e-mail address@hidden




reply via email to

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