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 13:29:22 +0100

Bob Proulx wrote:
> > #! /bin/sh
> > ls -l $top_srcdir/examples/undefined_permittivities.bmp
> > cp $top_srcdir/examples/test-coupler1.bmp $top_builddir/tmp
> > Zo=`$top_builddir/src/non_gui/atlc
> > $top_builddir/tmp/undefined_permittivities.bmp`
> > echo Zo = $Zo

> > The exact message generated are:
> > ../../examples/undefined_permittivities.bmp: No such file or directory
> > cp: cannot access ../../examples/undefined_permittivities.bmp
> > cannot open ../tmp/undefined_permittivities.bmp
> 
> Interesting that you appear to be getting two different messages out
> of cp for the same error.  Can't open source and can't write the
> target at the same time?  Usually it would stop at the first error.
> Unusual.  Are you sure tmp is getting created prior to this test?  It
> is probably better to run 'mkdir -p $top_builddir/tmp' just prior to
> the performing the copy.

cp is not generating two errors. The first (No such file or directory)
is from ls, the second (cp: cannot access ...) is from cp. The third
(cannot open ../tmp/undefined_permittivities.bmp) is from my program,
as it tries to read the copied file. 

I have now found the problem - Eric Siegerman's comments made me
double check my facts and I see undefined_permittivities.bmp was not
packaged!! Silly me. 

I had 82 tests, two of which did a copy, with both those two tests
failing.  I'd checked that one of the files was in the EXTRA_DIST so
got included, but not the checked undefined_permittivities.bmp. The
lack of not having undefined_permittivities.bmp in EXTRA_DIST
explained one problem, the other one was due to me doing

cp $top_builddir/foo $top_builddir/tmp
rather than
cp $top_srcdir/foo  $top_builddir/tmp. 

The fact they both failed on a copy, sent my train of thought in the
wrong direction. There were two different reasons for the two tests
failing. 
-- 
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]