/[bison]/bison/config/depcomp
ViewVC logotype

Diff of /bison/config/depcomp

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

revision 1.5 by eggert, Mon Aug 12 14:01:19 2002 UTC revision 1.6 by eggert, Tue Feb 25 07:25:22 2003 UTC
# Line 206  aix) Line 206  aix)
206    rm -f "$tmpdepfile"    rm -f "$tmpdepfile"
207    ;;    ;;
208    
209    icc)
210      # Must come before tru64.
211    
212      # Intel's C compiler understands `-MD -MF file'.  However
213      #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
214      # will fill foo.d with something like
215      #    foo.o: sub/foo.c
216      #    foo.o: sub/foo.h
217      # which is wrong.  We want:
218      #    sub/foo.o: sub/foo.c
219      #    sub/foo.o: sub/foo.h
220      #    sub/foo.c:
221      #    sub/foo.h:
222    
223      "$@" -MD -MF "$tmpdepfile"
224      stat=$?
225      if test $stat -eq 0; then :
226      else
227        rm -f "$tmpdepfile"
228        exit $stat
229      fi
230      rm -f "$depfile"
231      # Each line is of the form `foo.o: dependent.h'.
232      # Do two passes, one to just change these to
233      # `$object: dependent.h' and one to simply `dependent.h:'.
234      sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
235      sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
236      rm -f "$tmpdepfile"
237      ;;
238    
239  tru64)  tru64)
240     # The Tru64 compiler uses -MD to generate dependencies as a side     # The Tru64 compiler uses -MD to generate dependencies as a side
241     # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.     # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# Line 265  dashmstdout) Line 295  dashmstdout)
295      shift      shift
296    fi    fi
297    
298    # Remove `-o $object'.  We will use -o /dev/null later,    # Remove `-o $object'.
   # however we can't do the remplacement now because  
   # `-o $object' might simply not be used  
299    IFS=" "    IFS=" "
300    for arg    for arg
301    do    do
# Line 287  dashmstdout) Line 315  dashmstdout)
315    done    done
316    
317    test -z "$dashmflag" && dashmflag=-M    test -z "$dashmflag" && dashmflag=-M
318    "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[       ]*:'"$object"'\: :' > "$tmpdepfile"    # Require at least two characters before searching for `:'
319      # in the target name.  This is to cope with DOS-style filenames:
320      # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
321      "$@" $dashmflag |
322        sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
323    rm -f "$depfile"    rm -f "$depfile"
324    cat < "$tmpdepfile" > "$depfile"    cat < "$tmpdepfile" > "$depfile"
325    tr ' ' '    tr ' ' '
# Line 306  dashXmstdout) Line 338  dashXmstdout)
338    
339  makedepend)  makedepend)
340    "$@" || exit $?    "$@" || exit $?
341      # Remove any Libtool call
342      if test "$libtool" = yes; then
343        while test $1 != '--mode=compile'; do
344          shift
345        done
346        shift
347      fi
348    # X makedepend    # X makedepend
349    shift    shift
350    cleared=no    cleared=no
# Line 318  makedepend) Line 357  makedepend)
357      case "$arg" in      case "$arg" in
358      -D*|-I*)      -D*|-I*)
359        set fnord "$@" "$arg"; shift ;;        set fnord "$@" "$arg"; shift ;;
360      -*)      # Strip any option that makedepend may not understand.  Remove
361        # the object too, otherwise makedepend will parse it as a source file.
362        -*|$object)
363        ;;        ;;
364      *)      *)
365        set fnord "$@" "$arg"; shift ;;        set fnord "$@" "$arg"; shift ;;

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26