~ubuntu-branches/ubuntu/precise/rpm/precise

« back to all changes in this revision

Viewing changes to depcomp

  • Committer: Bazaar Package Importer
  • Author(s): Loic Minier
  • Date: 2008-12-21 17:49:23 UTC
  • Revision ID: james.westby@ubuntu.com-20081221174923-k9du2lfj9cotahku
Tags: 4.4.2.3-2
* Remove Anand Kumria from Uploader; thanks for your work!
* Add Vcs-Git and Vcs-Browser fields.
* Wrap build-deps and deps.
* Bump Standards-Version to 3.8.0.
* Drop obsolete debian/pycompat.
* Add debian/gbp.conf for git-buildpackage.
* New patch, 22_spelling-fixes, fixes typo in doc/rpm.8 man page; from
  Ubuntu; LP: #73355.
* Refresh patches 02-hkp-disable, 09-prereq, 14-work-on-debian64,
  17-dont-be-redhat, 21-kfreebsd to apply cleanly.
* Drop source-contains-CVS-dir lintian overrides as we use tarballs and we
  should make dist a tarball or at least a CVS export if we pull a snapshot.
* Build-dep on autotools-dev and drop outdated-autotools-helper-file lintian
  overrides.
* New patch, 40_fix-zlib-include-in-file, fixes zlib -I flag breaking the
  build of the internal "file" copy when relibtoolized.
* New patch, 50_internal-popt-config-flag, adds a --with-internal-popt
  configure flag to allow forcing the use of an external popt.
* New patch, 68_autogen-fixes, calls "autoreconf -fi" instead of
  ./autogen.sh in file/ and cleans up some junk files after the autogens
  (autom4te.cache and ~ backups).
* New patch, 70_autogen, run ./autogen --noconfigure.
* Pass --with-internal-popt=no to configure.
* Kill plenty of manual autotools cleanup from rules as well as popt
  removal.
* Drop autoconf/automake/libtoolize invocation from rules.
* Use "touch $@" instead of repeating target name.
* Don't duplicate the way to call quilt and pass it --quiltrc /dev/null.
* Pass -s to dh_* in binary-indep.
* Update download URL in copyright.
* Drop DH_VERBOSE=1.
* Set configure flags via a new var, configure_flags, and only pass --host
  to configure if DEB_HOST_GNU_TYPE and DEB_BUILD_GNU_TYPE differ.
* Drop obsolete README.Debian note related to rpm 4.1 behavior change.

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=2007-03-29.01
 
4
scriptversion=2006-10-15.18
5
5
 
6
 
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
 
6
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 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
 
  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$//'`
 
218
  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
 
219
  tmpdepfile="$stripped.u"
221
220
  if test "$libtool" = yes; then
222
 
    tmpdepfile1=$dir$base.u
223
 
    tmpdepfile2=$base.u
224
 
    tmpdepfile3=$dir.libs/$base.u
225
221
    "$@" -Wc,-M
226
222
  else
227
 
    tmpdepfile1=$dir$base.u
228
 
    tmpdepfile2=$dir$base.u
229
 
    tmpdepfile3=$dir$base.u
230
223
    "$@" -M
231
224
  fi
232
225
  stat=$?
233
226
 
 
227
  if test -f "$tmpdepfile"; then :
 
228
  else
 
229
    stripped=`echo "$stripped" | sed 's,^.*/,,'`
 
230
    tmpdepfile="$stripped.u"
 
231
  fi
 
232
 
234
233
  if test $stat -eq 0; then :
235
234
  else
236
 
    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
 
235
    rm -f "$tmpdepfile"
237
236
    exit $stat
238
237
  fi
239
238
 
240
 
  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
241
 
  do
242
 
    test -f "$tmpdepfile" && break
243
 
  done
244
239
  if test -f "$tmpdepfile"; then
 
240
    outname="$stripped.o"
245
241
    # Each line is of the form `foo.o: dependent.h'.
246
242
    # Do two passes, one to just change these to
247
243
    # `$object: dependent.h' and one to simply `dependent.h:'.
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"
 
244
    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
 
245
    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
251
246
  else
252
247
    # The sourcefile does not contain any dependencies, so just
253
248
    # store a dummy comment line, to avoid errors with the Makefile