~ubuntu-branches/debian/sid/openbox/sid

« back to all changes in this revision

Viewing changes to depcomp

  • Committer: Bazaar Package Importer
  • Author(s): Nico Golde
  • Date: 2010-04-23 16:26:22 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100423162622-glbe2jvey10sdiff
Tags: 3.4.11.1-1
* New upstream release (Closes: #570441).
  - removed wrong use of test command in openbox-gnome-session leading
    to misbehaviour with gnome sessions (Closes: #566685).
* Add obxprop to the installed files (Closes: #564292).
* Removed 04_escape_session_names.dpatch/03_nextprev-xinerama.dpatch
  completely from debian/, wasn't used anymore anyway.
* Bump standards version, no changes needed.
* Update install files for libobparser/libobrender and links in openbox-dev
  as the shared library minor version changed.
* Update install paths of openbox-dev files to reflect upstream changes
  and install all header files rather than pick them manually.
* Switch to regular paragraphs from asterisks in NEWS file.
* Change short description of openbox-dev to differ from openbox.
* Switch to dpkg-source 3.0 (quilt) format
  - switch from dpatch to quilt patches.
* Adding ${misc:Depends} to openbox-dev.

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=2005-07-09.11
5
5
 
6
 
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
7
 
# Foundation, Inc.
 
6
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
8
7
 
9
8
# This program is free software; you can redistribute it and/or modify
10
9
# it under the terms of the GNU General Public License as published by
92
91
## gcc 3 implements dependency tracking that does exactly what
93
92
## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
94
93
## it if -MD -MP comes after the -MF stuff.  Hmm.
95
 
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
96
 
## the command line argument order; so add the flags where they
97
 
## appear in depend2.am.  Note that the slowdown incurred here
98
 
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
99
 
  for arg
100
 
  do
101
 
    case $arg in
102
 
    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
103
 
    *)  set fnord "$@" "$arg" ;;
104
 
    esac
105
 
    shift # fnord
106
 
    shift # $arg
107
 
  done
108
 
  "$@"
 
94
  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
109
95
  stat=$?
110
96
  if test $stat -eq 0; then :
111
97
  else
215
201
  # current directory.  Also, the AIX compiler puts `$object:' at the
216
202
  # start of each line; $object doesn't have directory information.
217
203
  # 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$//'`
 
204
  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
 
205
  tmpdepfile="$stripped.u"
221
206
  if test "$libtool" = yes; then
222
 
    tmpdepfile1=$dir$base.u
223
 
    tmpdepfile2=$base.u
224
 
    tmpdepfile3=$dir.libs/$base.u
225
207
    "$@" -Wc,-M
226
208
  else
227
 
    tmpdepfile1=$dir$base.u
228
 
    tmpdepfile2=$dir$base.u
229
 
    tmpdepfile3=$dir$base.u
230
209
    "$@" -M
231
210
  fi
232
211
  stat=$?
233
212
 
 
213
  if test -f "$tmpdepfile"; then :
 
214
  else
 
215
    stripped=`echo "$stripped" | sed 's,^.*/,,'`
 
216
    tmpdepfile="$stripped.u"
 
217
  fi
 
218
 
234
219
  if test $stat -eq 0; then :
235
220
  else
236
 
    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
 
221
    rm -f "$tmpdepfile"
237
222
    exit $stat
238
223
  fi
239
224
 
240
 
  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
241
 
  do
242
 
    test -f "$tmpdepfile" && break
243
 
  done
244
225
  if test -f "$tmpdepfile"; then
 
226
    outname="$stripped.o"
245
227
    # Each line is of the form `foo.o: dependent.h'.
246
228
    # Do two passes, one to just change these to
247
229
    # `$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"
 
230
    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
 
231
    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
251
232
  else
252
233
    # The sourcefile does not contain any dependencies, so just
253
234
    # store a dummy comment line, to avoid errors with the Makefile
295
276
  rm -f "$tmpdepfile"
296
277
  ;;
297
278
 
298
 
hp2)
299
 
  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
300
 
  # compilers, which have integrated preprocessors.  The correct option
301
 
  # to use with these is +Maked; it writes dependencies to a file named
302
 
  # 'foo.d', which lands next to the object file, wherever that
303
 
  # happens to be.
304
 
  # Much of this is similar to the tru64 case; see comments there.
305
 
  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
306
 
  test "x$dir" = "x$object" && dir=
307
 
  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
308
 
  if test "$libtool" = yes; then
309
 
    tmpdepfile1=$dir$base.d
310
 
    tmpdepfile2=$dir.libs/$base.d
311
 
    "$@" -Wc,+Maked
312
 
  else
313
 
    tmpdepfile1=$dir$base.d
314
 
    tmpdepfile2=$dir$base.d
315
 
    "$@" +Maked
316
 
  fi
317
 
  stat=$?
318
 
  if test $stat -eq 0; then :
319
 
  else
320
 
     rm -f "$tmpdepfile1" "$tmpdepfile2"
321
 
     exit $stat
322
 
  fi
323
 
 
324
 
  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
325
 
  do
326
 
    test -f "$tmpdepfile" && break
327
 
  done
328
 
  if test -f "$tmpdepfile"; then
329
 
    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
330
 
    # Add `dependent.h:' lines.
331
 
    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
332
 
  else
333
 
    echo "#dummy" > "$depfile"
334
 
  fi
335
 
  rm -f "$tmpdepfile" "$tmpdepfile2"
336
 
  ;;
337
 
 
338
279
tru64)
339
280
   # The Tru64 compiler uses -MD to generate dependencies as a side
340
281
   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
347
288
 
348
289
   if test "$libtool" = yes; then
349
290
      # With Tru64 cc, shared objects can also be used to make a
350
 
      # static library.  This mechanism is used in libtool 1.4 series to
 
291
      # static library.  This mecanism is used in libtool 1.4 series to
351
292
      # handle both shared and static libraries in a single compilation.
352
293
      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
353
294
      #
354
295
      # With libtool 1.5 this exception was removed, and libtool now
355
296
      # generates 2 separate objects for the 2 libraries.  These two
356
 
      # compilations output dependencies in $dir.libs/$base.o.d and
 
297
      # compilations output dependencies in in $dir.libs/$base.o.d and
357
298
      # in $dir$base.o.d.  We have to check for both files, because
358
299
      # one of the two compilations can be disabled.  We should prefer
359
300
      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is