1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ipc/chromium/src/third_party/libevent/depcomp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,708 @@ 1.4 +#! /bin/sh 1.5 +# depcomp - compile a program generating dependencies as side-effects 1.6 + 1.7 +scriptversion=2012-03-27.16; # UTC 1.8 + 1.9 +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, 1.10 +# 2011, 2012 Free Software Foundation, Inc. 1.11 + 1.12 +# This program is free software; you can redistribute it and/or modify 1.13 +# it under the terms of the GNU General Public License as published by 1.14 +# the Free Software Foundation; either version 2, or (at your option) 1.15 +# any later version. 1.16 + 1.17 +# This program is distributed in the hope that it will be useful, 1.18 +# but WITHOUT ANY WARRANTY; without even the implied warranty of 1.19 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1.20 +# GNU General Public License for more details. 1.21 + 1.22 +# You should have received a copy of the GNU General Public License 1.23 +# along with this program. If not, see <http://www.gnu.org/licenses/>. 1.24 + 1.25 +# As a special exception to the GNU General Public License, if you 1.26 +# distribute this file as part of a program that contains a 1.27 +# configuration script generated by Autoconf, you may include it under 1.28 +# the same distribution terms that you use for the rest of that program. 1.29 + 1.30 +# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. 1.31 + 1.32 +case $1 in 1.33 + '') 1.34 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 1.35 + exit 1; 1.36 + ;; 1.37 + -h | --h*) 1.38 + cat <<\EOF 1.39 +Usage: depcomp [--help] [--version] PROGRAM [ARGS] 1.40 + 1.41 +Run PROGRAMS ARGS to compile a file, generating dependencies 1.42 +as side-effects. 1.43 + 1.44 +Environment variables: 1.45 + depmode Dependency tracking mode. 1.46 + source Source file read by 'PROGRAMS ARGS'. 1.47 + object Object file output by 'PROGRAMS ARGS'. 1.48 + DEPDIR directory where to store dependencies. 1.49 + depfile Dependency file to output. 1.50 + tmpdepfile Temporary file to use when outputting dependencies. 1.51 + libtool Whether libtool is used (yes/no). 1.52 + 1.53 +Report bugs to <bug-automake@gnu.org>. 1.54 +EOF 1.55 + exit $? 1.56 + ;; 1.57 + -v | --v*) 1.58 + echo "depcomp $scriptversion" 1.59 + exit $? 1.60 + ;; 1.61 +esac 1.62 + 1.63 +# A tabulation character. 1.64 +tab=' ' 1.65 +# A newline character. 1.66 +nl=' 1.67 +' 1.68 + 1.69 +if test -z "$depmode" || test -z "$source" || test -z "$object"; then 1.70 + echo "depcomp: Variables source, object and depmode must be set" 1>&2 1.71 + exit 1 1.72 +fi 1.73 + 1.74 +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. 1.75 +depfile=${depfile-`echo "$object" | 1.76 + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} 1.77 +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} 1.78 + 1.79 +rm -f "$tmpdepfile" 1.80 + 1.81 +# Some modes work just like other modes, but use different flags. We 1.82 +# parameterize here, but still list the modes in the big case below, 1.83 +# to make depend.m4 easier to write. Note that we *cannot* use a case 1.84 +# here, because this file can only contain one case statement. 1.85 +if test "$depmode" = hp; then 1.86 + # HP compiler uses -M and no extra arg. 1.87 + gccflag=-M 1.88 + depmode=gcc 1.89 +fi 1.90 + 1.91 +if test "$depmode" = dashXmstdout; then 1.92 + # This is just like dashmstdout with a different argument. 1.93 + dashmflag=-xM 1.94 + depmode=dashmstdout 1.95 +fi 1.96 + 1.97 +cygpath_u="cygpath -u -f -" 1.98 +if test "$depmode" = msvcmsys; then 1.99 + # This is just like msvisualcpp but w/o cygpath translation. 1.100 + # Just convert the backslash-escaped backslashes to single forward 1.101 + # slashes to satisfy depend.m4 1.102 + cygpath_u='sed s,\\\\,/,g' 1.103 + depmode=msvisualcpp 1.104 +fi 1.105 + 1.106 +if test "$depmode" = msvc7msys; then 1.107 + # This is just like msvc7 but w/o cygpath translation. 1.108 + # Just convert the backslash-escaped backslashes to single forward 1.109 + # slashes to satisfy depend.m4 1.110 + cygpath_u='sed s,\\\\,/,g' 1.111 + depmode=msvc7 1.112 +fi 1.113 + 1.114 +if test "$depmode" = xlc; then 1.115 + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. 1.116 + gccflag=-qmakedep=gcc,-MF 1.117 + depmode=gcc 1.118 +fi 1.119 + 1.120 +case "$depmode" in 1.121 +gcc3) 1.122 +## gcc 3 implements dependency tracking that does exactly what 1.123 +## we want. Yay! Note: for some reason libtool 1.4 doesn't like 1.124 +## it if -MD -MP comes after the -MF stuff. Hmm. 1.125 +## Unfortunately, FreeBSD c89 acceptance of flags depends upon 1.126 +## the command line argument order; so add the flags where they 1.127 +## appear in depend2.am. Note that the slowdown incurred here 1.128 +## affects only configure: in makefiles, %FASTDEP% shortcuts this. 1.129 + for arg 1.130 + do 1.131 + case $arg in 1.132 + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; 1.133 + *) set fnord "$@" "$arg" ;; 1.134 + esac 1.135 + shift # fnord 1.136 + shift # $arg 1.137 + done 1.138 + "$@" 1.139 + stat=$? 1.140 + if test $stat -eq 0; then : 1.141 + else 1.142 + rm -f "$tmpdepfile" 1.143 + exit $stat 1.144 + fi 1.145 + mv "$tmpdepfile" "$depfile" 1.146 + ;; 1.147 + 1.148 +gcc) 1.149 +## There are various ways to get dependency output from gcc. Here's 1.150 +## why we pick this rather obscure method: 1.151 +## - Don't want to use -MD because we'd like the dependencies to end 1.152 +## up in a subdir. Having to rename by hand is ugly. 1.153 +## (We might end up doing this anyway to support other compilers.) 1.154 +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like 1.155 +## -MM, not -M (despite what the docs say). 1.156 +## - Using -M directly means running the compiler twice (even worse 1.157 +## than renaming). 1.158 + if test -z "$gccflag"; then 1.159 + gccflag=-MD, 1.160 + fi 1.161 + "$@" -Wp,"$gccflag$tmpdepfile" 1.162 + stat=$? 1.163 + if test $stat -eq 0; then : 1.164 + else 1.165 + rm -f "$tmpdepfile" 1.166 + exit $stat 1.167 + fi 1.168 + rm -f "$depfile" 1.169 + echo "$object : \\" > "$depfile" 1.170 + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 1.171 +## The second -e expression handles DOS-style file names with drive letters. 1.172 + sed -e 's/^[^:]*: / /' \ 1.173 + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" 1.174 +## This next piece of magic avoids the "deleted header file" problem. 1.175 +## The problem is that when a header file which appears in a .P file 1.176 +## is deleted, the dependency causes make to die (because there is 1.177 +## typically no way to rebuild the header). We avoid this by adding 1.178 +## dummy dependencies for each header file. Too bad gcc doesn't do 1.179 +## this for us directly. 1.180 + tr ' ' "$nl" < "$tmpdepfile" | 1.181 +## Some versions of gcc put a space before the ':'. On the theory 1.182 +## that the space means something, we add a space to the output as 1.183 +## well. hp depmode also adds that space, but also prefixes the VPATH 1.184 +## to the object. Take care to not repeat it in the output. 1.185 +## Some versions of the HPUX 10.20 sed can't process this invocation 1.186 +## correctly. Breaking it into two sed invocations is a workaround. 1.187 + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ 1.188 + | sed -e 's/$/ :/' >> "$depfile" 1.189 + rm -f "$tmpdepfile" 1.190 + ;; 1.191 + 1.192 +hp) 1.193 + # This case exists only to let depend.m4 do its work. It works by 1.194 + # looking at the text of this script. This case will never be run, 1.195 + # since it is checked for above. 1.196 + exit 1 1.197 + ;; 1.198 + 1.199 +sgi) 1.200 + if test "$libtool" = yes; then 1.201 + "$@" "-Wp,-MDupdate,$tmpdepfile" 1.202 + else 1.203 + "$@" -MDupdate "$tmpdepfile" 1.204 + fi 1.205 + stat=$? 1.206 + if test $stat -eq 0; then : 1.207 + else 1.208 + rm -f "$tmpdepfile" 1.209 + exit $stat 1.210 + fi 1.211 + rm -f "$depfile" 1.212 + 1.213 + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files 1.214 + echo "$object : \\" > "$depfile" 1.215 + 1.216 + # Clip off the initial element (the dependent). Don't try to be 1.217 + # clever and replace this with sed code, as IRIX sed won't handle 1.218 + # lines with more than a fixed number of characters (4096 in 1.219 + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; 1.220 + # the IRIX cc adds comments like '#:fec' to the end of the 1.221 + # dependency line. 1.222 + tr ' ' "$nl" < "$tmpdepfile" \ 1.223 + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ 1.224 + tr "$nl" ' ' >> "$depfile" 1.225 + echo >> "$depfile" 1.226 + 1.227 + # The second pass generates a dummy entry for each header file. 1.228 + tr ' ' "$nl" < "$tmpdepfile" \ 1.229 + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ 1.230 + >> "$depfile" 1.231 + else 1.232 + # The sourcefile does not contain any dependencies, so just 1.233 + # store a dummy comment line, to avoid errors with the Makefile 1.234 + # "include basename.Plo" scheme. 1.235 + echo "#dummy" > "$depfile" 1.236 + fi 1.237 + rm -f "$tmpdepfile" 1.238 + ;; 1.239 + 1.240 +xlc) 1.241 + # This case exists only to let depend.m4 do its work. It works by 1.242 + # looking at the text of this script. This case will never be run, 1.243 + # since it is checked for above. 1.244 + exit 1 1.245 + ;; 1.246 + 1.247 +aix) 1.248 + # The C for AIX Compiler uses -M and outputs the dependencies 1.249 + # in a .u file. In older versions, this file always lives in the 1.250 + # current directory. Also, the AIX compiler puts '$object:' at the 1.251 + # start of each line; $object doesn't have directory information. 1.252 + # Version 6 uses the directory in both cases. 1.253 + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` 1.254 + test "x$dir" = "x$object" && dir= 1.255 + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 1.256 + if test "$libtool" = yes; then 1.257 + tmpdepfile1=$dir$base.u 1.258 + tmpdepfile2=$base.u 1.259 + tmpdepfile3=$dir.libs/$base.u 1.260 + "$@" -Wc,-M 1.261 + else 1.262 + tmpdepfile1=$dir$base.u 1.263 + tmpdepfile2=$dir$base.u 1.264 + tmpdepfile3=$dir$base.u 1.265 + "$@" -M 1.266 + fi 1.267 + stat=$? 1.268 + 1.269 + if test $stat -eq 0; then : 1.270 + else 1.271 + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 1.272 + exit $stat 1.273 + fi 1.274 + 1.275 + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 1.276 + do 1.277 + test -f "$tmpdepfile" && break 1.278 + done 1.279 + if test -f "$tmpdepfile"; then 1.280 + # Each line is of the form 'foo.o: dependent.h'. 1.281 + # Do two passes, one to just change these to 1.282 + # '$object: dependent.h' and one to simply 'dependent.h:'. 1.283 + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" 1.284 + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" 1.285 + else 1.286 + # The sourcefile does not contain any dependencies, so just 1.287 + # store a dummy comment line, to avoid errors with the Makefile 1.288 + # "include basename.Plo" scheme. 1.289 + echo "#dummy" > "$depfile" 1.290 + fi 1.291 + rm -f "$tmpdepfile" 1.292 + ;; 1.293 + 1.294 +icc) 1.295 + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. 1.296 + # However on 1.297 + # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c 1.298 + # ICC 7.0 will fill foo.d with something like 1.299 + # foo.o: sub/foo.c 1.300 + # foo.o: sub/foo.h 1.301 + # which is wrong. We want 1.302 + # sub/foo.o: sub/foo.c 1.303 + # sub/foo.o: sub/foo.h 1.304 + # sub/foo.c: 1.305 + # sub/foo.h: 1.306 + # ICC 7.1 will output 1.307 + # foo.o: sub/foo.c sub/foo.h 1.308 + # and will wrap long lines using '\': 1.309 + # foo.o: sub/foo.c ... \ 1.310 + # sub/foo.h ... \ 1.311 + # ... 1.312 + # tcc 0.9.26 (FIXME still under development at the moment of writing) 1.313 + # will emit a similar output, but also prepend the continuation lines 1.314 + # with horizontal tabulation characters. 1.315 + "$@" -MD -MF "$tmpdepfile" 1.316 + stat=$? 1.317 + if test $stat -eq 0; then : 1.318 + else 1.319 + rm -f "$tmpdepfile" 1.320 + exit $stat 1.321 + fi 1.322 + rm -f "$depfile" 1.323 + # Each line is of the form 'foo.o: dependent.h', 1.324 + # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. 1.325 + # Do two passes, one to just change these to 1.326 + # '$object: dependent.h' and one to simply 'dependent.h:'. 1.327 + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ 1.328 + < "$tmpdepfile" > "$depfile" 1.329 + sed ' 1.330 + s/[ '"$tab"'][ '"$tab"']*/ /g 1.331 + s/^ *// 1.332 + s/ *\\*$// 1.333 + s/^[^:]*: *// 1.334 + /^$/d 1.335 + /:$/d 1.336 + s/$/ :/ 1.337 + ' < "$tmpdepfile" >> "$depfile" 1.338 + rm -f "$tmpdepfile" 1.339 + ;; 1.340 + 1.341 +hp2) 1.342 + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 1.343 + # compilers, which have integrated preprocessors. The correct option 1.344 + # to use with these is +Maked; it writes dependencies to a file named 1.345 + # 'foo.d', which lands next to the object file, wherever that 1.346 + # happens to be. 1.347 + # Much of this is similar to the tru64 case; see comments there. 1.348 + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` 1.349 + test "x$dir" = "x$object" && dir= 1.350 + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 1.351 + if test "$libtool" = yes; then 1.352 + tmpdepfile1=$dir$base.d 1.353 + tmpdepfile2=$dir.libs/$base.d 1.354 + "$@" -Wc,+Maked 1.355 + else 1.356 + tmpdepfile1=$dir$base.d 1.357 + tmpdepfile2=$dir$base.d 1.358 + "$@" +Maked 1.359 + fi 1.360 + stat=$? 1.361 + if test $stat -eq 0; then : 1.362 + else 1.363 + rm -f "$tmpdepfile1" "$tmpdepfile2" 1.364 + exit $stat 1.365 + fi 1.366 + 1.367 + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" 1.368 + do 1.369 + test -f "$tmpdepfile" && break 1.370 + done 1.371 + if test -f "$tmpdepfile"; then 1.372 + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" 1.373 + # Add 'dependent.h:' lines. 1.374 + sed -ne '2,${ 1.375 + s/^ *// 1.376 + s/ \\*$// 1.377 + s/$/:/ 1.378 + p 1.379 + }' "$tmpdepfile" >> "$depfile" 1.380 + else 1.381 + echo "#dummy" > "$depfile" 1.382 + fi 1.383 + rm -f "$tmpdepfile" "$tmpdepfile2" 1.384 + ;; 1.385 + 1.386 +tru64) 1.387 + # The Tru64 compiler uses -MD to generate dependencies as a side 1.388 + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. 1.389 + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put 1.390 + # dependencies in 'foo.d' instead, so we check for that too. 1.391 + # Subdirectories are respected. 1.392 + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` 1.393 + test "x$dir" = "x$object" && dir= 1.394 + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 1.395 + 1.396 + if test "$libtool" = yes; then 1.397 + # With Tru64 cc, shared objects can also be used to make a 1.398 + # static library. This mechanism is used in libtool 1.4 series to 1.399 + # handle both shared and static libraries in a single compilation. 1.400 + # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. 1.401 + # 1.402 + # With libtool 1.5 this exception was removed, and libtool now 1.403 + # generates 2 separate objects for the 2 libraries. These two 1.404 + # compilations output dependencies in $dir.libs/$base.o.d and 1.405 + # in $dir$base.o.d. We have to check for both files, because 1.406 + # one of the two compilations can be disabled. We should prefer 1.407 + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is 1.408 + # automatically cleaned when .libs/ is deleted, while ignoring 1.409 + # the former would cause a distcleancheck panic. 1.410 + tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 1.411 + tmpdepfile2=$dir$base.o.d # libtool 1.5 1.412 + tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 1.413 + tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 1.414 + "$@" -Wc,-MD 1.415 + else 1.416 + tmpdepfile1=$dir$base.o.d 1.417 + tmpdepfile2=$dir$base.d 1.418 + tmpdepfile3=$dir$base.d 1.419 + tmpdepfile4=$dir$base.d 1.420 + "$@" -MD 1.421 + fi 1.422 + 1.423 + stat=$? 1.424 + if test $stat -eq 0; then : 1.425 + else 1.426 + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" 1.427 + exit $stat 1.428 + fi 1.429 + 1.430 + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" 1.431 + do 1.432 + test -f "$tmpdepfile" && break 1.433 + done 1.434 + if test -f "$tmpdepfile"; then 1.435 + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" 1.436 + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" 1.437 + else 1.438 + echo "#dummy" > "$depfile" 1.439 + fi 1.440 + rm -f "$tmpdepfile" 1.441 + ;; 1.442 + 1.443 +msvc7) 1.444 + if test "$libtool" = yes; then 1.445 + showIncludes=-Wc,-showIncludes 1.446 + else 1.447 + showIncludes=-showIncludes 1.448 + fi 1.449 + "$@" $showIncludes > "$tmpdepfile" 1.450 + stat=$? 1.451 + grep -v '^Note: including file: ' "$tmpdepfile" 1.452 + if test "$stat" = 0; then : 1.453 + else 1.454 + rm -f "$tmpdepfile" 1.455 + exit $stat 1.456 + fi 1.457 + rm -f "$depfile" 1.458 + echo "$object : \\" > "$depfile" 1.459 + # The first sed program below extracts the file names and escapes 1.460 + # backslashes for cygpath. The second sed program outputs the file 1.461 + # name when reading, but also accumulates all include files in the 1.462 + # hold buffer in order to output them again at the end. This only 1.463 + # works with sed implementations that can handle large buffers. 1.464 + sed < "$tmpdepfile" -n ' 1.465 +/^Note: including file: *\(.*\)/ { 1.466 + s//\1/ 1.467 + s/\\/\\\\/g 1.468 + p 1.469 +}' | $cygpath_u | sort -u | sed -n ' 1.470 +s/ /\\ /g 1.471 +s/\(.*\)/'"$tab"'\1 \\/p 1.472 +s/.\(.*\) \\/\1:/ 1.473 +H 1.474 +$ { 1.475 + s/.*/'"$tab"'/ 1.476 + G 1.477 + p 1.478 +}' >> "$depfile" 1.479 + rm -f "$tmpdepfile" 1.480 + ;; 1.481 + 1.482 +msvc7msys) 1.483 + # This case exists only to let depend.m4 do its work. It works by 1.484 + # looking at the text of this script. This case will never be run, 1.485 + # since it is checked for above. 1.486 + exit 1 1.487 + ;; 1.488 + 1.489 +#nosideeffect) 1.490 + # This comment above is used by automake to tell side-effect 1.491 + # dependency tracking mechanisms from slower ones. 1.492 + 1.493 +dashmstdout) 1.494 + # Important note: in order to support this mode, a compiler *must* 1.495 + # always write the preprocessed file to stdout, regardless of -o. 1.496 + "$@" || exit $? 1.497 + 1.498 + # Remove the call to Libtool. 1.499 + if test "$libtool" = yes; then 1.500 + while test "X$1" != 'X--mode=compile'; do 1.501 + shift 1.502 + done 1.503 + shift 1.504 + fi 1.505 + 1.506 + # Remove '-o $object'. 1.507 + IFS=" " 1.508 + for arg 1.509 + do 1.510 + case $arg in 1.511 + -o) 1.512 + shift 1.513 + ;; 1.514 + $object) 1.515 + shift 1.516 + ;; 1.517 + *) 1.518 + set fnord "$@" "$arg" 1.519 + shift # fnord 1.520 + shift # $arg 1.521 + ;; 1.522 + esac 1.523 + done 1.524 + 1.525 + test -z "$dashmflag" && dashmflag=-M 1.526 + # Require at least two characters before searching for ':' 1.527 + # in the target name. This is to cope with DOS-style filenames: 1.528 + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. 1.529 + "$@" $dashmflag | 1.530 + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" 1.531 + rm -f "$depfile" 1.532 + cat < "$tmpdepfile" > "$depfile" 1.533 + tr ' ' "$nl" < "$tmpdepfile" | \ 1.534 +## Some versions of the HPUX 10.20 sed can't process this invocation 1.535 +## correctly. Breaking it into two sed invocations is a workaround. 1.536 + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" 1.537 + rm -f "$tmpdepfile" 1.538 + ;; 1.539 + 1.540 +dashXmstdout) 1.541 + # This case only exists to satisfy depend.m4. It is never actually 1.542 + # run, as this mode is specially recognized in the preamble. 1.543 + exit 1 1.544 + ;; 1.545 + 1.546 +makedepend) 1.547 + "$@" || exit $? 1.548 + # Remove any Libtool call 1.549 + if test "$libtool" = yes; then 1.550 + while test "X$1" != 'X--mode=compile'; do 1.551 + shift 1.552 + done 1.553 + shift 1.554 + fi 1.555 + # X makedepend 1.556 + shift 1.557 + cleared=no eat=no 1.558 + for arg 1.559 + do 1.560 + case $cleared in 1.561 + no) 1.562 + set ""; shift 1.563 + cleared=yes ;; 1.564 + esac 1.565 + if test $eat = yes; then 1.566 + eat=no 1.567 + continue 1.568 + fi 1.569 + case "$arg" in 1.570 + -D*|-I*) 1.571 + set fnord "$@" "$arg"; shift ;; 1.572 + # Strip any option that makedepend may not understand. Remove 1.573 + # the object too, otherwise makedepend will parse it as a source file. 1.574 + -arch) 1.575 + eat=yes ;; 1.576 + -*|$object) 1.577 + ;; 1.578 + *) 1.579 + set fnord "$@" "$arg"; shift ;; 1.580 + esac 1.581 + done 1.582 + obj_suffix=`echo "$object" | sed 's/^.*\././'` 1.583 + touch "$tmpdepfile" 1.584 + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" 1.585 + rm -f "$depfile" 1.586 + # makedepend may prepend the VPATH from the source file name to the object. 1.587 + # No need to regex-escape $object, excess matching of '.' is harmless. 1.588 + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" 1.589 + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ 1.590 +## Some versions of the HPUX 10.20 sed can't process this invocation 1.591 +## correctly. Breaking it into two sed invocations is a workaround. 1.592 + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" 1.593 + rm -f "$tmpdepfile" "$tmpdepfile".bak 1.594 + ;; 1.595 + 1.596 +cpp) 1.597 + # Important note: in order to support this mode, a compiler *must* 1.598 + # always write the preprocessed file to stdout. 1.599 + "$@" || exit $? 1.600 + 1.601 + # Remove the call to Libtool. 1.602 + if test "$libtool" = yes; then 1.603 + while test "X$1" != 'X--mode=compile'; do 1.604 + shift 1.605 + done 1.606 + shift 1.607 + fi 1.608 + 1.609 + # Remove '-o $object'. 1.610 + IFS=" " 1.611 + for arg 1.612 + do 1.613 + case $arg in 1.614 + -o) 1.615 + shift 1.616 + ;; 1.617 + $object) 1.618 + shift 1.619 + ;; 1.620 + *) 1.621 + set fnord "$@" "$arg" 1.622 + shift # fnord 1.623 + shift # $arg 1.624 + ;; 1.625 + esac 1.626 + done 1.627 + 1.628 + "$@" -E | 1.629 + sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ 1.630 + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | 1.631 + sed '$ s: \\$::' > "$tmpdepfile" 1.632 + rm -f "$depfile" 1.633 + echo "$object : \\" > "$depfile" 1.634 + cat < "$tmpdepfile" >> "$depfile" 1.635 + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" 1.636 + rm -f "$tmpdepfile" 1.637 + ;; 1.638 + 1.639 +msvisualcpp) 1.640 + # Important note: in order to support this mode, a compiler *must* 1.641 + # always write the preprocessed file to stdout. 1.642 + "$@" || exit $? 1.643 + 1.644 + # Remove the call to Libtool. 1.645 + if test "$libtool" = yes; then 1.646 + while test "X$1" != 'X--mode=compile'; do 1.647 + shift 1.648 + done 1.649 + shift 1.650 + fi 1.651 + 1.652 + IFS=" " 1.653 + for arg 1.654 + do 1.655 + case "$arg" in 1.656 + -o) 1.657 + shift 1.658 + ;; 1.659 + $object) 1.660 + shift 1.661 + ;; 1.662 + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") 1.663 + set fnord "$@" 1.664 + shift 1.665 + shift 1.666 + ;; 1.667 + *) 1.668 + set fnord "$@" "$arg" 1.669 + shift 1.670 + shift 1.671 + ;; 1.672 + esac 1.673 + done 1.674 + "$@" -E 2>/dev/null | 1.675 + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" 1.676 + rm -f "$depfile" 1.677 + echo "$object : \\" > "$depfile" 1.678 + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" 1.679 + echo "$tab" >> "$depfile" 1.680 + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" 1.681 + rm -f "$tmpdepfile" 1.682 + ;; 1.683 + 1.684 +msvcmsys) 1.685 + # This case exists only to let depend.m4 do its work. It works by 1.686 + # looking at the text of this script. This case will never be run, 1.687 + # since it is checked for above. 1.688 + exit 1 1.689 + ;; 1.690 + 1.691 +none) 1.692 + exec "$@" 1.693 + ;; 1.694 + 1.695 +*) 1.696 + echo "Unknown depmode $depmode" 1>&2 1.697 + exit 1 1.698 + ;; 1.699 +esac 1.700 + 1.701 +exit 0 1.702 + 1.703 +# Local Variables: 1.704 +# mode: shell-script 1.705 +# sh-indentation: 2 1.706 +# eval: (add-hook 'write-file-hooks 'time-stamp) 1.707 +# time-stamp-start: "scriptversion=" 1.708 +# time-stamp-format: "%:y-%02m-%02d.%02H" 1.709 +# time-stamp-time-zone: "UTC" 1.710 +# time-stamp-end: "; # UTC" 1.711 +# End: