Multiple "mv" commands?

2002-04-10 Thread Brian W. Taylor

Hi All,

 I am working with automake 1.6, autoconf 2.53, libtool 1.4.2, and 
the SUNWspro 6 update 2
compilers. I am getting some thing a bit weird and I am not sure if I 
have configured libtool
correctly and I am trying to get the auto dependency tracking working.

Here is an example of my problem, the "mv" error is the problem:

make[2]: Entering directory `/hipo/home/taylor/LOIS/libs/liblois'
source='bswap.c' object='bswap.lo' libtool=yes \
depfile='.deps/bswap.Plo' tmpdepfile='.deps/bswap.TPlo' \
depmode=dashXmstdout /bin/ksh ../../depcomp \
/bin/ksh ../../libtool --mode=compile cc -DHAVE_CONFIG_H -I. -I. 
-I../../include -g -xCC -v -I/usr/openwin/include  
-I/usr/local/include -I/hipo/home/taylor/LOIS/include -c -o bswap.lo 
`test -f bswap.c || echo './'`bswap.c
cc -DHAVE_CONFIG_H -I. -I. -I../../include -g -xCC -v 
-I/usr/openwin/include -I/usr/local/include 
-I/hipo/home/taylor/LOIS/include -c bswap.c  -KPIC -DPIC -o bswap.o
mv -f bswap.o bswap.lo
mv: cannot rename bswap.o: No such file or directory



I found that if I make the following change to libtool:

   # Just move the object if needed, then go on to compile the next 
one
   if test x"$output_obj" != x"$libobj"; then
 $show "$mv $output_obj $libobj"
 if test -r $output_obj; then <--- added
if $run $mv $output_obj $libobj; then :
else
  error=$?
  $run $rm $removelist
  exit $error
fi
 fi
   fi


  I can kinda get it to work. But I get this failure mode also

mv: cannot rename lsidtm.o: No such file or directory

It seems as through the mv command is being executed more than once on a
file. Can anybody tell me what I am doing wrong?


Thanks in Advance!
 Brian


___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool



Re: Multiple "mv" commands?

2002-04-11 Thread Brian W. Taylor

Hi All,
Okay... I discovered my problem. The Forte 6 Sun Compilers
send the dependency info to stdout. So when the code was
compiled for dependencies it would assume that the was
an object to remove.

To resolve this, I added a flag that in the depcomp file
to pass the "--stdoutdepend" to the libtool. This in turn
sets a flag to test before a mv. This works pretty well but
it still seems to get out of sync every once in a while, I
would be very interested in a better solution and one
that could be added to the libtool dist and/or automake dist.
Or have I missed something completly in the configuration
of libtool and/or automake?

Thanks to Bruce for pointing me in the right direction..


Cheers,
 Brian





On 2002.04.10 18:43 Bruce Korb wrote:
> "Brian W. Taylor" wrote:
> 
> > I found that if I make the following change to libtool:
> >
> ># Just move the object if needed, then go on to compile the
> next
> > one
> >if test x"$output_obj" != x"$libobj"; then
> >  $show "$mv $output_obj $libobj"
> >  if test -r $output_obj; then <--- added
> > if $run $mv $output_obj $libobj; then :
> > else
> >   error=$?
> >   $run $rm $removelist
> >   exit $error
> > fi
> >  fi
> >fi
> >
> >   I can kinda get it to work. But I get this failure mode also
> >
> > mv: cannot rename lsidtm.o: No such file or directory
> >
> > It seems as through the mv command is being executed more than once
> on a
> > file. Can anybody tell me what I am doing wrong?
> 
> Insert a ``set -x'' and ``set +x'' around all the suspect code
> and examine the output.
> 

___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool