OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [or1ksim/] [depcomp] - Diff between revs 19 and 82

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 19 Rev 82
Line 1... Line 1...
#! /bin/sh
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# depcomp - compile a program generating dependencies as side-effects
 
 
scriptversion=2007-03-29.01
scriptversion=2009-04-28.21; # UTC
 
 
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
# Foundation, Inc.
# Software Foundation, Inc.
 
 
# This program is free software; you can redistribute it and/or modify
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# any later version.
Line 15... Line 15...
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# GNU General Public License for more details.
 
 
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# along with this program.  If not, see .
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
# 02110-1301, USA.
 
 
 
# As a special exception to the GNU General Public License, if you
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# the same distribution terms that you use for the rest of that program.
Line 85... Line 83...
   # This is just like dashmstdout with a different argument.
   # This is just like dashmstdout with a different argument.
   dashmflag=-xM
   dashmflag=-xM
   depmode=dashmstdout
   depmode=dashmstdout
fi
fi
 
 
 
cygpath_u="cygpath -u -f -"
 
if test "$depmode" = msvcmsys; then
 
   # This is just like msvisualcpp but w/o cygpath translation.
 
   # Just convert the backslash-escaped backslashes to single forward
 
   # slashes to satisfy depend.m4
 
   cygpath_u="sed s,\\\\\\\\,/,g"
 
   depmode=msvisualcpp
 
fi
 
 
case "$depmode" in
case "$depmode" in
gcc3)
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## gcc 3 implements dependency tracking that does exactly what
## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff.  Hmm.
## it if -MD -MP comes after the -MF stuff.  Hmm.
Line 190... Line 197...
    # dependency line.
    # dependency line.
    tr ' ' '
    tr ' ' '
' < "$tmpdepfile" \
' < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
    tr '
    tr '
' ' ' >> $depfile
' ' ' >> "$depfile"
    echo >> $depfile
    echo >> "$depfile"
 
 
    # The second pass generates a dummy entry for each header file.
    # The second pass generates a dummy entry for each header file.
    tr ' ' '
    tr ' ' '
' < "$tmpdepfile" \
' < "$tmpdepfile" \
   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
   >> $depfile
   >> "$depfile"
  else
  else
    # The sourcefile does not contain any dependencies, so just
    # The sourcefile does not contain any dependencies, so just
    # store a dummy comment line, to avoid errors with the Makefile
    # store a dummy comment line, to avoid errors with the Makefile
    # "include basename.Plo" scheme.
    # "include basename.Plo" scheme.
    echo "#dummy" > "$depfile"
    echo "#dummy" > "$depfile"
Line 326... Line 333...
    test -f "$tmpdepfile" && break
    test -f "$tmpdepfile" && break
  done
  done
  if test -f "$tmpdepfile"; then
  if test -f "$tmpdepfile"; then
    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
    # Add `dependent.h:' lines.
    # Add `dependent.h:' lines.
    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
    sed -ne '2,${
 
               s/^ *//
 
               s/ \\*$//
 
               s/$/:/
 
               p
 
             }' "$tmpdepfile" >> "$depfile"
  else
  else
    echo "#dummy" > "$depfile"
    echo "#dummy" > "$depfile"
  fi
  fi
  rm -f "$tmpdepfile" "$tmpdepfile2"
  rm -f "$tmpdepfile" "$tmpdepfile2"
  ;;
  ;;
Line 402... Line 414...
  # always write the preprocessed file to stdout, regardless of -o.
  # always write the preprocessed file to stdout, regardless of -o.
  "$@" || exit $?
  "$@" || exit $?
 
 
  # Remove the call to Libtool.
  # Remove the call to Libtool.
  if test "$libtool" = yes; then
  if test "$libtool" = yes; then
    while test $1 != '--mode=compile'; do
    while test "X$1" != 'X--mode=compile'; do
      shift
      shift
    done
    done
    shift
    shift
  fi
  fi
 
 
Line 453... Line 465...
 
 
makedepend)
makedepend)
  "$@" || exit $?
  "$@" || exit $?
  # Remove any Libtool call
  # Remove any Libtool call
  if test "$libtool" = yes; then
  if test "$libtool" = yes; then
    while test $1 != '--mode=compile'; do
    while test "X$1" != 'X--mode=compile'; do
      shift
      shift
    done
    done
    shift
    shift
  fi
  fi
  # X makedepend
  # X makedepend
  shift
  shift
  cleared=no
  cleared=no eat=no
  for arg in "$@"; do
  for arg
 
  do
    case $cleared in
    case $cleared in
    no)
    no)
      set ""; shift
      set ""; shift
      cleared=yes ;;
      cleared=yes ;;
    esac
    esac
 
    if test $eat = yes; then
 
      eat=no
 
      continue
 
    fi
    case "$arg" in
    case "$arg" in
    -D*|-I*)
    -D*|-I*)
      set fnord "$@" "$arg"; shift ;;
      set fnord "$@" "$arg"; shift ;;
    # Strip any option that makedepend may not understand.  Remove
    # Strip any option that makedepend may not understand.  Remove
    # the object too, otherwise makedepend will parse it as a source file.
    # the object too, otherwise makedepend will parse it as a source file.
 
    -arch)
 
      eat=yes ;;
    -*|$object)
    -*|$object)
      ;;
      ;;
    *)
    *)
      set fnord "$@" "$arg"; shift ;;
      set fnord "$@" "$arg"; shift ;;
    esac
    esac
  done
  done
  obj_suffix="`echo $object | sed 's/^.*\././'`"
  obj_suffix=`echo "$object" | sed 's/^.*\././'`
  touch "$tmpdepfile"
  touch "$tmpdepfile"
  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
  rm -f "$depfile"
  rm -f "$depfile"
  cat < "$tmpdepfile" > "$depfile"
  cat < "$tmpdepfile" > "$depfile"
  sed '1,2d' "$tmpdepfile" | tr ' ' '
  sed '1,2d' "$tmpdepfile" | tr ' ' '
Line 498... Line 517...
  # always write the preprocessed file to stdout.
  # always write the preprocessed file to stdout.
  "$@" || exit $?
  "$@" || exit $?
 
 
  # Remove the call to Libtool.
  # Remove the call to Libtool.
  if test "$libtool" = yes; then
  if test "$libtool" = yes; then
    while test $1 != '--mode=compile'; do
    while test "X$1" != 'X--mode=compile'; do
      shift
      shift
    done
    done
    shift
    shift
  fi
  fi
 
 
Line 536... Line 555...
  rm -f "$tmpdepfile"
  rm -f "$tmpdepfile"
  ;;
  ;;
 
 
msvisualcpp)
msvisualcpp)
  # Important note: in order to support this mode, a compiler *must*
  # Important note: in order to support this mode, a compiler *must*
  # always write the preprocessed file to stdout, regardless of -o,
  # always write the preprocessed file to stdout.
  # because we must use -o when running libtool.
 
  "$@" || exit $?
  "$@" || exit $?
 
 
 
  # Remove the call to Libtool.
 
  if test "$libtool" = yes; then
 
    while test "X$1" != 'X--mode=compile'; do
 
      shift
 
    done
 
    shift
 
  fi
 
 
  IFS=" "
  IFS=" "
  for arg
  for arg
  do
  do
    case "$arg" in
    case "$arg" in
 
    -o)
 
      shift
 
      ;;
 
    $object)
 
      shift
 
      ;;
    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
        set fnord "$@"
        set fnord "$@"
        shift
        shift
        shift
        shift
        ;;
        ;;
Line 555... Line 588...
        shift
        shift
        shift
        shift
        ;;
        ;;
    esac
    esac
  done
  done
  "$@" -E |
  "$@" -E 2>/dev/null |
  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
  rm -f "$depfile"
  rm -f "$depfile"
  echo "$object : \\" > "$depfile"
  echo "$object : \\" > "$depfile"
  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::    \1 \\:p' >> "$depfile"
  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
  echo "        " >> "$depfile"
  echo "        " >> "$depfile"
  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
  rm -f "$tmpdepfile"
  rm -f "$tmpdepfile"
  ;;
  ;;
 
 
 
msvcmsys)
 
  # This case exists only to let depend.m4 do its work.  It works by
 
  # looking at the text of this script.  This case will never be run,
 
  # since it is checked for above.
 
  exit 1
 
  ;;
 
 
none)
none)
  exec "$@"
  exec "$@"
  ;;
  ;;
 
 
*)
*)
Line 583... Line 623...
# mode: shell-script
# mode: shell-script
# sh-indentation: 2
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# time-stamp-time-zone: "UTC"
 
# time-stamp-end: "; # UTC"
# End:
# End:

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.