~ubuntu-branches/ubuntu/raring/thunar/raring

« back to all changes in this revision

Viewing changes to depcomp

  • Committer: Package Import Robot
  • Author(s): Lionel Le Folgoc
  • Date: 2012-12-03 13:13:58 UTC
  • mfrom: (1.3.4)
  • Revision ID: package-import@ubuntu.com-20121203131358-zk6tkel37d732wh6
Tags: 1.6.0-0ubuntu1
* Upload to raring.
* Remaining Ubuntu change:
  - debian/control: recommend udisks2 for mounting devices. lp: #1014632
* Drop obsolete Ubuntu changes:
  - debian/patches/02_guard-for-no-supported-vfs-schemas.patch,
    debian/patches/xubuntu_fix-duplicate-volumes.patch: included upstream.
* Bugs fixed:
  - "Thunar: sendto_printer broken" lp: #1061846
  - "segfault when a specific html file is selected" lp: #751739
  - "can't book mark remote shares" lp: #778268
  - "Thunar crashed with SIGSEGV in thunarx_menu_provider_get_file_actions()
    thinking a directory was a file" lp: #852410
  - "Left or right-clicking on 3MB or bigger svg file is unresponsive"
    lp: #893330
  - "Thunar crashed with SIGSEGV in fast_validate()" lp: #913041
  - "Thunar crashed with SIGSEGV in thunar_file_get_display_name()"
    lp: #931101
  - "Thunar crashed with SIGSEGV in sort_by_mime_type()" lp: #931842
  - "Thunar crashed with SIGSEGV in thunar_util_parse_parent()" lp: #969222
  - "thunar crashed with SIGSEGV in thunar_standard_view_cancel_thumbnailing()"
    lp: #1059397
  - "Does not unmount USB drive when you try first time" lp: #1059997
  - "regression: thunar no longer shows all unmounted, but mountable, volumes
    in sidepane" lp: #1068947
  - "Thunar shows folder sizes wrong" lp: #59235
  - "Right-click "Open With" list not refreshing" lp: #107392
  - "no thunar contextmenu with GTK setting "gtk-menu-popup-delay = 0""
    lp: #127372
  - "rename folder, still active but answers not on 'Enter'" lp: #479975
  - "Thunar hangs on first launch of each session" lp: #775117
  - "emblems disappear on rename" lp: #877755
  - "Remote Deleted file in Thunar remains visible until resfresh" lp: #999824
  - "Incorrect alphabetical sort order in thunar with non-latin (eg. cyrillic)
    file names" lp: #684317
  - "Thunar does not display current folder name" lp: #875193
  - "Thunar crashed with SIGSEGV in g_file_equal()" lp: #900306
  - "Hard to see, if volume is mounted or not" lp: #838917

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=2012-03-27.16; # UTC
 
4
scriptversion=2012-07-12.20; # UTC
5
5
 
6
 
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
7
 
# 2011, 2012 Free Software Foundation, Inc.
 
6
# Copyright (C) 1999-2012 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
75
74
 
76
75
rm -f "$tmpdepfile"
77
76
 
 
77
# Avoid interferences from the environment.
 
78
gccflag= dashmflag=
 
79
 
78
80
# Some modes work just like other modes, but use different flags.  We
79
81
# parameterize here, but still list the modes in the big case below,
80
82
# to make depend.m4 easier to write.  Note that we *cannot* use a case
109
111
fi
110
112
 
111
113
if test "$depmode" = xlc; then
112
 
   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
 
114
   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
113
115
   gccflag=-qmakedep=gcc,-MF
114
116
   depmode=gcc
115
117
fi
143
145
  ;;
144
146
 
145
147
gcc)
 
148
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
 
149
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
 
150
## (see the conditional assignment to $gccflag above).
146
151
## There are various ways to get dependency output from gcc.  Here's
147
152
## why we pick this rather obscure method:
148
153
## - Don't want to use -MD because we'd like the dependencies to end
149
154
##   up in a subdir.  Having to rename by hand is ugly.
150
155
##   (We might end up doing this anyway to support other compilers.)
151
156
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
152
 
##   -MM, not -M (despite what the docs say).
 
157
##   -MM, not -M (despite what the docs say).  Also, it might not be
 
158
##   supported by the other compilers which use the 'gcc' depmode.
153
159
## - Using -M directly means running the compiler twice (even worse
154
160
##   than renaming).
155
161
  if test -z "$gccflag"; then
335
341
  rm -f "$tmpdepfile"
336
342
  ;;
337
343
 
 
344
## The order of this option in the case statement is important, since the
 
345
## shell code in configure will try each of these formats in the order
 
346
## listed in this file.  A plain '-MD' option would be understood by many
 
347
## compilers, so we must ensure this comes after the gcc and icc options.
 
348
pgcc)
 
349
  # Portland's C compiler understands '-MD'.
 
350
  # Will always output deps to 'file.d' where file is the root name of the
 
351
  # source file under compilation, even if file resides in a subdirectory.
 
352
  # The object file name does not affect the name of the '.d' file.
 
353
  # pgcc 10.2 will output
 
354
  #    foo.o: sub/foo.c sub/foo.h
 
355
  # and will wrap long lines using '\' :
 
356
  #    foo.o: sub/foo.c ... \
 
357
  #     sub/foo.h ... \
 
358
  #     ...
 
359
  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
 
360
  test "x$dir" = "x$object" && dir=
 
361
  # Use the source, not the object, to determine the base name, since
 
362
  # that's sadly what pgcc will do too.
 
363
  base=`echo "$source" | sed -e 's|^.*/||' -e 's/\.[-_a-zA-Z0-9]*$//'`
 
364
  tmpdepfile="$base.d"
 
365
 
 
366
  # For projects that build the same source file twice into different object
 
367
  # files, the pgcc approach of using the *source* file root name can cause
 
368
  # problems in parallel builds.  Use a locking strategy to avoid stomping on
 
369
  # the same $tmpdepfile.
 
370
  lockdir="$base.d-lock"
 
371
  trap "echo '$0: caught signal, cleaning up...' >&2; rm -rf $lockdir" 1 2 13 15
 
372
  numtries=100
 
373
  i=$numtries
 
374
  while test $i -gt 0 ; do
 
375
    # mkdir is a portable test-and-set.
 
376
    if mkdir $lockdir 2>/dev/null; then
 
377
      # This process acquired the lock.
 
378
      "$@" -MD
 
379
      stat=$?
 
380
      # Release the lock.
 
381
      rm -rf $lockdir
 
382
      break
 
383
    else
 
384
      ## the lock is being held by a different process,
 
385
      ## wait until the winning process is done or we timeout
 
386
      while test -d $lockdir && test $i -gt 0; do
 
387
        sleep 1
 
388
        i=`expr $i - 1`
 
389
      done
 
390
    fi
 
391
    i=`expr $i - 1`
 
392
  done
 
393
  trap - 1 2 13 15
 
394
  if test $i -le 0; then
 
395
    echo "$0: failed to acquire lock after $numtries attempts" >&2
 
396
    echo "$0: check lockdir '$lockdir'" >&2
 
397
    exit 1
 
398
  fi
 
399
 
 
400
  if test $stat -ne 0; then
 
401
    rm -f "$tmpdepfile"
 
402
    exit $stat
 
403
  fi
 
404
  rm -f "$depfile"
 
405
  # Each line is of the form `foo.o: dependent.h',
 
406
  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
 
407
  # Do two passes, one to just change these to
 
408
  # `$object: dependent.h' and one to simply `dependent.h:'.
 
409
  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
 
410
  # Some versions of the HPUX 10.20 sed can't process this invocation
 
411
  # correctly.  Breaking it into two sed invocations is a workaround.
 
412
  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
 
413
    sed -e 's/$/ :/' >> "$depfile"
 
414
  rm -f "$tmpdepfile"
 
415
  ;;
 
416
 
338
417
hp2)
339
418
  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
340
419
  # compilers, which have integrated preprocessors.  The correct option