~ubuntu-branches/ubuntu/trusty/htop/trusty-proposed

« back to all changes in this revision

Viewing changes to depcomp

  • Committer: Bazaar Package Importer
  • Author(s): Eugene V. Lyubimkin
  • Date: 2009-04-05 11:51:34 UTC
  • mfrom: (1.1.13 upstream) (7.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090405115134-xyuzxp308k5qos0k
Tags: 0.8.1+svn149-1
* New upstream development snapshot:
  - Allow building withough PLPA support. (Closes: #521861)
* debian/patches:
  - 010-make-desktop-file-valid.patch: deleted, merged upstream.
  - 100-upstream-sort-by-processor-and-session.patch: deleted, merged
    upstream.
  - 110-upstream-fix-page-size-on-BSD.patch: deleted, merged upstream.
  - 120-upstream-explain-cpu-bars-in-monochrome-mode.patch: deleted, merged
    upstream.
  - 200-filter-non-printable-characters.patch: deleted, upstream has own
    version of this patch.
  - 610-rename-veid-to-ctid.patch: deleted, merged upstream.
  - 600-openvz-veid-on-kernels-gt-2.6.18.patch: refreshed.
  - 800-tree-view-without-userland-threads.patch: deleted, merged upstream.
  - 700-ltrace-support.patch: refreshed, added the description.
* debian/rules:
  - Deal more robustly with config.{sub,guess} files, thanks to Roger Leigh.

Show diffs side-by-side

added added

removed removed

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