/[debian]/mimetic/branches/upstream/current/depcomp
ViewVC logotype

Diff of /mimetic/branches/upstream/current/depcomp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1728 by gregoa, Wed Oct 8 16:15:50 2008 UTC revision 1729 by gregoa, Fri May 15 15:30:29 2009 UTC
# Line 1  Line 1 
1  #! /bin/sh  #! /bin/sh
2  # depcomp - compile a program generating dependencies as side-effects  # depcomp - compile a program generating dependencies as side-effects
3    
4  scriptversion=2006-10-15.18  scriptversion=2007-03-29.01
5    
6  # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software  # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
7  # Foundation, Inc.  # Foundation, Inc.
8    
9  # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
# Line 215  aix) Line 215  aix)
215    # current directory.  Also, the AIX compiler puts `$object:' at the    # current directory.  Also, the AIX compiler puts `$object:' at the
216    # start of each line; $object doesn't have directory information.    # start of each line; $object doesn't have directory information.
217    # Version 6 uses the directory in both cases.    # Version 6 uses the directory in both cases.
218    stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`    dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
219    tmpdepfile="$stripped.u"    test "x$dir" = "x$object" && dir=
220      base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
221    if test "$libtool" = yes; then    if test "$libtool" = yes; then
222        tmpdepfile1=$dir$base.u
223        tmpdepfile2=$base.u
224        tmpdepfile3=$dir.libs/$base.u
225      "$@" -Wc,-M      "$@" -Wc,-M
226    else    else
227        tmpdepfile1=$dir$base.u
228        tmpdepfile2=$dir$base.u
229        tmpdepfile3=$dir$base.u
230      "$@" -M      "$@" -M
231    fi    fi
232    stat=$?    stat=$?
233    
   if test -f "$tmpdepfile"; then :  
   else  
     stripped=`echo "$stripped" | sed 's,^.*/,,'`  
     tmpdepfile="$stripped.u"  
   fi  
   
234    if test $stat -eq 0; then :    if test $stat -eq 0; then :
235    else    else
236      rm -f "$tmpdepfile"      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
237      exit $stat      exit $stat
238    fi    fi
239    
240      for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
241      do
242        test -f "$tmpdepfile" && break
243      done
244    if test -f "$tmpdepfile"; then    if test -f "$tmpdepfile"; then
     outname="$stripped.o"  
245      # Each line is of the form `foo.o: dependent.h'.      # Each line is of the form `foo.o: dependent.h'.
246      # Do two passes, one to just change these to      # Do two passes, one to just change these to
247      # `$object: dependent.h' and one to simply `dependent.h:'.      # `$object: dependent.h' and one to simply `dependent.h:'.
248      sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
249      sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"      # That's a tab and a space in the [].
250        sed -e 's,^.*\.[a-z]*:[      ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
251    else    else
252      # The sourcefile does not contain any dependencies, so just      # The sourcefile does not contain any dependencies, so just
253      # store a dummy comment line, to avoid errors with the Makefile      # store a dummy comment line, to avoid errors with the Makefile

Legend:
Removed from v.1728  
changed lines
  Added in v.1729

  ViewVC Help
Powered by ViewVC 1.1.26