summaryrefslogtreecommitdiffstats
path: root/depcomp
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2005-06-13 08:26:05 +0000
committerZack Weinberg <zack@gcc.gnu.org>2005-06-13 08:26:05 +0000
commitf610dd5f4ceb8239c61ee33863760d39f3b28162 (patch)
tree8d909ddb31d50f61cae9acff0f19678ba54b6b88 /depcomp
parenttrans-array.c (gfc_conv_descriptor_data_get): Rename from gfc_conv_descriptor... (diff)
downloadgcc-f610dd5f4ceb8239c61ee33863760d39f3b28162.tar.gz
gcc-f610dd5f4ceb8239c61ee33863760d39f3b28162.tar.bz2
gcc-f610dd5f4ceb8239c61ee33863760d39f3b28162.tar.xz
top level:
* depcomp: Update from automake CVS. Add 'ia64hp' stanza. In 'cpp' stanza, support '#line' as well as '# '. config: * depstand.m4, lead-dot.m4: New files. libcpp: * configure.ac: Invoke ZW_CREATE_DEPDIR and ZW_PROG_COMPILER_DEPENDENCIES. * aclocal.m4, configure: Regenerate. * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE): New variables. (distclean): Clean up $(DEPDIR) and its contents. (.c.o): Use $(COMPILE). Include $(DEPDIR)/*.Po for most object->header dependencies. From-SVN: r100874
Diffstat (limited to 'depcomp')
-rwxr-xr-xdepcomp83
1 files changed, 57 insertions, 26 deletions
diff --git a/depcomp b/depcomp
index 11e2d3bfe1c..3510ab0ff53 100755
--- a/depcomp
+++ b/depcomp
@@ -1,9 +1,9 @@
1#! /bin/sh 1#! /bin/sh
2# depcomp - compile a program generating dependencies as side-effects 2# depcomp - compile a program generating dependencies as side-effects
3 3
4scriptversion=2004-05-31.23 4scriptversion=2005-05-16.16
5 5
6# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc. 6# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
7 7
8# This program is free software; you can redistribute it and/or modify 8# This program is free software; you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by 9# it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@ scriptversion=2004-05-31.23
17 17
18# You should have received a copy of the GNU General Public License 18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software 19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 20# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21# 02111-1307, USA. 21# 02110-1301, USA.
22 22
23# As a special exception to the GNU General Public License, if you 23# As a special exception to the GNU General Public License, if you
24# distribute this file as part of a program that contains a 24# distribute this file as part of a program that contains a
@@ -50,11 +50,11 @@ Environment variables:
50 50
51Report bugs to <bug-automake@gnu.org>. 51Report bugs to <bug-automake@gnu.org>.
52EOF 52EOF
53 exit 0 53 exit $?
54 ;; 54 ;;
55 -v | --v*) 55 -v | --v*)
56 echo "depcomp $scriptversion" 56 echo "depcomp $scriptversion"
57 exit 0 57 exit $?
58 ;; 58 ;;
59esac 59esac
60 60
@@ -276,6 +276,29 @@ icc)
276 rm -f "$tmpdepfile" 276 rm -f "$tmpdepfile"
277 ;; 277 ;;
278 278
279ia64hp)
280 # The "hp" stanza above does not work with HP's ia64 compilers,
281 # which have integrated preprocessors. The correct option to use
282 # with these is +Maked; it writes dependencies to a file named
283 # 'foo.d', which lands next to the object file, wherever that
284 # happens to be.
285 tmpdepfile=`echo "$object" | sed -e 's/\.o$/.d/'`
286 "$@" +Maked
287 stat=$?
288 if test $stat -eq 0; then :
289 else
290 rm -f "$tmpdepfile"
291 exit $stat
292 fi
293 rm -f "$depfile"
294
295 # The object file name is correct already.
296 cat "$tmpdepfile" > "$depfile"
297 # Add `dependent.h:' lines.
298 sed -ne '2,${; s/^ //; s/ \\*$//; s/$/:/; p; }' "$tmpdepfile" >> "$depfile"
299 rm -f "$tmpdepfile"
300 ;;
301
279tru64) 302tru64)
280 # The Tru64 compiler uses -MD to generate dependencies as a side 303 # The Tru64 compiler uses -MD to generate dependencies as a side
281 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. 304 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -287,36 +310,43 @@ tru64)
287 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 310 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
288 311
289 if test "$libtool" = yes; then 312 if test "$libtool" = yes; then
290 # Dependencies are output in .lo.d with libtool 1.4. 313 # With Tru64 cc, shared objects can also be used to make a
291 # With libtool 1.5 they are output both in $dir.libs/$base.o.d 314 # static library. This mecanism is used in libtool 1.4 series to
292 # and in $dir.libs/$base.o.d and $dir$base.o.d. We process the 315 # handle both shared and static libraries in a single compilation.
293 # latter, because the former will be cleaned when $dir.libs is 316 # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
294 # erased. 317 #
295 tmpdepfile1="$dir.libs/$base.lo.d" 318 # With libtool 1.5 this exception was removed, and libtool now
296 tmpdepfile2="$dir$base.o.d" 319 # generates 2 separate objects for the 2 libraries. These two
297 tmpdepfile3="$dir.libs/$base.d" 320 # compilations output dependencies in in $dir.libs/$base.o.d and
321 # in $dir$base.o.d. We have to check for both files, because
322 # one of the two compilations can be disabled. We should prefer
323 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
324 # automatically cleaned when .libs/ is deleted, while ignoring
325 # the former would cause a distcleancheck panic.
326 tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
327 tmpdepfile2=$dir$base.o.d # libtool 1.5
328 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
329 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
298 "$@" -Wc,-MD 330 "$@" -Wc,-MD
299 else 331 else
300 tmpdepfile1="$dir$base.o.d" 332 tmpdepfile1=$dir$base.o.d
301 tmpdepfile2="$dir$base.d" 333 tmpdepfile2=$dir$base.d
302 tmpdepfile3="$dir$base.d" 334 tmpdepfile3=$dir$base.d
335 tmpdepfile4=$dir$base.d
303 "$@" -MD 336 "$@" -MD
304 fi 337 fi
305 338
306 stat=$? 339 stat=$?
307 if test $stat -eq 0; then : 340 if test $stat -eq 0; then :
308 else 341 else
309 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 342 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
310 exit $stat 343 exit $stat
311 fi 344 fi
312 345
313 if test -f "$tmpdepfile1"; then 346 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
314 tmpdepfile="$tmpdepfile1" 347 do
315 elif test -f "$tmpdepfile2"; then 348 test -f "$tmpdepfile" && break
316 tmpdepfile="$tmpdepfile2" 349 done
317 else
318 tmpdepfile="$tmpdepfile3"
319 fi
320 if test -f "$tmpdepfile"; then 350 if test -f "$tmpdepfile"; then
321 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" 351 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
322 # That's a tab and a space in the []. 352 # That's a tab and a space in the [].
@@ -460,7 +490,8 @@ cpp)
460 done 490 done
461 491
462 "$@" -E | 492 "$@" -E |
463 sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | 493 sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
494 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
464 sed '$ s: \\$::' > "$tmpdepfile" 495 sed '$ s: \\$::' > "$tmpdepfile"
465 rm -f "$depfile" 496 rm -f "$depfile"
466 echo "$object : \\" > "$depfile" 497 echo "$object : \\" > "$depfile"