~ubuntu-branches/ubuntu/utopic/texlive-bin/utopic

« back to all changes in this revision

Viewing changes to build-aux/depcomp

  • Committer: Package Import Robot
  • Author(s): Norbert Preining
  • Date: 2012-04-10 10:16:01 UTC
  • mfrom: (1.2.3)
  • Revision ID: package-import@ubuntu.com-20120410101601-7mt8nyn280xrgza6
Tags: 2011.20120410-1
* new upstream checkout:
  - remove decls of popen and pclose (Closes: #64524) (!yow, 5 digit bug!)
  - do not declare getopt in C++, fixes FTBFS with g++ >= 4.7 
    (Closes: #667392)
* add patches (maybe to be included upstream) that allows inclusion of
  one config file in another for (x)dvipdfmx. This will be
  used by the paper code.
* fix description of libptexenc-dev package (Closes: #667694)
* remove xdvik patch, included upstream
* remove conflict with ptex-bin, we are building a transitional package now
* build with internal t1lib, as t1lib is going to disappear in
  wheezy (Closes: #667912) (no, dropping xdvi is not an option!)
  (add a lintian override otherwise this gives a lintian error)

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-12.15; # UTC
 
4
scriptversion=2012-03-27.16; # UTC
5
5
 
6
6
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
7
7
 
288
288
  ;;
289
289
 
290
290
icc)
291
 
  # Intel's C compiler understands '-MD -MF file'.  However on
292
 
  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
 
291
  # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
 
292
  # However on
 
293
  #    $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
293
294
  # ICC 7.0 will fill foo.d with something like
294
295
  #    foo.o: sub/foo.c
295
296
  #    foo.o: sub/foo.h
296
 
  # which is wrong.  We want:
 
297
  # which is wrong.  We want
297
298
  #    sub/foo.o: sub/foo.c
298
299
  #    sub/foo.o: sub/foo.h
299
300
  #    sub/foo.c:
300
301
  #    sub/foo.h:
301
302
  # ICC 7.1 will output
302
303
  #    foo.o: sub/foo.c sub/foo.h
303
 
  # and will wrap long lines using \ :
 
304
  # and will wrap long lines using '\':
304
305
  #    foo.o: sub/foo.c ... \
305
306
  #     sub/foo.h ... \
306
307
  #     ...
307
 
 
 
308
  # tcc 0.9.26 (FIXME still under development at the moment of writing)
 
309
  # will emit a similar output, but also prepend the continuation lines
 
310
  # with horizontal tabulation characters.
308
311
  "$@" -MD -MF "$tmpdepfile"
309
312
  stat=$?
310
313
  if test $stat -eq 0; then :
317
320
  # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
318
321
  # Do two passes, one to just change these to
319
322
  # '$object: dependent.h' and one to simply 'dependent.h:'.
320
 
  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
321
 
  # Some versions of the HPUX 10.20 sed can't process this invocation
322
 
  # correctly.  Breaking it into two sed invocations is a workaround.
323
 
  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
324
 
    sed -e 's/$/ :/' >> "$depfile"
 
323
  sed -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \
 
324
    < "$tmpdepfile" > "$depfile"
 
325
  sed '
 
326
    s/[ '"$tab"'][ '"$tab"']*/ /g
 
327
    s/^ *//
 
328
    s/ *\\*$//
 
329
    s/^[^:]*: *//
 
330
    /^$/d
 
331
    /:$/d
 
332
    s/$/ :/
 
333
  ' < "$tmpdepfile" >> "$depfile"
325
334
  rm -f "$tmpdepfile"
326
335
  ;;
327
336