Wed, 31 May 2017 12:32:22 +0200
fixes headers missing in dist package
48
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
1 | #! /bin/sh |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
2 | # depcomp - compile a program generating dependencies as side-effects |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
3 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
4 | scriptversion=2013-05-30.07; # UTC |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
5 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
6 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
7 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
8 | # This program is free software; you can redistribute it and/or modify |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
9 | # it under the terms of the GNU General Public License as published by |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
10 | # the Free Software Foundation; either version 2, or (at your option) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
11 | # any later version. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
12 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
13 | # This program is distributed in the hope that it will be useful, |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
16 | # GNU General Public License for more details. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
17 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
18 | # You should have received a copy of the GNU General Public License |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
20 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
21 | # As a special exception to the GNU General Public License, if you |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
22 | # distribute this file as part of a program that contains a |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
23 | # configuration script generated by Autoconf, you may include it under |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
24 | # the same distribution terms that you use for the rest of that program. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
25 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
26 | # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
27 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
28 | case $1 in |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
29 | '') |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
30 | echo "$0: No command. Try '$0 --help' for more information." 1>&2 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
31 | exit 1; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
32 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
33 | -h | --h*) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
34 | cat <<\EOF |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
35 | Usage: depcomp [--help] [--version] PROGRAM [ARGS] |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
36 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
37 | Run PROGRAMS ARGS to compile a file, generating dependencies |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
38 | as side-effects. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
39 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
40 | Environment variables: |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
41 | depmode Dependency tracking mode. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
42 | source Source file read by 'PROGRAMS ARGS'. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
43 | object Object file output by 'PROGRAMS ARGS'. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
44 | DEPDIR directory where to store dependencies. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
45 | depfile Dependency file to output. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
46 | tmpdepfile Temporary file to use when outputting dependencies. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
47 | libtool Whether libtool is used (yes/no). |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
48 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
49 | Report bugs to <bug-automake@gnu.org>. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
50 | EOF |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
51 | exit $? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
52 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
53 | -v | --v*) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
54 | echo "depcomp $scriptversion" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
55 | exit $? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
56 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
57 | esac |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
58 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
59 | # Get the directory component of the given path, and save it in the |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
60 | # global variables '$dir'. Note that this directory component will |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
61 | # be either empty or ending with a '/' character. This is deliberate. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
62 | set_dir_from () |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
63 | { |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
64 | case $1 in |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
65 | */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
66 | *) dir=;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
67 | esac |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
68 | } |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
69 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
70 | # Get the suffix-stripped basename of the given path, and save it the |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
71 | # global variable '$base'. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
72 | set_base_from () |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
73 | { |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
74 | base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
75 | } |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
76 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
77 | # If no dependency file was actually created by the compiler invocation, |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
78 | # we still have to create a dummy depfile, to avoid errors with the |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
79 | # Makefile "include basename.Plo" scheme. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
80 | make_dummy_depfile () |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
81 | { |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
82 | echo "#dummy" > "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
83 | } |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
84 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
85 | # Factor out some common post-processing of the generated depfile. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
86 | # Requires the auxiliary global variable '$tmpdepfile' to be set. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
87 | aix_post_process_depfile () |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
88 | { |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
89 | # If the compiler actually managed to produce a dependency file, |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
90 | # post-process it. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
91 | if test -f "$tmpdepfile"; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
92 | # Each line is of the form 'foo.o: dependency.h'. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
93 | # Do two passes, one to just change these to |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
94 | # $object: dependency.h |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
95 | # and one to simply output |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
96 | # dependency.h: |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
97 | # which is needed to avoid the deleted-header problem. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
98 | { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
99 | sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
100 | } > "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
101 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
102 | else |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
103 | make_dummy_depfile |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
104 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
105 | } |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
106 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
107 | # A tabulation character. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
108 | tab=' ' |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
109 | # A newline character. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
110 | nl=' |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
111 | ' |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
112 | # Character ranges might be problematic outside the C locale. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
113 | # These definitions help. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
114 | upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
115 | lower=abcdefghijklmnopqrstuvwxyz |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
116 | digits=0123456789 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
117 | alpha=${upper}${lower} |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
118 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
119 | if test -z "$depmode" || test -z "$source" || test -z "$object"; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
120 | echo "depcomp: Variables source, object and depmode must be set" 1>&2 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
121 | exit 1 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
122 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
123 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
124 | # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
125 | depfile=${depfile-`echo "$object" | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
126 | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
127 | tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
128 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
129 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
130 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
131 | # Avoid interferences from the environment. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
132 | gccflag= dashmflag= |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
133 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
134 | # Some modes work just like other modes, but use different flags. We |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
135 | # parameterize here, but still list the modes in the big case below, |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
136 | # to make depend.m4 easier to write. Note that we *cannot* use a case |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
137 | # here, because this file can only contain one case statement. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
138 | if test "$depmode" = hp; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
139 | # HP compiler uses -M and no extra arg. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
140 | gccflag=-M |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
141 | depmode=gcc |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
142 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
143 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
144 | if test "$depmode" = dashXmstdout; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
145 | # This is just like dashmstdout with a different argument. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
146 | dashmflag=-xM |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
147 | depmode=dashmstdout |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
148 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
149 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
150 | cygpath_u="cygpath -u -f -" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
151 | if test "$depmode" = msvcmsys; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
152 | # This is just like msvisualcpp but w/o cygpath translation. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
153 | # Just convert the backslash-escaped backslashes to single forward |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
154 | # slashes to satisfy depend.m4 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
155 | cygpath_u='sed s,\\\\,/,g' |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
156 | depmode=msvisualcpp |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
157 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
158 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
159 | if test "$depmode" = msvc7msys; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
160 | # This is just like msvc7 but w/o cygpath translation. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
161 | # Just convert the backslash-escaped backslashes to single forward |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
162 | # slashes to satisfy depend.m4 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
163 | cygpath_u='sed s,\\\\,/,g' |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
164 | depmode=msvc7 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
165 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
166 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
167 | if test "$depmode" = xlc; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
168 | # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
169 | gccflag=-qmakedep=gcc,-MF |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
170 | depmode=gcc |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
171 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
172 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
173 | case "$depmode" in |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
174 | gcc3) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
175 | ## gcc 3 implements dependency tracking that does exactly what |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
176 | ## we want. Yay! Note: for some reason libtool 1.4 doesn't like |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
177 | ## it if -MD -MP comes after the -MF stuff. Hmm. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
178 | ## Unfortunately, FreeBSD c89 acceptance of flags depends upon |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
179 | ## the command line argument order; so add the flags where they |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
180 | ## appear in depend2.am. Note that the slowdown incurred here |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
181 | ## affects only configure: in makefiles, %FASTDEP% shortcuts this. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
182 | for arg |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
183 | do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
184 | case $arg in |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
185 | -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
186 | *) set fnord "$@" "$arg" ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
187 | esac |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
188 | shift # fnord |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
189 | shift # $arg |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
190 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
191 | "$@" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
192 | stat=$? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
193 | if test $stat -ne 0; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
194 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
195 | exit $stat |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
196 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
197 | mv "$tmpdepfile" "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
198 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
199 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
200 | gcc) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
201 | ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
202 | ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
203 | ## (see the conditional assignment to $gccflag above). |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
204 | ## There are various ways to get dependency output from gcc. Here's |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
205 | ## why we pick this rather obscure method: |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
206 | ## - Don't want to use -MD because we'd like the dependencies to end |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
207 | ## up in a subdir. Having to rename by hand is ugly. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
208 | ## (We might end up doing this anyway to support other compilers.) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
209 | ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
210 | ## -MM, not -M (despite what the docs say). Also, it might not be |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
211 | ## supported by the other compilers which use the 'gcc' depmode. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
212 | ## - Using -M directly means running the compiler twice (even worse |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
213 | ## than renaming). |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
214 | if test -z "$gccflag"; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
215 | gccflag=-MD, |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
216 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
217 | "$@" -Wp,"$gccflag$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
218 | stat=$? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
219 | if test $stat -ne 0; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
220 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
221 | exit $stat |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
222 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
223 | rm -f "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
224 | echo "$object : \\" > "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
225 | # The second -e expression handles DOS-style file names with drive |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
226 | # letters. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
227 | sed -e 's/^[^:]*: / /' \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
228 | -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
229 | ## This next piece of magic avoids the "deleted header file" problem. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
230 | ## The problem is that when a header file which appears in a .P file |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
231 | ## is deleted, the dependency causes make to die (because there is |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
232 | ## typically no way to rebuild the header). We avoid this by adding |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
233 | ## dummy dependencies for each header file. Too bad gcc doesn't do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
234 | ## this for us directly. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
235 | ## Some versions of gcc put a space before the ':'. On the theory |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
236 | ## that the space means something, we add a space to the output as |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
237 | ## well. hp depmode also adds that space, but also prefixes the VPATH |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
238 | ## to the object. Take care to not repeat it in the output. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
239 | ## Some versions of the HPUX 10.20 sed can't process this invocation |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
240 | ## correctly. Breaking it into two sed invocations is a workaround. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
241 | tr ' ' "$nl" < "$tmpdepfile" \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
242 | | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
243 | | sed -e 's/$/ :/' >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
244 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
245 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
246 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
247 | hp) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
248 | # This case exists only to let depend.m4 do its work. It works by |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
249 | # looking at the text of this script. This case will never be run, |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
250 | # since it is checked for above. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
251 | exit 1 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
252 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
253 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
254 | sgi) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
255 | if test "$libtool" = yes; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
256 | "$@" "-Wp,-MDupdate,$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
257 | else |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
258 | "$@" -MDupdate "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
259 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
260 | stat=$? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
261 | if test $stat -ne 0; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
262 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
263 | exit $stat |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
264 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
265 | rm -f "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
266 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
267 | if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
268 | echo "$object : \\" > "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
269 | # Clip off the initial element (the dependent). Don't try to be |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
270 | # clever and replace this with sed code, as IRIX sed won't handle |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
271 | # lines with more than a fixed number of characters (4096 in |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
272 | # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
273 | # the IRIX cc adds comments like '#:fec' to the end of the |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
274 | # dependency line. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
275 | tr ' ' "$nl" < "$tmpdepfile" \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
276 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
277 | | tr "$nl" ' ' >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
278 | echo >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
279 | # The second pass generates a dummy entry for each header file. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
280 | tr ' ' "$nl" < "$tmpdepfile" \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
281 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
282 | >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
283 | else |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
284 | make_dummy_depfile |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
285 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
286 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
287 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
288 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
289 | xlc) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
290 | # This case exists only to let depend.m4 do its work. It works by |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
291 | # looking at the text of this script. This case will never be run, |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
292 | # since it is checked for above. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
293 | exit 1 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
294 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
295 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
296 | aix) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
297 | # The C for AIX Compiler uses -M and outputs the dependencies |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
298 | # in a .u file. In older versions, this file always lives in the |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
299 | # current directory. Also, the AIX compiler puts '$object:' at the |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
300 | # start of each line; $object doesn't have directory information. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
301 | # Version 6 uses the directory in both cases. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
302 | set_dir_from "$object" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
303 | set_base_from "$object" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
304 | if test "$libtool" = yes; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
305 | tmpdepfile1=$dir$base.u |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
306 | tmpdepfile2=$base.u |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
307 | tmpdepfile3=$dir.libs/$base.u |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
308 | "$@" -Wc,-M |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
309 | else |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
310 | tmpdepfile1=$dir$base.u |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
311 | tmpdepfile2=$dir$base.u |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
312 | tmpdepfile3=$dir$base.u |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
313 | "$@" -M |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
314 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
315 | stat=$? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
316 | if test $stat -ne 0; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
317 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
318 | exit $stat |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
319 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
320 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
321 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
322 | do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
323 | test -f "$tmpdepfile" && break |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
324 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
325 | aix_post_process_depfile |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
326 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
327 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
328 | tcc) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
329 | # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
330 | # FIXME: That version still under development at the moment of writing. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
331 | # Make that this statement remains true also for stable, released |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
332 | # versions. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
333 | # It will wrap lines (doesn't matter whether long or short) with a |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
334 | # trailing '\', as in: |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
335 | # |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
336 | # foo.o : \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
337 | # foo.c \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
338 | # foo.h \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
339 | # |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
340 | # It will put a trailing '\' even on the last line, and will use leading |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
341 | # spaces rather than leading tabs (at least since its commit 0394caf7 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
342 | # "Emit spaces for -MD"). |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
343 | "$@" -MD -MF "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
344 | stat=$? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
345 | if test $stat -ne 0; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
346 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
347 | exit $stat |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
348 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
349 | rm -f "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
350 | # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
351 | # We have to change lines of the first kind to '$object: \'. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
352 | sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
353 | # And for each line of the second kind, we have to emit a 'dep.h:' |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
354 | # dummy dependency, to avoid the deleted-header problem. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
355 | sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
356 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
357 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
358 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
359 | ## The order of this option in the case statement is important, since the |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
360 | ## shell code in configure will try each of these formats in the order |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
361 | ## listed in this file. A plain '-MD' option would be understood by many |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
362 | ## compilers, so we must ensure this comes after the gcc and icc options. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
363 | pgcc) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
364 | # Portland's C compiler understands '-MD'. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
365 | # Will always output deps to 'file.d' where file is the root name of the |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
366 | # source file under compilation, even if file resides in a subdirectory. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
367 | # The object file name does not affect the name of the '.d' file. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
368 | # pgcc 10.2 will output |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
369 | # foo.o: sub/foo.c sub/foo.h |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
370 | # and will wrap long lines using '\' : |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
371 | # foo.o: sub/foo.c ... \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
372 | # sub/foo.h ... \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
373 | # ... |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
374 | set_dir_from "$object" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
375 | # Use the source, not the object, to determine the base name, since |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
376 | # that's sadly what pgcc will do too. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
377 | set_base_from "$source" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
378 | tmpdepfile=$base.d |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
379 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
380 | # For projects that build the same source file twice into different object |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
381 | # files, the pgcc approach of using the *source* file root name can cause |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
382 | # problems in parallel builds. Use a locking strategy to avoid stomping on |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
383 | # the same $tmpdepfile. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
384 | lockdir=$base.d-lock |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
385 | trap " |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
386 | echo '$0: caught signal, cleaning up...' >&2 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
387 | rmdir '$lockdir' |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
388 | exit 1 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
389 | " 1 2 13 15 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
390 | numtries=100 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
391 | i=$numtries |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
392 | while test $i -gt 0; do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
393 | # mkdir is a portable test-and-set. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
394 | if mkdir "$lockdir" 2>/dev/null; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
395 | # This process acquired the lock. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
396 | "$@" -MD |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
397 | stat=$? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
398 | # Release the lock. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
399 | rmdir "$lockdir" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
400 | break |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
401 | else |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
402 | # If the lock is being held by a different process, wait |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
403 | # until the winning process is done or we timeout. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
404 | while test -d "$lockdir" && test $i -gt 0; do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
405 | sleep 1 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
406 | i=`expr $i - 1` |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
407 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
408 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
409 | i=`expr $i - 1` |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
410 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
411 | trap - 1 2 13 15 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
412 | if test $i -le 0; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
413 | echo "$0: failed to acquire lock after $numtries attempts" >&2 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
414 | echo "$0: check lockdir '$lockdir'" >&2 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
415 | exit 1 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
416 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
417 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
418 | if test $stat -ne 0; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
419 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
420 | exit $stat |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
421 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
422 | rm -f "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
423 | # Each line is of the form `foo.o: dependent.h', |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
424 | # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
425 | # Do two passes, one to just change these to |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
426 | # `$object: dependent.h' and one to simply `dependent.h:'. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
427 | sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
428 | # Some versions of the HPUX 10.20 sed can't process this invocation |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
429 | # correctly. Breaking it into two sed invocations is a workaround. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
430 | sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
431 | | sed -e 's/$/ :/' >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
432 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
433 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
434 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
435 | hp2) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
436 | # The "hp" stanza above does not work with aCC (C++) and HP's ia64 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
437 | # compilers, which have integrated preprocessors. The correct option |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
438 | # to use with these is +Maked; it writes dependencies to a file named |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
439 | # 'foo.d', which lands next to the object file, wherever that |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
440 | # happens to be. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
441 | # Much of this is similar to the tru64 case; see comments there. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
442 | set_dir_from "$object" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
443 | set_base_from "$object" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
444 | if test "$libtool" = yes; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
445 | tmpdepfile1=$dir$base.d |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
446 | tmpdepfile2=$dir.libs/$base.d |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
447 | "$@" -Wc,+Maked |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
448 | else |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
449 | tmpdepfile1=$dir$base.d |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
450 | tmpdepfile2=$dir$base.d |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
451 | "$@" +Maked |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
452 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
453 | stat=$? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
454 | if test $stat -ne 0; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
455 | rm -f "$tmpdepfile1" "$tmpdepfile2" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
456 | exit $stat |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
457 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
458 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
459 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
460 | do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
461 | test -f "$tmpdepfile" && break |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
462 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
463 | if test -f "$tmpdepfile"; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
464 | sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
465 | # Add 'dependent.h:' lines. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
466 | sed -ne '2,${ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
467 | s/^ *// |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
468 | s/ \\*$// |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
469 | s/$/:/ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
470 | p |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
471 | }' "$tmpdepfile" >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
472 | else |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
473 | make_dummy_depfile |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
474 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
475 | rm -f "$tmpdepfile" "$tmpdepfile2" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
476 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
477 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
478 | tru64) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
479 | # The Tru64 compiler uses -MD to generate dependencies as a side |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
480 | # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
481 | # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
482 | # dependencies in 'foo.d' instead, so we check for that too. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
483 | # Subdirectories are respected. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
484 | set_dir_from "$object" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
485 | set_base_from "$object" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
486 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
487 | if test "$libtool" = yes; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
488 | # Libtool generates 2 separate objects for the 2 libraries. These |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
489 | # two compilations output dependencies in $dir.libs/$base.o.d and |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
490 | # in $dir$base.o.d. We have to check for both files, because |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
491 | # one of the two compilations can be disabled. We should prefer |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
492 | # $dir$base.o.d over $dir.libs/$base.o.d because the latter is |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
493 | # automatically cleaned when .libs/ is deleted, while ignoring |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
494 | # the former would cause a distcleancheck panic. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
495 | tmpdepfile1=$dir$base.o.d # libtool 1.5 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
496 | tmpdepfile2=$dir.libs/$base.o.d # Likewise. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
497 | tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
498 | "$@" -Wc,-MD |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
499 | else |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
500 | tmpdepfile1=$dir$base.d |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
501 | tmpdepfile2=$dir$base.d |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
502 | tmpdepfile3=$dir$base.d |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
503 | "$@" -MD |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
504 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
505 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
506 | stat=$? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
507 | if test $stat -ne 0; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
508 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
509 | exit $stat |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
510 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
511 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
512 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
513 | do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
514 | test -f "$tmpdepfile" && break |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
515 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
516 | # Same post-processing that is required for AIX mode. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
517 | aix_post_process_depfile |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
518 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
519 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
520 | msvc7) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
521 | if test "$libtool" = yes; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
522 | showIncludes=-Wc,-showIncludes |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
523 | else |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
524 | showIncludes=-showIncludes |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
525 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
526 | "$@" $showIncludes > "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
527 | stat=$? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
528 | grep -v '^Note: including file: ' "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
529 | if test $stat -ne 0; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
530 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
531 | exit $stat |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
532 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
533 | rm -f "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
534 | echo "$object : \\" > "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
535 | # The first sed program below extracts the file names and escapes |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
536 | # backslashes for cygpath. The second sed program outputs the file |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
537 | # name when reading, but also accumulates all include files in the |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
538 | # hold buffer in order to output them again at the end. This only |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
539 | # works with sed implementations that can handle large buffers. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
540 | sed < "$tmpdepfile" -n ' |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
541 | /^Note: including file: *\(.*\)/ { |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
542 | s//\1/ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
543 | s/\\/\\\\/g |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
544 | p |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
545 | }' | $cygpath_u | sort -u | sed -n ' |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
546 | s/ /\\ /g |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
547 | s/\(.*\)/'"$tab"'\1 \\/p |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
548 | s/.\(.*\) \\/\1:/ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
549 | H |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
550 | $ { |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
551 | s/.*/'"$tab"'/ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
552 | G |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
553 | p |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
554 | }' >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
555 | echo >> "$depfile" # make sure the fragment doesn't end with a backslash |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
556 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
557 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
558 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
559 | msvc7msys) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
560 | # This case exists only to let depend.m4 do its work. It works by |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
561 | # looking at the text of this script. This case will never be run, |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
562 | # since it is checked for above. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
563 | exit 1 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
564 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
565 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
566 | #nosideeffect) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
567 | # This comment above is used by automake to tell side-effect |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
568 | # dependency tracking mechanisms from slower ones. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
569 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
570 | dashmstdout) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
571 | # Important note: in order to support this mode, a compiler *must* |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
572 | # always write the preprocessed file to stdout, regardless of -o. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
573 | "$@" || exit $? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
574 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
575 | # Remove the call to Libtool. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
576 | if test "$libtool" = yes; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
577 | while test "X$1" != 'X--mode=compile'; do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
578 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
579 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
580 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
581 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
582 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
583 | # Remove '-o $object'. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
584 | IFS=" " |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
585 | for arg |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
586 | do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
587 | case $arg in |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
588 | -o) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
589 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
590 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
591 | $object) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
592 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
593 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
594 | *) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
595 | set fnord "$@" "$arg" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
596 | shift # fnord |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
597 | shift # $arg |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
598 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
599 | esac |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
600 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
601 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
602 | test -z "$dashmflag" && dashmflag=-M |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
603 | # Require at least two characters before searching for ':' |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
604 | # in the target name. This is to cope with DOS-style filenames: |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
605 | # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
606 | "$@" $dashmflag | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
607 | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
608 | rm -f "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
609 | cat < "$tmpdepfile" > "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
610 | # Some versions of the HPUX 10.20 sed can't process this sed invocation |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
611 | # correctly. Breaking it into two sed invocations is a workaround. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
612 | tr ' ' "$nl" < "$tmpdepfile" \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
613 | | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
614 | | sed -e 's/$/ :/' >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
615 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
616 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
617 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
618 | dashXmstdout) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
619 | # This case only exists to satisfy depend.m4. It is never actually |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
620 | # run, as this mode is specially recognized in the preamble. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
621 | exit 1 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
622 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
623 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
624 | makedepend) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
625 | "$@" || exit $? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
626 | # Remove any Libtool call |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
627 | if test "$libtool" = yes; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
628 | while test "X$1" != 'X--mode=compile'; do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
629 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
630 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
631 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
632 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
633 | # X makedepend |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
634 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
635 | cleared=no eat=no |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
636 | for arg |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
637 | do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
638 | case $cleared in |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
639 | no) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
640 | set ""; shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
641 | cleared=yes ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
642 | esac |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
643 | if test $eat = yes; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
644 | eat=no |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
645 | continue |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
646 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
647 | case "$arg" in |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
648 | -D*|-I*) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
649 | set fnord "$@" "$arg"; shift ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
650 | # Strip any option that makedepend may not understand. Remove |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
651 | # the object too, otherwise makedepend will parse it as a source file. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
652 | -arch) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
653 | eat=yes ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
654 | -*|$object) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
655 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
656 | *) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
657 | set fnord "$@" "$arg"; shift ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
658 | esac |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
659 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
660 | obj_suffix=`echo "$object" | sed 's/^.*\././'` |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
661 | touch "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
662 | ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
663 | rm -f "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
664 | # makedepend may prepend the VPATH from the source file name to the object. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
665 | # No need to regex-escape $object, excess matching of '.' is harmless. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
666 | sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
667 | # Some versions of the HPUX 10.20 sed can't process the last invocation |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
668 | # correctly. Breaking it into two sed invocations is a workaround. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
669 | sed '1,2d' "$tmpdepfile" \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
670 | | tr ' ' "$nl" \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
671 | | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
672 | | sed -e 's/$/ :/' >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
673 | rm -f "$tmpdepfile" "$tmpdepfile".bak |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
674 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
675 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
676 | cpp) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
677 | # Important note: in order to support this mode, a compiler *must* |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
678 | # always write the preprocessed file to stdout. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
679 | "$@" || exit $? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
680 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
681 | # Remove the call to Libtool. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
682 | if test "$libtool" = yes; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
683 | while test "X$1" != 'X--mode=compile'; do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
684 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
685 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
686 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
687 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
688 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
689 | # Remove '-o $object'. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
690 | IFS=" " |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
691 | for arg |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
692 | do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
693 | case $arg in |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
694 | -o) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
695 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
696 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
697 | $object) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
698 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
699 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
700 | *) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
701 | set fnord "$@" "$arg" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
702 | shift # fnord |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
703 | shift # $arg |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
704 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
705 | esac |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
706 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
707 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
708 | "$@" -E \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
709 | | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
710 | -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
711 | | sed '$ s: \\$::' > "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
712 | rm -f "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
713 | echo "$object : \\" > "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
714 | cat < "$tmpdepfile" >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
715 | sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
716 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
717 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
718 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
719 | msvisualcpp) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
720 | # Important note: in order to support this mode, a compiler *must* |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
721 | # always write the preprocessed file to stdout. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
722 | "$@" || exit $? |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
723 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
724 | # Remove the call to Libtool. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
725 | if test "$libtool" = yes; then |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
726 | while test "X$1" != 'X--mode=compile'; do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
727 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
728 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
729 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
730 | fi |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
731 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
732 | IFS=" " |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
733 | for arg |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
734 | do |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
735 | case "$arg" in |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
736 | -o) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
737 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
738 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
739 | $object) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
740 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
741 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
742 | "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
743 | set fnord "$@" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
744 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
745 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
746 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
747 | *) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
748 | set fnord "$@" "$arg" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
749 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
750 | shift |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
751 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
752 | esac |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
753 | done |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
754 | "$@" -E 2>/dev/null | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
755 | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
756 | rm -f "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
757 | echo "$object : \\" > "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
758 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
759 | echo "$tab" >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
760 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
761 | rm -f "$tmpdepfile" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
762 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
763 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
764 | msvcmsys) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
765 | # This case exists only to let depend.m4 do its work. It works by |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
766 | # looking at the text of this script. This case will never be run, |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
767 | # since it is checked for above. |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
768 | exit 1 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
769 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
770 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
771 | none) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
772 | exec "$@" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
773 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
774 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
775 | *) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
776 | echo "Unknown depmode $depmode" 1>&2 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
777 | exit 1 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
778 | ;; |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
779 | esac |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
780 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
781 | exit 0 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
782 | |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
783 | # Local Variables: |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
784 | # mode: shell-script |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
785 | # sh-indentation: 2 |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
786 | # eval: (add-hook 'write-file-hooks 'time-stamp) |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
787 | # time-stamp-start: "scriptversion=" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
788 | # time-stamp-format: "%:y-%02m-%02d.%02H" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
789 | # time-stamp-time-zone: "UTC" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
790 | # time-stamp-end: "; # UTC" |
0d2c13c24fd0
adds remaining autoconf files
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
791 | # End: |