annotate depcomp @ 112453:06719a229a46 default tip

* calc/calc.el (calc-default-power-reference-level) (calc-default-field-reference-level): New variables. * calc/calc-units.el (math-standard-units): Add dB and Np. (math-logunits): New variable. (math-extract-logunits, math-logcombine, calcFunc-luplus) (calcFunc-luminus, calc-luplus, calc-luminus, math-logunit-level) (calcFunc-fieldlevel, calcFunc-powerlevel, calc-level): New functions. (math-find-base-units-rec): Add entry for ln(10). * calc/calc-help.el (calc-u-prefix-help): Add logarithmic help. (calc-ul-prefix-help): New function. * calc/calc-ext.el (calc-init-extensions): Autoload new units functions. Add keybindings for new units functions.
author Jay Belanger <jay.p.belanger@gmail.com>
date Sun, 23 Jan 2011 23:08:04 -0600
parents 16ae11ee4ab8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
112303
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
1 #! /bin/sh
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
2 # depcomp - compile a program generating dependencies as side-effects
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
3
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
4 scriptversion=2009-04-28.21; # UTC
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
5
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
6 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
7 # Software Foundation, Inc.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
8
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
9 # This program is free software; you can redistribute it and/or modify
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
10 # it under the terms of the GNU General Public License as published by
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
11 # the Free Software Foundation; either version 2, or (at your option)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
12 # any later version.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
13
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
14 # This program is distributed in the hope that it will be useful,
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
17 # GNU General Public License for more details.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
18
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
19 # You should have received a copy of the GNU General Public License
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
21
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
22 # As a special exception to the GNU General Public License, if you
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
23 # distribute this file as part of a program that contains a
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
24 # configuration script generated by Autoconf, you may include it under
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
25 # the same distribution terms that you use for the rest of that program.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
26
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
27 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
28
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
29 case $1 in
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
30 '')
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
31 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
32 exit 1;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
33 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
34 -h | --h*)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
35 cat <<\EOF
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
36 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
37
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
38 Run PROGRAMS ARGS to compile a file, generating dependencies
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
39 as side-effects.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
40
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
41 Environment variables:
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
42 depmode Dependency tracking mode.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
43 source Source file read by `PROGRAMS ARGS'.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
44 object Object file output by `PROGRAMS ARGS'.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
45 DEPDIR directory where to store dependencies.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
46 depfile Dependency file to output.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
47 tmpdepfile Temporary file to use when outputing dependencies.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
48 libtool Whether libtool is used (yes/no).
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
49
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
50 Report bugs to <bug-automake@gnu.org>.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
51 EOF
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
52 exit $?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
53 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
54 -v | --v*)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
55 echo "depcomp $scriptversion"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
56 exit $?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
57 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
58 esac
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
59
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
60 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
61 echo "depcomp: Variables source, object and depmode must be set" 1>&2
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
62 exit 1
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
63 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
64
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
65 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
66 depfile=${depfile-`echo "$object" |
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
67 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
68 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
69
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
70 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
71
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
72 # Some modes work just like other modes, but use different flags. We
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
73 # parameterize here, but still list the modes in the big case below,
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
74 # to make depend.m4 easier to write. Note that we *cannot* use a case
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
75 # here, because this file can only contain one case statement.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
76 if test "$depmode" = hp; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
77 # HP compiler uses -M and no extra arg.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
78 gccflag=-M
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
79 depmode=gcc
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
80 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
81
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
82 if test "$depmode" = dashXmstdout; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
83 # This is just like dashmstdout with a different argument.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
84 dashmflag=-xM
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
85 depmode=dashmstdout
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
86 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
87
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
88 cygpath_u="cygpath -u -f -"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
89 if test "$depmode" = msvcmsys; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
90 # This is just like msvisualcpp but w/o cygpath translation.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
91 # Just convert the backslash-escaped backslashes to single forward
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
92 # slashes to satisfy depend.m4
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
93 cygpath_u="sed s,\\\\\\\\,/,g"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
94 depmode=msvisualcpp
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
95 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
96
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
97 case "$depmode" in
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
98 gcc3)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
99 ## gcc 3 implements dependency tracking that does exactly what
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
100 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
101 ## it if -MD -MP comes after the -MF stuff. Hmm.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
102 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
103 ## the command line argument order; so add the flags where they
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
104 ## appear in depend2.am. Note that the slowdown incurred here
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
105 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
106 for arg
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
107 do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
108 case $arg in
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
109 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
110 *) set fnord "$@" "$arg" ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
111 esac
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
112 shift # fnord
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
113 shift # $arg
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
114 done
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
115 "$@"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
116 stat=$?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
117 if test $stat -eq 0; then :
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
118 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
119 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
120 exit $stat
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
121 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
122 mv "$tmpdepfile" "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
123 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
124
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
125 gcc)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
126 ## There are various ways to get dependency output from gcc. Here's
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
127 ## why we pick this rather obscure method:
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
128 ## - Don't want to use -MD because we'd like the dependencies to end
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
129 ## up in a subdir. Having to rename by hand is ugly.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
130 ## (We might end up doing this anyway to support other compilers.)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
131 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
132 ## -MM, not -M (despite what the docs say).
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
133 ## - Using -M directly means running the compiler twice (even worse
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
134 ## than renaming).
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
135 if test -z "$gccflag"; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
136 gccflag=-MD,
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
137 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
138 "$@" -Wp,"$gccflag$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
139 stat=$?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
140 if test $stat -eq 0; then :
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
141 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
142 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
143 exit $stat
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
144 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
145 rm -f "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
146 echo "$object : \\" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
147 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
148 ## The second -e expression handles DOS-style file names with drive letters.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
149 sed -e 's/^[^:]*: / /' \
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
150 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
151 ## This next piece of magic avoids the `deleted header file' problem.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
152 ## The problem is that when a header file which appears in a .P file
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
153 ## is deleted, the dependency causes make to die (because there is
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
154 ## typically no way to rebuild the header). We avoid this by adding
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
155 ## dummy dependencies for each header file. Too bad gcc doesn't do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
156 ## this for us directly.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
157 tr ' ' '
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
158 ' < "$tmpdepfile" |
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
159 ## Some versions of gcc put a space before the `:'. On the theory
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
160 ## that the space means something, we add a space to the output as
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
161 ## well.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
162 ## Some versions of the HPUX 10.20 sed can't process this invocation
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
163 ## correctly. Breaking it into two sed invocations is a workaround.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
164 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
165 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
166 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
167
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
168 hp)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
169 # This case exists only to let depend.m4 do its work. It works by
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
170 # looking at the text of this script. This case will never be run,
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
171 # since it is checked for above.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
172 exit 1
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
173 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
174
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
175 sgi)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
176 if test "$libtool" = yes; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
177 "$@" "-Wp,-MDupdate,$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
178 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
179 "$@" -MDupdate "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
180 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
181 stat=$?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
182 if test $stat -eq 0; then :
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
183 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
184 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
185 exit $stat
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
186 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
187 rm -f "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
188
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
189 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
190 echo "$object : \\" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
191
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
192 # Clip off the initial element (the dependent). Don't try to be
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
193 # clever and replace this with sed code, as IRIX sed won't handle
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
194 # lines with more than a fixed number of characters (4096 in
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
195 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
196 # the IRIX cc adds comments like `#:fec' to the end of the
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
197 # dependency line.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
198 tr ' ' '
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
199 ' < "$tmpdepfile" \
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
200 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
201 tr '
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
202 ' ' ' >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
203 echo >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
204
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
205 # The second pass generates a dummy entry for each header file.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
206 tr ' ' '
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
207 ' < "$tmpdepfile" \
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
208 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
209 >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
210 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
211 # The sourcefile does not contain any dependencies, so just
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
212 # store a dummy comment line, to avoid errors with the Makefile
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
213 # "include basename.Plo" scheme.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
214 echo "#dummy" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
215 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
216 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
217 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
218
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
219 aix)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
220 # The C for AIX Compiler uses -M and outputs the dependencies
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
221 # in a .u file. In older versions, this file always lives in the
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
222 # current directory. Also, the AIX compiler puts `$object:' at the
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
223 # start of each line; $object doesn't have directory information.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
224 # Version 6 uses the directory in both cases.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
225 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
226 test "x$dir" = "x$object" && dir=
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
227 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
228 if test "$libtool" = yes; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
229 tmpdepfile1=$dir$base.u
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
230 tmpdepfile2=$base.u
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
231 tmpdepfile3=$dir.libs/$base.u
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
232 "$@" -Wc,-M
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
233 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
234 tmpdepfile1=$dir$base.u
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
235 tmpdepfile2=$dir$base.u
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
236 tmpdepfile3=$dir$base.u
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
237 "$@" -M
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
238 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
239 stat=$?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
240
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
241 if test $stat -eq 0; then :
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
242 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
243 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
244 exit $stat
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
245 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
246
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
247 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
248 do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
249 test -f "$tmpdepfile" && break
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
250 done
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
251 if test -f "$tmpdepfile"; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
252 # Each line is of the form `foo.o: dependent.h'.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
253 # Do two passes, one to just change these to
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
254 # `$object: dependent.h' and one to simply `dependent.h:'.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
255 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
256 # That's a tab and a space in the [].
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
257 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
258 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
259 # The sourcefile does not contain any dependencies, so just
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
260 # store a dummy comment line, to avoid errors with the Makefile
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
261 # "include basename.Plo" scheme.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
262 echo "#dummy" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
263 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
264 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
265 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
266
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
267 icc)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
268 # Intel's C compiler understands `-MD -MF file'. However on
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
269 # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
270 # ICC 7.0 will fill foo.d with something like
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
271 # foo.o: sub/foo.c
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
272 # foo.o: sub/foo.h
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
273 # which is wrong. We want:
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
274 # sub/foo.o: sub/foo.c
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
275 # sub/foo.o: sub/foo.h
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
276 # sub/foo.c:
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
277 # sub/foo.h:
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
278 # ICC 7.1 will output
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
279 # foo.o: sub/foo.c sub/foo.h
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
280 # and will wrap long lines using \ :
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
281 # foo.o: sub/foo.c ... \
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
282 # sub/foo.h ... \
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
283 # ...
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
284
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
285 "$@" -MD -MF "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
286 stat=$?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
287 if test $stat -eq 0; then :
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
288 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
289 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
290 exit $stat
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
291 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
292 rm -f "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
293 # Each line is of the form `foo.o: dependent.h',
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
294 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
295 # Do two passes, one to just change these to
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
296 # `$object: dependent.h' and one to simply `dependent.h:'.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
297 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
298 # Some versions of the HPUX 10.20 sed can't process this invocation
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
299 # correctly. Breaking it into two sed invocations is a workaround.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
300 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
301 sed -e 's/$/ :/' >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
302 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
303 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
304
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
305 hp2)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
306 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
307 # compilers, which have integrated preprocessors. The correct option
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
308 # to use with these is +Maked; it writes dependencies to a file named
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
309 # 'foo.d', which lands next to the object file, wherever that
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
310 # happens to be.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
311 # Much of this is similar to the tru64 case; see comments there.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
312 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
313 test "x$dir" = "x$object" && dir=
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
314 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
315 if test "$libtool" = yes; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
316 tmpdepfile1=$dir$base.d
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
317 tmpdepfile2=$dir.libs/$base.d
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
318 "$@" -Wc,+Maked
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
319 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
320 tmpdepfile1=$dir$base.d
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
321 tmpdepfile2=$dir$base.d
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
322 "$@" +Maked
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
323 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
324 stat=$?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
325 if test $stat -eq 0; then :
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
326 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
327 rm -f "$tmpdepfile1" "$tmpdepfile2"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
328 exit $stat
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
329 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
330
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
331 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
332 do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
333 test -f "$tmpdepfile" && break
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
334 done
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
335 if test -f "$tmpdepfile"; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
336 sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
337 # Add `dependent.h:' lines.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
338 sed -ne '2,${
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
339 s/^ *//
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
340 s/ \\*$//
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
341 s/$/:/
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
342 p
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
343 }' "$tmpdepfile" >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
344 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
345 echo "#dummy" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
346 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
347 rm -f "$tmpdepfile" "$tmpdepfile2"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
348 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
349
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
350 tru64)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
351 # The Tru64 compiler uses -MD to generate dependencies as a side
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
352 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
353 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
354 # dependencies in `foo.d' instead, so we check for that too.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
355 # Subdirectories are respected.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
356 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
357 test "x$dir" = "x$object" && dir=
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
358 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
359
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
360 if test "$libtool" = yes; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
361 # With Tru64 cc, shared objects can also be used to make a
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
362 # static library. This mechanism is used in libtool 1.4 series to
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
363 # handle both shared and static libraries in a single compilation.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
364 # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
365 #
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
366 # With libtool 1.5 this exception was removed, and libtool now
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
367 # generates 2 separate objects for the 2 libraries. These two
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
368 # compilations output dependencies in $dir.libs/$base.o.d and
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
369 # in $dir$base.o.d. We have to check for both files, because
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
370 # one of the two compilations can be disabled. We should prefer
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
371 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
372 # automatically cleaned when .libs/ is deleted, while ignoring
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
373 # the former would cause a distcleancheck panic.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
374 tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
375 tmpdepfile2=$dir$base.o.d # libtool 1.5
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
376 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
377 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
378 "$@" -Wc,-MD
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
379 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
380 tmpdepfile1=$dir$base.o.d
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
381 tmpdepfile2=$dir$base.d
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
382 tmpdepfile3=$dir$base.d
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
383 tmpdepfile4=$dir$base.d
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
384 "$@" -MD
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
385 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
386
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
387 stat=$?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
388 if test $stat -eq 0; then :
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
389 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
390 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
391 exit $stat
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
392 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
393
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
394 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
395 do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
396 test -f "$tmpdepfile" && break
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
397 done
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
398 if test -f "$tmpdepfile"; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
399 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
400 # That's a tab and a space in the [].
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
401 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
402 else
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
403 echo "#dummy" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
404 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
405 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
406 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
407
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
408 #nosideeffect)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
409 # This comment above is used by automake to tell side-effect
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
410 # dependency tracking mechanisms from slower ones.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
411
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
412 dashmstdout)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
413 # Important note: in order to support this mode, a compiler *must*
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
414 # always write the preprocessed file to stdout, regardless of -o.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
415 "$@" || exit $?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
416
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
417 # Remove the call to Libtool.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
418 if test "$libtool" = yes; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
419 while test "X$1" != 'X--mode=compile'; do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
420 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
421 done
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
422 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
423 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
424
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
425 # Remove `-o $object'.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
426 IFS=" "
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
427 for arg
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
428 do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
429 case $arg in
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
430 -o)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
431 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
432 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
433 $object)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
434 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
435 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
436 *)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
437 set fnord "$@" "$arg"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
438 shift # fnord
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
439 shift # $arg
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
440 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
441 esac
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
442 done
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
443
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
444 test -z "$dashmflag" && dashmflag=-M
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
445 # Require at least two characters before searching for `:'
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
446 # in the target name. This is to cope with DOS-style filenames:
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
447 # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
448 "$@" $dashmflag |
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
449 sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
450 rm -f "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
451 cat < "$tmpdepfile" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
452 tr ' ' '
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
453 ' < "$tmpdepfile" | \
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
454 ## Some versions of the HPUX 10.20 sed can't process this invocation
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
455 ## correctly. Breaking it into two sed invocations is a workaround.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
456 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
457 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
458 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
459
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
460 dashXmstdout)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
461 # This case only exists to satisfy depend.m4. It is never actually
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
462 # run, as this mode is specially recognized in the preamble.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
463 exit 1
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
464 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
465
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
466 makedepend)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
467 "$@" || exit $?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
468 # Remove any Libtool call
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
469 if test "$libtool" = yes; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
470 while test "X$1" != 'X--mode=compile'; do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
471 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
472 done
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
473 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
474 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
475 # X makedepend
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
476 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
477 cleared=no eat=no
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
478 for arg
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
479 do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
480 case $cleared in
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
481 no)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
482 set ""; shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
483 cleared=yes ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
484 esac
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
485 if test $eat = yes; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
486 eat=no
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
487 continue
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
488 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
489 case "$arg" in
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
490 -D*|-I*)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
491 set fnord "$@" "$arg"; shift ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
492 # Strip any option that makedepend may not understand. Remove
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
493 # the object too, otherwise makedepend will parse it as a source file.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
494 -arch)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
495 eat=yes ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
496 -*|$object)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
497 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
498 *)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
499 set fnord "$@" "$arg"; shift ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
500 esac
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
501 done
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
502 obj_suffix=`echo "$object" | sed 's/^.*\././'`
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
503 touch "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
504 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
505 rm -f "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
506 cat < "$tmpdepfile" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
507 sed '1,2d' "$tmpdepfile" | tr ' ' '
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
508 ' | \
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
509 ## Some versions of the HPUX 10.20 sed can't process this invocation
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
510 ## correctly. Breaking it into two sed invocations is a workaround.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
511 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
512 rm -f "$tmpdepfile" "$tmpdepfile".bak
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
513 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
514
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
515 cpp)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
516 # Important note: in order to support this mode, a compiler *must*
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
517 # always write the preprocessed file to stdout.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
518 "$@" || exit $?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
519
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
520 # Remove the call to Libtool.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
521 if test "$libtool" = yes; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
522 while test "X$1" != 'X--mode=compile'; do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
523 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
524 done
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
525 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
526 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
527
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
528 # Remove `-o $object'.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
529 IFS=" "
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
530 for arg
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
531 do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
532 case $arg in
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
533 -o)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
534 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
535 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
536 $object)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
537 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
538 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
539 *)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
540 set fnord "$@" "$arg"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
541 shift # fnord
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
542 shift # $arg
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
543 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
544 esac
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
545 done
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
546
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
547 "$@" -E |
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
548 sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
549 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
550 sed '$ s: \\$::' > "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
551 rm -f "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
552 echo "$object : \\" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
553 cat < "$tmpdepfile" >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
554 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
555 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
556 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
557
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
558 msvisualcpp)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
559 # Important note: in order to support this mode, a compiler *must*
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
560 # always write the preprocessed file to stdout.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
561 "$@" || exit $?
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
562
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
563 # Remove the call to Libtool.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
564 if test "$libtool" = yes; then
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
565 while test "X$1" != 'X--mode=compile'; do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
566 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
567 done
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
568 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
569 fi
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
570
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
571 IFS=" "
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
572 for arg
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
573 do
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
574 case "$arg" in
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
575 -o)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
576 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
577 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
578 $object)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
579 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
580 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
581 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
582 set fnord "$@"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
583 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
584 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
585 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
586 *)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
587 set fnord "$@" "$arg"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
588 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
589 shift
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
590 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
591 esac
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
592 done
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
593 "$@" -E 2>/dev/null |
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
594 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
595 rm -f "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
596 echo "$object : \\" > "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
597 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
598 echo " " >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
599 sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
600 rm -f "$tmpdepfile"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
601 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
602
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
603 msvcmsys)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
604 # This case exists only to let depend.m4 do its work. It works by
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
605 # looking at the text of this script. This case will never be run,
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
606 # since it is checked for above.
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
607 exit 1
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
608 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
609
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
610 none)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
611 exec "$@"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
612 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
613
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
614 *)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
615 echo "Unknown depmode $depmode" 1>&2
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
616 exit 1
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
617 ;;
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
618 esac
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
619
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
620 exit 0
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
621
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
622 # Local Variables:
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
623 # mode: shell-script
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
624 # sh-indentation: 2
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
625 # eval: (add-hook 'write-file-hooks 'time-stamp)
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
626 # time-stamp-start: "scriptversion="
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
627 # time-stamp-format: "%:y-%02m-%02d.%02H"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
628 # time-stamp-time-zone: "UTC"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
629 # time-stamp-end: "; # UTC"
16ae11ee4ab8 Regenerate.
Paul Eggert <eggert@cs.ucla.edu>
parents:
diff changeset
630 # End: