Commit | Line | Data |
---|---|---|
eb02fd64 | 1 | # |
131a3881 | 2 | # Makefile for directory with subdirs to build. |
f46d03c5 ILT |
3 | # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998 |
4 | # Free Software Foundation | |
eb02fd64 | 5 | # |
4dfe09da RP |
6 | # This file is free software; you can redistribute it and/or modify |
7 | # it under the terms of the GNU General Public License as published by | |
8 | # the Free Software Foundation; either version 2 of the License, or | |
9 | # (at your option) any later version. | |
10 | # | |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | # | |
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with this program; if not, write to the Free Software | |
8c222f6e | 18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
4dfe09da | 19 | # |
f149eb99 | 20 | |
eb02fd64 | 21 | srcdir = . |
28f3b094 | 22 | |
4d714963 | 23 | prefix = /usr/local |
7fcfdcf7 | 24 | exec_prefix = $(prefix) |
2ec9f3fd KS |
25 | |
26 | bindir=${exec_prefix}/bin | |
27 | sbindir=${exec_prefix}/sbin | |
28 | libexecdir=${exec_prefix}/libexec | |
29 | datadir=${prefix}/share | |
30 | sysconfdir=${prefix}/etc | |
31 | sharedstatedir=${prefix}/com | |
32 | localstatedir=${prefix}/var | |
33 | libdir=${exec_prefix}/lib | |
34 | includedir=${prefix}/include | |
35 | oldincludedir=/usr/include | |
36 | infodir=${prefix}/info | |
37 | mandir=${prefix}/man | |
38 | ||
a54e05f6 | 39 | tooldir = $(exec_prefix)/$(target) |
7fcfdcf7 | 40 | |
51489233 ILT |
41 | program_transform_name = |
42 | ||
4d714963 RP |
43 | man1dir = $(mandir)/man1 |
44 | man2dir = $(mandir)/man2 | |
45 | man3dir = $(mandir)/man3 | |
46 | man4dir = $(mandir)/man4 | |
47 | man5dir = $(mandir)/man5 | |
48 | man6dir = $(mandir)/man6 | |
49 | man7dir = $(mandir)/man7 | |
50 | man8dir = $(mandir)/man8 | |
51 | man9dir = $(mandir)/man9 | |
04103845 | 52 | GDB_NLM_DEPS = |
4d714963 RP |
53 | |
54 | SHELL = /bin/sh | |
55 | ||
8270cd76 ILT |
56 | # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a |
57 | # cygwin32 host. | |
58 | INSTALL_PROGRAM_ARGS = | |
59 | ||
64434418 | 60 | INSTALL = $(SHELL) $$s/install-sh -c |
8270cd76 ILT |
61 | INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS) |
62 | INSTALL_SCRIPT = $(INSTALL) | |
5cc73086 | 63 | INSTALL_DATA = $(INSTALL) -m 644 |
3c8735af | 64 | |
09985c96 | 65 | INSTALL_DOSREL = install-dosrel-fake |
a987271c | 66 | |
440868a0 | 67 | AS = as |
ec342d7d | 68 | AR = ar |
b5329d84 | 69 | AR_FLAGS = rc |
e85e07cb | 70 | CC = cc |
7b636683 | 71 | |
66957ce4 ILT |
72 | # Special variables passed down in EXTRA_GCC_FLAGS. They are defined |
73 | # here so that they can be overridden by Makefile fragments. | |
753d5049 SC |
74 | HOST_CC = $(CC_FOR_BUILD) |
75 | HOST_PREFIX = | |
76 | HOST_PREFIX_1 = loser- | |
77 | ||
572728c6 | 78 | # These flag values are normally overridden by the configure script. |
f8a6ad66 | 79 | CFLAGS = -g |
572728c6 ILT |
80 | CXXFLAGS = -g -O2 |
81 | ||
3585593d BK |
82 | LIBCFLAGS = $(CFLAGS) |
83 | CFLAGS_FOR_TARGET = $(CFLAGS) | |
276c2d7d | 84 | LDFLAGS_FOR_TARGET = |
3585593d | 85 | LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) |
04103845 DE |
86 | PICFLAG = |
87 | PICFLAG_FOR_TARGET = | |
7b636683 | 88 | |
a4e879a1 | 89 | # start-sanitize-chill |
7d9f0c54 MW |
90 | CHILLFLAGS = $(CFLAGS) |
91 | CHILL_LIB = -lchill | |
a4e879a1 | 92 | # end-sanitize-chill |
2cf00a36 | 93 | CXX = c++ |
7b636683 | 94 | |
1d5fcc66 | 95 | # Use -O2 to stress test the compiler. |
864a5888 | 96 | LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates |
3585593d | 97 | CXXFLAGS_FOR_TARGET = $(CXXFLAGS) |
2f64ef77 | 98 | LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates |
7b636683 | 99 | |
4d714963 | 100 | RANLIB = ranlib |
b6ae0f10 ILT |
101 | |
102 | DLLTOOL = dlltool | |
d29cd970 | 103 | WINDRES = windres |
b6ae0f10 | 104 | |
51489233 | 105 | NM = nm |
64434418 ILT |
106 | |
107 | LD = ld | |
108 | ||
5cc73086 KR |
109 | # Not plain GZIP, since gzip looks there for extra command-line options. |
110 | GZIPPROG = gzip | |
eb02fd64 | 111 | |
aaefc574 JM |
112 | # These values are substituted by configure. |
113 | DEFAULT_YACC = yacc | |
114 | DEFAULT_LEX = lex | |
115 | ||
3a671555 | 116 | BISON = `if [ -f $$r/bison/bison ] ; then \ |
97036944 | 117 | echo $$r/bison/bison -L $$s/bison/ ; \ |
3a671555 JM |
118 | else \ |
119 | echo bison ; \ | |
120 | fi` | |
121 | ||
122 | YACC = `if [ -f $$r/bison/bison ] ; then \ | |
97036944 | 123 | echo $$r/bison/bison -y -L $$s/bison/ ; \ |
3a671555 JM |
124 | elif [ -f $$r/byacc/byacc ] ; then \ |
125 | echo $$r/byacc/byacc ; \ | |
126 | else \ | |
127 | echo ${DEFAULT_YACC} ; \ | |
06a07944 | 128 | fi` |
2645fb0c | 129 | |
5cc73086 KR |
130 | LEX = `if [ -f $$r/flex/flex ] ; \ |
131 | then echo $$r/flex/flex ; \ | |
aaefc574 | 132 | else echo ${DEFAULT_LEX} ; fi` |
2198e4ba | 133 | |
5cc73086 KR |
134 | M4 = `if [ -f $$r/m4/m4 ] ; \ |
135 | then echo $$r/m4/m4 ; \ | |
65e21701 KR |
136 | else echo m4 ; fi` |
137 | ||
97840afa | 138 | MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \ |
5cc73086 | 139 | then echo $$r/texinfo/makeinfo/makeinfo ; \ |
77806c3e | 140 | else echo makeinfo ; fi` |
484fa12d | 141 | |
9823504d ILT |
142 | # This just becomes part of the MAKEINFO definition passed down to |
143 | # sub-makes. It lets flags be given on the command line while still | |
144 | # using the makeinfo from the object tree. | |
145 | MAKEINFOFLAGS = | |
b772d75e | 146 | |
5cc73086 KR |
147 | EXPECT = `if [ -f $$r/expect/expect ] ; \ |
148 | then echo $$r/expect/expect ; \ | |
a54e05f6 KR |
149 | else echo expect ; fi` |
150 | ||
81eb5025 ILT |
151 | RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ |
152 | then echo $$s/dejagnu/runtest ; \ | |
6a42d184 DZ |
153 | else echo runtest ; fi` |
154 | ||
f980fcfb | 155 | |
e85e07cb | 156 | # compilers to use to create programs which must be run in the build |
440868a0 ILT |
157 | # environment. |
158 | CC_FOR_BUILD = $(CC) | |
e85e07cb | 159 | CXX_FOR_BUILD = $(CXX) |
440868a0 | 160 | |
9f73dd6a | 161 | SUBDIRS = "this is set via configure, don't edit this" |
6a3958b2 RP |
162 | OTHERS = |
163 | ||
ca2ce3b3 ILT |
164 | # This is set by the configure script to the list of directories which |
165 | # should be built using the target tools. | |
f4434c50 | 166 | TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup opcodes libstub cygmon |
ca2ce3b3 | 167 | |
e66eb658 | 168 | # Target libraries are put under this directory: |
d92eef0c JM |
169 | # Changed by configure to $(target_alias) if cross. |
170 | TARGET_SUBDIR = . | |
e66eb658 | 171 | |
ca2ce3b3 ILT |
172 | # This is set by the configure script to the arguments passed to configure. |
173 | CONFIG_ARGUMENTS = | |
174 | ||
b6ae0f10 ILT |
175 | # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared |
176 | # was used. | |
177 | SET_LIB_PATH = | |
178 | ||
179 | # This is the name of the environment variable used for the path to | |
180 | # the libraries. This may be changed by configure.in. | |
181 | RPATH_ENVVAR = LD_LIBRARY_PATH | |
182 | ||
183 | # configure.in sets SET_LIB_PATH to this if --enable-shared was used. | |
184 | REALLY_SET_LIB_PATH = \ | |
185 | $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \ | |
186 | export $(RPATH_ENVVAR); | |
187 | ||
a0f47eb7 | 188 | ALL = all.normal |
ff290baf | 189 | INSTALL_TARGET = installdirs \ |
43e1bf25 | 190 | install-gcc \ |
f35c6160 DZ |
191 | $(INSTALL_MODULES) \ |
192 | $(INSTALL_TARGET_MODULES) \ | |
193 | $(INSTALL_X11_MODULES) \ | |
09985c96 | 194 | $(INSTALL_DOSREL) |
753d5049 | 195 | |
fb660409 | 196 | |
51489233 | 197 | CC_FOR_TARGET = ` \ |
72ce05e8 | 198 | if [ -f $$r/gcc/xgcc ] ; then \ |
e66eb658 | 199 | if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \ |
d5a8bfde | 200 | if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \ |
abc93570 | 201 | echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ |
d5a8bfde | 202 | else \ |
81eb5025 | 203 | echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ |
d5a8bfde | 204 | fi; \ |
753d5049 SC |
205 | else \ |
206 | echo $$r/gcc/xgcc -B$$r/gcc/; \ | |
207 | fi; \ | |
51489233 | 208 | else \ |
378fd382 | 209 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
210 | echo $(CC); \ |
211 | else \ | |
ea6d5817 | 212 | t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ |
51489233 ILT |
213 | fi; \ |
214 | fi` | |
215 | ||
72ce05e8 ILT |
216 | # If CC_FOR_TARGET is not overriden on the command line, then this |
217 | # variable is passed down to the gcc Makefile, where it is used to | |
218 | # build libgcc2.a. We define it here so that it can itself be | |
219 | # overridden on the command line. | |
220 | GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ | |
221 | ||
a4e879a1 | 222 | # start-sanitize-chill |
7d9f0c54 | 223 | CHILL_FOR_TARGET = ` \ |
72ce05e8 | 224 | if [ -f $$r/gcc/xgcc ] ; then \ |
04103845 | 225 | echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \ |
7d9f0c54 MW |
226 | else \ |
227 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
228 | echo $(CC); \ | |
229 | else \ | |
ea6d5817 | 230 | t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \ |
7d9f0c54 MW |
231 | fi; \ |
232 | fi` | |
34b3298b | 233 | |
a4e879a1 | 234 | # end-sanitize-chill |
7d9f0c54 | 235 | |
d1bea4c7 | 236 | CXX_FOR_TARGET = ` \ |
72ce05e8 | 237 | if [ -f $$r/gcc/xgcc ] ; then \ |
e66eb658 | 238 | if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \ |
d5a8bfde | 239 | if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \ |
abc93570 | 240 | echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ |
d5a8bfde | 241 | else \ |
81eb5025 | 242 | echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \ |
d5a8bfde | 243 | fi; \ |
753d5049 SC |
244 | else \ |
245 | echo $$r/gcc/xgcc -B$$r/gcc/; \ | |
246 | fi; \ | |
fca4f908 | 247 | else \ |
e85e07cb ILT |
248 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
249 | echo $(CXX); \ | |
fca4f908 | 250 | else \ |
2cf00a36 | 251 | t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \ |
fca4f908 MW |
252 | fi; \ |
253 | fi` | |
254 | ||
440868a0 | 255 | AS_FOR_TARGET = ` \ |
ef9a68f7 ILT |
256 | if [ -f $$r/gas/as-new ] ; then \ |
257 | echo $$r/gas/as-new ; \ | |
440868a0 | 258 | else \ |
e85e07cb | 259 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
440868a0 ILT |
260 | echo $(AS); \ |
261 | else \ | |
ea6d5817 | 262 | t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \ |
81246025 | 263 | fi; \ |
440868a0 ILT |
264 | fi` |
265 | ||
054f9ada | 266 | LD_FOR_TARGET = ` \ |
19ebe123 ILT |
267 | if [ -f $$r/ld/ld-new ] ; then \ |
268 | echo $$r/ld/ld-new ; \ | |
054f9ada JM |
269 | else \ |
270 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
271 | echo $(LD); \ | |
272 | else \ | |
273 | t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \ | |
274 | fi; \ | |
275 | fi` | |
276 | ||
a220ba0f SC |
277 | DLLTOOL_FOR_TARGET = ` \ |
278 | if [ -f $$r/binutils/dlltool ] ; then \ | |
279 | echo $$r/binutils/dlltool ; \ | |
280 | else \ | |
281 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
282 | echo $(DLLTOOL); \ | |
283 | else \ | |
284 | t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \ | |
285 | fi; \ | |
286 | fi` | |
287 | ||
d29cd970 ILT |
288 | WINDRES_FOR_TARGET = ` \ |
289 | if [ -f $$r/binutils/windres ] ; then \ | |
290 | echo $$r/binutils/windres ; \ | |
291 | else \ | |
292 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
293 | echo $(WINDRES); \ | |
294 | else \ | |
295 | t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \ | |
296 | fi; \ | |
297 | fi` | |
298 | ||
51489233 | 299 | AR_FOR_TARGET = ` \ |
5cc73086 KR |
300 | if [ -f $$r/binutils/ar ] ; then \ |
301 | echo $$r/binutils/ar ; \ | |
51489233 | 302 | else \ |
378fd382 | 303 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
304 | echo $(AR); \ |
305 | else \ | |
ea6d5817 | 306 | t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \ |
81246025 | 307 | fi; \ |
51489233 ILT |
308 | fi` |
309 | ||
310 | RANLIB_FOR_TARGET = ` \ | |
5cc73086 KR |
311 | if [ -f $$r/binutils/ranlib ] ; then \ |
312 | echo $$r/binutils/ranlib ; \ | |
51489233 | 313 | else \ |
378fd382 | 314 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
315 | echo $(RANLIB); \ |
316 | else \ | |
ea6d5817 | 317 | t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \ |
81246025 | 318 | fi; \ |
51489233 ILT |
319 | fi` |
320 | ||
321 | NM_FOR_TARGET = ` \ | |
0e25edca ILT |
322 | if [ -f $$r/binutils/nm-new ] ; then \ |
323 | echo $$r/binutils/nm-new ; \ | |
51489233 | 324 | else \ |
378fd382 | 325 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
326 | echo $(NM); \ |
327 | else \ | |
ea6d5817 | 328 | t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \ |
81246025 | 329 | fi; \ |
51489233 ILT |
330 | fi` |
331 | ||
eb02fd64 | 332 | #### host and target specific makefile fragments come in here. |
ec342d7d | 333 | ### |
eb02fd64 | 334 | |
0ef4728f ILT |
335 | # Flags to pass down to all sub-makes. |
336 | # Please keep these in alphabetical order. | |
337 | BASE_FLAGS_TO_PASS = \ | |
2198e4ba | 338 | "AR_FLAGS=$(AR_FLAGS)" \ |
d09de70e | 339 | "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ |
0ef4728f | 340 | "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ |
378fd382 | 341 | "BISON=$(BISON)" \ |
378fd382 | 342 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ |
0ef4728f | 343 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ |
2198e4ba | 344 | "CFLAGS=$(CFLAGS)" \ |
3585593d | 345 | "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ |
a4e879a1 | 346 | $(start-sanitize-chill)\ |
7d9f0c54 MW |
347 | "CHILLFLAGS=$(CHILLFLAGS)" \ |
348 | "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \ | |
349 | "CHILL_LIB=$(CHILL_LIB)" \ | |
a4e879a1 | 350 | $(end-sanitize-chill)\ |
0ef4728f ILT |
351 | "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ |
352 | "CXXFLAGS=$(CXXFLAGS)" \ | |
3585593d | 353 | "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ |
0ef4728f | 354 | "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ |
a220ba0f | 355 | "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ |
2198e4ba MT |
356 | "INSTALL=$(INSTALL)" \ |
357 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
440868a0 | 358 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ |
8270cd76 | 359 | "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ |
378fd382 DZ |
360 | "LDFLAGS=$(LDFLAGS)" \ |
361 | "LEX=$(LEX)" \ | |
054f9ada | 362 | "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ |
3585593d BK |
363 | "LIBCFLAGS=$(LIBCFLAGS)" \ |
364 | "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ | |
04103845 DE |
365 | "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ |
366 | "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ | |
65e21701 | 367 | "M4=$(M4)" \ |
eb40ca93 | 368 | "MAKE=$(MAKE)" \ |
9823504d | 369 | "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ |
0ef4728f | 370 | "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ |
04103845 DE |
371 | "PICFLAG=$(PICFLAG)" \ |
372 | "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ | |
d09de70e | 373 | "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ |
43e1bf25 | 374 | "RPATH_ENVVAR=$(RPATH_ENVVAR)" \ |
49dfa984 | 375 | "SHELL=$(SHELL)" \ |
a54e05f6 | 376 | "EXPECT=$(EXPECT)" \ |
6a42d184 | 377 | "RUNTEST=$(RUNTEST)" \ |
86365152 | 378 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ |
d29cd970 | 379 | "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ |
3a671555 | 380 | "YACC=$(YACC)" \ |
2ec9f3fd KS |
381 | "bindir=$(bindir)" \ |
382 | "datadir=$(datadir)" \ | |
378fd382 | 383 | "exec_prefix=$(exec_prefix)" \ |
2ec9f3fd KS |
384 | "includedir=$(includedir)" \ |
385 | "infodir=$(infodir)" \ | |
386 | "libdir=$(libdir)" \ | |
387 | "libexecdir=$(libexecdir)" \ | |
3173839b | 388 | "lispdir=$(lispdir)" \ |
2ec9f3fd KS |
389 | "localstatedir=$(localstatedir)" \ |
390 | "mandir=$(mandir)" \ | |
391 | "oldincludedir=$(oldincludedir)" \ | |
378fd382 | 392 | "prefix=$(prefix)" \ |
2ec9f3fd KS |
393 | "sbindir=$(sbindir)" \ |
394 | "sharedstatedir=$(sharedstatedir)" \ | |
395 | "sysconfdir=$(sysconfdir)" \ | |
396 | "tooldir=$(tooldir)" | |
2198e4ba | 397 | |
0ef4728f ILT |
398 | # Flags to pass down to most sub-makes, in which we're building with |
399 | # the host environment. | |
6d681784 | 400 | # If any variables are added here, they must be added to do-*, below. |
0ef4728f | 401 | EXTRA_HOST_FLAGS = \ |
6d681784 JG |
402 | 'AR=$(AR)' \ |
403 | 'AS=$(AS)' \ | |
404 | 'CC=$(CC)' \ | |
405 | 'CXX=$(CXX)' \ | |
b6ae0f10 | 406 | 'DLLTOOL=$(DLLTOOL)' \ |
64434418 | 407 | 'LD=$(LD)' \ |
6d681784 | 408 | 'NM=$(NM)' \ |
d29cd970 ILT |
409 | 'RANLIB=$(RANLIB)' \ |
410 | 'WINDRES=$(WINDRES)' | |
0ef4728f | 411 | |
97840afa | 412 | FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) |
0ef4728f | 413 | |
d1bea4c7 DZ |
414 | # Flags that are concerned with the location of the X11 include files |
415 | # and library files | |
054f9ada JM |
416 | # |
417 | # NOTE: until the top-level is getting the values via autoconf, it only | |
418 | # causes problems to have this top-level Makefile overriding the autoconf-set | |
419 | # values in child directories. Only variables that don't conflict with | |
420 | # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. | |
421 | # | |
d1bea4c7 | 422 | X11_FLAGS_TO_PASS = \ |
054f9ada JM |
423 | 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ |
424 | 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' | |
d1bea4c7 | 425 | |
0ef4728f ILT |
426 | # Flags to pass down to makes which are built with the target environment. |
427 | # The double $ decreases the length of the command line; the variables | |
428 | # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. | |
6d681784 | 429 | # If any variables are added here, they must be added to do-*, below. |
0ef4728f ILT |
430 | EXTRA_TARGET_FLAGS = \ |
431 | 'AR=$$(AR_FOR_TARGET)' \ | |
432 | 'AS=$$(AS_FOR_TARGET)' \ | |
433 | 'CC=$$(CC_FOR_TARGET)' \ | |
3585593d | 434 | 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ |
0ef4728f | 435 | 'CXX=$$(CXX_FOR_TARGET)' \ |
3585593d | 436 | 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ |
a220ba0f | 437 | 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ |
054f9ada | 438 | 'LD=$$(LD_FOR_TARGET)' \ |
3585593d BK |
439 | 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ |
440 | 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ | |
0ef4728f | 441 | 'NM=$$(NM_FOR_TARGET)' \ |
04103845 | 442 | 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \ |
d29cd970 ILT |
443 | 'RANLIB=$$(RANLIB_FOR_TARGET)' \ |
444 | 'WINDRES=$$(WINDRES_FOR_TARGET)' | |
0ef4728f ILT |
445 | |
446 | TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) | |
51489233 | 447 | |
f4e414f1 ILT |
448 | # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it |
449 | # unfortunately needs the native compiler and the target ar and | |
0ef4728f | 450 | # ranlib. |
66957ce4 ILT |
451 | # If any variables are added here, they must be added to do-*, below. |
452 | # The HOST_* variables are a special case, which are used for the gcc | |
453 | # cross-building scheme. | |
0ef4728f ILT |
454 | EXTRA_GCC_FLAGS = \ |
455 | 'AR=$$(AR_FOR_TARGET)' \ | |
6d681784 JG |
456 | 'AS=$(AS)' \ |
457 | 'CC=$(CC)' \ | |
458 | 'CXX=$(CXX)' \ | |
b6ae0f10 | 459 | 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ |
a54e05f6 KR |
460 | 'HOST_CC=$(CC_FOR_BUILD)' \ |
461 | 'HOST_PREFIX=$(HOST_PREFIX)' \ | |
462 | 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \ | |
6d681784 | 463 | 'NM=$(NM)' \ |
4c0b7ebc | 464 | 'RANLIB=$$(RANLIB_FOR_TARGET)' \ |
d29cd970 | 465 | 'WINDRES=$$(WINDRES_FOR_TARGET)' \ |
97840afa | 466 | "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ |
b0ea0c52 ILT |
467 | "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \ |
468 | "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \ | |
469 | "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \ | |
470 | "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \ | |
471 | "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ | |
472 | "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ | |
473 | "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \ | |
474 | "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \ | |
700d7935 | 475 | "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" |
0ef4728f | 476 | |
34b3298b | 477 | GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) |
f4e414f1 | 478 | |
6a42d184 | 479 | # This is a list of the targets for all of the modules which are compiled |
79337c85 ILT |
480 | # using $(FLAGS_TO_PASS). |
481 | ALL_MODULES = \ | |
53c403df | 482 | all-apache \ |
258950c5 | 483 | all-ash \ |
79337c85 | 484 | all-autoconf \ |
08168809 | 485 | all-automake \ |
5db223e4 | 486 | all-bash \ |
79337c85 ILT |
487 | all-bfd \ |
488 | all-binutils \ | |
3a671555 | 489 | all-bison \ |
79337c85 | 490 | all-byacc \ |
0ab3f086 BK |
491 | $(start-sanitize-cygnus) \ |
492 | all-cgen \ | |
493 | $(end-sanitize-cygnus) \ | |
97b951fb | 494 | all-cvssrc \ |
97840afa | 495 | all-db \ |
79337c85 ILT |
496 | all-dejagnu \ |
497 | all-diff \ | |
ac259c28 | 498 | all-dosutils \ |
79337c85 ILT |
499 | all-etc \ |
500 | all-fileutils \ | |
97840afa | 501 | all-findutils \ |
79337c85 ILT |
502 | all-find \ |
503 | all-flex \ | |
bcbcf456 BE |
504 | $(start-sanitize-cygnus) \ |
505 | all-flexlm \ | |
506 | $(end-sanitize-cygnus) \ | |
79337c85 ILT |
507 | all-gas \ |
508 | all-gawk \ | |
f46d03c5 | 509 | all-gettext \ |
ba26181f | 510 | all-gnuserv \ |
79337c85 ILT |
511 | all-gprof \ |
512 | all-grep \ | |
19b1d034 | 513 | all-grez \ |
79337c85 ILT |
514 | all-gzip \ |
515 | all-hello \ | |
3718029f ILT |
516 | $(start-sanitize-ide) \ |
517 | all-ilu \ | |
518 | $(end-sanitize-ide) \ | |
79337c85 | 519 | all-indent \ |
13d7cbe2 | 520 | all-inet \ |
f46d03c5 | 521 | all-intl \ |
79337c85 | 522 | all-ispell \ |
97840afa | 523 | all-itcl \ |
c070fb34 ILT |
524 | $(start-sanitize-ide) \ |
525 | all-jstools \ | |
526 | $(end-sanitize-ide) \ | |
79337c85 | 527 | all-ld \ |
67ae6381 | 528 | all-libgui \ |
79337c85 | 529 | all-libiberty \ |
43e1bf25 | 530 | $(start-sanitize-ide) \ |
eebe454c | 531 | all-libide \ |
f46d03c5 | 532 | all-libidetcl \ |
43e1bf25 | 533 | $(end-sanitize-ide) \ |
c99e91d2 | 534 | all-libtool \ |
79337c85 ILT |
535 | all-m4 \ |
536 | all-make \ | |
537 | all-mmalloc \ | |
538 | all-opcodes \ | |
539 | all-patch \ | |
0f8f1d33 | 540 | all-perl \ |
79337c85 ILT |
541 | all-prms \ |
542 | all-rcs \ | |
543 | all-readline \ | |
275049c0 | 544 | all-release \ |
79337c85 ILT |
545 | all-recode \ |
546 | all-sed \ | |
547 | all-send-pr \ | |
548 | all-shellutils \ | |
549 | all-sim \ | |
b0dae4d7 | 550 | $(start-sanitize-cygnus) \ |
abc93570 | 551 | all-snavigator \ |
b0dae4d7 | 552 | $(end-sanitize-cygnus) \ |
79337c85 ILT |
553 | all-tar \ |
554 | all-tcl \ | |
555 | all-texinfo \ | |
556 | all-textutils \ | |
557 | all-tgas \ | |
558 | all-time \ | |
559 | all-uudecode \ | |
eebe454c TT |
560 | $(start-sanitize-ide) \ |
561 | all-vmake \ | |
562 | $(end-sanitize-ide) \ | |
753d5049 SC |
563 | all-wdiff |
564 | ||
4f0b8f27 TL |
565 | # This is a list of the check targets for all of the modules which are |
566 | # compiled using $(FLAGS_TO_PASS). | |
567 | # | |
d237841c BC |
568 | # The list is in two parts. The first lists those tools which |
569 | # are tested as part of the host's native tool-chain, and not | |
570 | # tested in a cross configuration. | |
571 | NATIVE_CHECK_MODULES = \ | |
3a671555 | 572 | check-bison \ |
d237841c | 573 | check-byacc \ |
4f0b8f27 TL |
574 | check-flex |
575 | ||
d237841c | 576 | CROSS_CHECK_MODULES = \ |
53c403df | 577 | check-apache \ |
258950c5 | 578 | check-ash \ |
6a42d184 | 579 | check-autoconf \ |
08168809 | 580 | check-automake \ |
5db223e4 | 581 | check-bash \ |
6a42d184 DZ |
582 | check-bfd \ |
583 | check-binutils \ | |
97b951fb | 584 | check-cvssrc \ |
97840afa | 585 | check-db \ |
6a42d184 DZ |
586 | check-dejagnu \ |
587 | check-diff \ | |
588 | check-etc \ | |
589 | check-fileutils \ | |
97840afa | 590 | check-findutils \ |
6a42d184 | 591 | check-find \ |
bcbcf456 BE |
592 | $(start-sanitize-cygnus) \ |
593 | check-flexlm \ | |
594 | $(end-sanitize-cygnus) \ | |
6a42d184 DZ |
595 | check-gas \ |
596 | check-gawk \ | |
f46d03c5 | 597 | check-gettext \ |
ba26181f | 598 | check-gnuserv \ |
6a42d184 DZ |
599 | check-gprof \ |
600 | check-grep \ | |
601 | check-gzip \ | |
602 | check-hello \ | |
3718029f ILT |
603 | $(start-sanitize-ide) \ |
604 | check-ilu \ | |
605 | $(end-sanitize-ide) \ | |
6a42d184 | 606 | check-indent \ |
13d7cbe2 | 607 | check-inet \ |
f46d03c5 | 608 | check-intl \ |
6a42d184 | 609 | check-ispell \ |
97840afa | 610 | check-itcl \ |
c070fb34 ILT |
611 | $(start-sanitize-ide) \ |
612 | check-jstools \ | |
613 | $(end-sanitize-ide) \ | |
6a42d184 | 614 | check-ld \ |
67ae6381 | 615 | check-libgui \ |
6a42d184 | 616 | check-libiberty \ |
43e1bf25 | 617 | $(start-sanitize-ide) \ |
eebe454c | 618 | check-libide \ |
f46d03c5 | 619 | check-libidetcl \ |
43e1bf25 | 620 | $(end-sanitize-ide) \ |
c99e91d2 | 621 | check-libtool \ |
6a42d184 DZ |
622 | check-m4 \ |
623 | check-make \ | |
624 | check-mmcheckoc \ | |
625 | check-opcodes \ | |
626 | check-patch \ | |
0f8f1d33 | 627 | check-perl \ |
6a42d184 DZ |
628 | check-prms \ |
629 | check-rcs \ | |
630 | check-readline \ | |
631 | check-recode \ | |
632 | check-sed \ | |
633 | check-send-pr \ | |
634 | check-shellutils \ | |
b0dae4d7 | 635 | $(start-sanitize-cygnus) \ |
abc93570 | 636 | check-snavigator \ |
b0dae4d7 | 637 | $(end-sanitize-cygnus) \ |
6a42d184 DZ |
638 | check-sim \ |
639 | check-tar \ | |
640 | check-tcl \ | |
641 | check-texinfo \ | |
642 | check-textutils \ | |
643 | check-tgas \ | |
644 | check-time \ | |
645 | check-uudecode \ | |
eebe454c TT |
646 | $(start-sanitize-ide) \ |
647 | check-vmake \ | |
648 | $(end-sanitize-ide) \ | |
6a42d184 | 649 | check-wdiff |
d237841c BC |
650 | |
651 | CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) | |
6a42d184 DZ |
652 | |
653 | # This is a list of the install targets for all of the modules which are | |
79337c85 | 654 | # compiled using $(FLAGS_TO_PASS). |
27349293 ILT |
655 | # We put install-opcodes before install-binutils because the installed |
656 | # binutils might be on PATH, and they might need the shared opcodes | |
657 | # library. | |
abc93570 ILT |
658 | # We put install-tcl before install-itcl because itcl wants to run a |
659 | # program on installation which uses the Tcl libraries. | |
79337c85 | 660 | INSTALL_MODULES = \ |
53c403df | 661 | install-apache \ |
258950c5 | 662 | install-ash \ |
79337c85 | 663 | install-autoconf \ |
08168809 | 664 | install-automake \ |
5db223e4 | 665 | install-bash \ |
79337c85 | 666 | install-bfd \ |
27349293 | 667 | install-opcodes \ |
79337c85 | 668 | install-binutils \ |
3a671555 | 669 | install-bison \ |
79337c85 | 670 | install-byacc \ |
97b951fb | 671 | install-cvssrc \ |
97840afa | 672 | install-db \ |
79337c85 ILT |
673 | install-dejagnu \ |
674 | install-diff \ | |
753d5049 | 675 | install-dosutils \ |
79337c85 ILT |
676 | install-etc \ |
677 | install-fileutils \ | |
97840afa | 678 | install-findutils \ |
79337c85 ILT |
679 | install-find \ |
680 | install-flex \ | |
bcbcf456 BE |
681 | $(start-sanitize-cygnus) \ |
682 | install-flexlm \ | |
683 | $(end-sanitize-cygnus) \ | |
79337c85 ILT |
684 | install-gas \ |
685 | install-gawk \ | |
f46d03c5 | 686 | install-gettext \ |
ba26181f | 687 | install-gnuserv \ |
79337c85 ILT |
688 | install-gprof \ |
689 | install-grep \ | |
19b1d034 | 690 | install-grez \ |
79337c85 ILT |
691 | install-gzip \ |
692 | install-hello \ | |
3718029f ILT |
693 | $(start-sanitize-ide) \ |
694 | install-ilu \ | |
695 | $(end-sanitize-ide) \ | |
79337c85 | 696 | install-indent \ |
13d7cbe2 | 697 | install-inet \ |
f46d03c5 | 698 | install-intl \ |
79337c85 | 699 | install-ispell \ |
abc93570 | 700 | install-tcl \ |
97840afa | 701 | install-itcl \ |
c070fb34 ILT |
702 | $(start-sanitize-ide) \ |
703 | install-jstools \ | |
704 | $(end-sanitize-ide) \ | |
79337c85 | 705 | install-ld \ |
67ae6381 | 706 | install-libgui \ |
79337c85 | 707 | install-libiberty \ |
43e1bf25 | 708 | $(start-sanitize-ide) \ |
eebe454c | 709 | install-libide \ |
f46d03c5 | 710 | install-libidetcl \ |
43e1bf25 | 711 | $(end-sanitize-ide) \ |
c99e91d2 | 712 | install-libtool \ |
79337c85 ILT |
713 | install-m4 \ |
714 | install-make \ | |
715 | install-mmalloc \ | |
79337c85 | 716 | install-patch \ |
0f8f1d33 | 717 | install-perl \ |
79337c85 ILT |
718 | install-prms \ |
719 | install-rcs \ | |
720 | install-readline \ | |
721 | install-recode \ | |
722 | install-sed \ | |
723 | install-send-pr \ | |
724 | install-shellutils \ | |
725 | install-sim \ | |
b0dae4d7 | 726 | $(start-sanitize-cygnus) \ |
abc93570 | 727 | install-snavigator \ |
b0dae4d7 | 728 | $(end-sanitize-cygnus) \ |
79337c85 | 729 | install-tar \ |
79337c85 ILT |
730 | install-texinfo \ |
731 | install-textutils \ | |
732 | install-tgas \ | |
733 | install-time \ | |
734 | install-uudecode \ | |
eebe454c TT |
735 | $(start-sanitize-ide) \ |
736 | install-vmake \ | |
737 | $(end-sanitize-ide) \ | |
79337c85 ILT |
738 | install-wdiff |
739 | ||
6a42d184 | 740 | # This is a list of the targets for all of the modules which are compiled |
79337c85 ILT |
741 | # using $(X11_FLAGS_TO_PASS). |
742 | ALL_X11_MODULES = \ | |
743 | all-emacs \ | |
4d802af9 | 744 | all-emacs19 \ |
04103845 | 745 | all-gdb \ |
79337c85 | 746 | all-expect \ |
65e21701 | 747 | all-gash \ |
0f8f1d33 | 748 | all-guile \ |
79337c85 | 749 | all-tclX \ |
9239dc26 ILT |
750 | all-tk \ |
751 | all-tix | |
79337c85 | 752 | |
6a42d184 DZ |
753 | # This is a list of the check targets for all of the modules which are |
754 | # compiled using $(X11_FLAGS_TO_PASS). | |
755 | CHECK_X11_MODULES = \ | |
756 | check-emacs \ | |
04103845 | 757 | check-gdb \ |
0f8f1d33 | 758 | check-guile \ |
6a42d184 | 759 | check-expect \ |
65e21701 | 760 | check-gash \ |
9239dc26 ILT |
761 | check-tclX \ |
762 | check-tk \ | |
763 | check-tix | |
6a42d184 | 764 | |
79337c85 ILT |
765 | # This is a list of the install targets for all the modules which are |
766 | # compiled using $(X11_FLAGS_TO_PASS). | |
767 | INSTALL_X11_MODULES = \ | |
768 | install-emacs \ | |
4d802af9 | 769 | install-emacs19 \ |
04103845 | 770 | install-gdb \ |
0f8f1d33 | 771 | install-guile \ |
79337c85 | 772 | install-expect \ |
65e21701 | 773 | install-gash \ |
79337c85 | 774 | install-tclX \ |
9239dc26 ILT |
775 | install-tk \ |
776 | install-tix | |
fca4f908 | 777 | |
6a42d184 | 778 | # This is a list of the targets for all of the modules which are compiled |
79337c85 ILT |
779 | # using $(TARGET_FLAGS_TO_PASS). |
780 | ALL_TARGET_MODULES = \ | |
ab1cbc67 PB |
781 | all-target-libio \ |
782 | all-target-libstdc++ \ | |
f46d03c5 ILT |
783 | all-target-librx \ |
784 | all-target-libg++ \ | |
ab1cbc67 PB |
785 | all-target-newlib \ |
786 | all-target-winsup \ | |
787 | all-target-libgloss \ | |
4c0b7ebc | 788 | all-target-libiberty \ |
10be59aa | 789 | all-target-gperf \ |
664298e6 | 790 | all-target-examples \ |
f4434c50 | 791 | all-target-libstub \ |
06855275 | 792 | $(start-sanitize-java) \ |
3970ecc7 | 793 | all-target-libjava \ |
06855275 SG |
794 | all-target-boehm-gc \ |
795 | $(end-sanitize-java) \ | |
796 | all-target-cygmon | |
79337c85 | 797 | |
ca2ce3b3 ILT |
798 | # This is a list of the configure targets for all of the modules which |
799 | # are compiled using the target tools. | |
800 | CONFIGURE_TARGET_MODULES = \ | |
ab1cbc67 PB |
801 | configure-target-libio \ |
802 | configure-target-libstdc++ \ | |
f46d03c5 ILT |
803 | configure-target-librx \ |
804 | configure-target-libg++ \ | |
ab1cbc67 PB |
805 | configure-target-newlib \ |
806 | configure-target-winsup \ | |
807 | configure-target-libgloss \ | |
4c0b7ebc | 808 | configure-target-libiberty \ |
10be59aa | 809 | configure-target-gperf \ |
664298e6 | 810 | configure-target-examples \ |
f4434c50 | 811 | configure-target-libstub \ |
06855275 | 812 | $(start-sanitize-java) \ |
3970ecc7 | 813 | configure-target-libjava \ |
06855275 SG |
814 | configure-target-boehm-gc \ |
815 | $(end-sanitize-java) \ | |
816 | configure-target-cygmon | |
ca2ce3b3 | 817 | |
6a42d184 DZ |
818 | # This is a list of the check targets for all of the modules which are |
819 | # compiled using $(TARGET_FLAGS_TO_PASS). | |
820 | CHECK_TARGET_MODULES = \ | |
ab1cbc67 PB |
821 | check-target-libio \ |
822 | check-target-libstdc++ \ | |
f46d03c5 | 823 | check-target-libg++ \ |
ab1cbc67 PB |
824 | check-target-newlib \ |
825 | check-target-winsup \ | |
10be59aa | 826 | check-target-libiberty \ |
06855275 | 827 | $(start-sanitize-java) \ |
3970ecc7 | 828 | check-target-libjava \ |
06855275 SG |
829 | check-target-boehm-gc \ |
830 | $(end-sanitize-java) \ | |
831 | check-target-gperf | |
6a42d184 DZ |
832 | |
833 | # This is a list of the install targets for all of the modules which are | |
79337c85 ILT |
834 | # compiled using $(TARGET_FLAGS_TO_PASS). |
835 | INSTALL_TARGET_MODULES = \ | |
ab1cbc67 PB |
836 | install-target-libio \ |
837 | install-target-libstdc++ \ | |
f46d03c5 | 838 | install-target-libg++ \ |
ab1cbc67 PB |
839 | install-target-newlib \ |
840 | install-target-winsup \ | |
841 | install-target-libgloss \ | |
10be59aa | 842 | install-target-libiberty \ |
06855275 | 843 | $(start-sanitize-java) \ |
3970ecc7 | 844 | install-target-libjava \ |
06855275 SG |
845 | install-target-boehm-gc \ |
846 | $(end-sanitize-java) \ | |
847 | install-target-gperf | |
7481617f | 848 | |
7508666f MM |
849 | # This is a list of the targets for which we can do a clean-{target}. |
850 | CLEAN_MODULES = \ | |
13d7cbe2 | 851 | clean-apache \ |
258950c5 | 852 | clean-ash \ |
7508666f | 853 | clean-autoconf \ |
08168809 | 854 | clean-automake \ |
5db223e4 | 855 | clean-bash \ |
7508666f MM |
856 | clean-bfd \ |
857 | clean-binutils \ | |
3a671555 | 858 | clean-bison \ |
7508666f | 859 | clean-byacc \ |
0ab3f086 BK |
860 | $(start-sanitize-cygnus) \ |
861 | clean-cgen \ | |
862 | $(end-sanitize-cygnus) \ | |
97b951fb | 863 | clean-cvssrc \ |
97840afa | 864 | clean-db \ |
7508666f MM |
865 | clean-dejagnu \ |
866 | clean-diff \ | |
867 | clean-dosutils \ | |
868 | clean-etc \ | |
869 | clean-fileutils \ | |
97840afa | 870 | clean-findutils \ |
7508666f MM |
871 | clean-find \ |
872 | clean-flex \ | |
bcbcf456 BE |
873 | $(start-sanitize-cygnus) \ |
874 | clean-flexlm \ | |
875 | $(end-sanitize-cygnus) \ | |
7508666f MM |
876 | clean-gas \ |
877 | clean-gawk \ | |
f46d03c5 | 878 | clean-gettext \ |
ba26181f | 879 | clean-gnuserv \ |
7508666f MM |
880 | clean-gprof \ |
881 | clean-grep \ | |
882 | clean-grez \ | |
883 | clean-gzip \ | |
884 | clean-hello \ | |
3718029f ILT |
885 | $(start-sanitize-ide) \ |
886 | clean-ilu \ | |
887 | $(end-sanitize-ide) \ | |
7508666f | 888 | clean-indent \ |
13d7cbe2 | 889 | clean-inet \ |
f46d03c5 | 890 | clean-intl \ |
7508666f | 891 | clean-ispell \ |
97840afa | 892 | clean-itcl \ |
c070fb34 ILT |
893 | $(start-sanitize-ide) \ |
894 | clean-jstools \ | |
895 | $(end-sanitize-ide) \ | |
7508666f | 896 | clean-ld \ |
67ae6381 | 897 | clean-libgui \ |
7508666f | 898 | clean-libiberty \ |
43e1bf25 | 899 | $(start-sanitize-ide) \ |
eebe454c | 900 | clean-libide \ |
f46d03c5 | 901 | clean-libidetcl \ |
43e1bf25 | 902 | $(end-sanitize-ide) \ |
c99e91d2 | 903 | clean-libtool \ |
7508666f MM |
904 | clean-m4 \ |
905 | clean-make \ | |
906 | clean-mmalloc \ | |
907 | clean-opcodes \ | |
908 | clean-patch \ | |
909 | clean-perl \ | |
910 | clean-prms \ | |
911 | clean-rcs \ | |
912 | clean-readline \ | |
913 | clean-release \ | |
914 | clean-recode \ | |
915 | clean-sed \ | |
916 | clean-send-pr \ | |
917 | clean-shellutils \ | |
918 | clean-sim \ | |
b0dae4d7 | 919 | $(start-sanitize-cygnus) \ |
abc93570 | 920 | clean-snavigator \ |
b0dae4d7 | 921 | $(end-sanitize-cygnus) \ |
7508666f MM |
922 | clean-tar \ |
923 | clean-tcl \ | |
924 | clean-texinfo \ | |
925 | clean-textutils \ | |
926 | clean-tgas \ | |
927 | clean-time \ | |
928 | clean-uudecode \ | |
eebe454c TT |
929 | $(start-sanitize-ide) \ |
930 | clean-vmake \ | |
931 | $(end-sanitize-ide) \ | |
7508666f MM |
932 | clean-wdiff |
933 | ||
934 | # All of the target modules that can be cleaned | |
935 | CLEAN_TARGET_MODULES = \ | |
936 | clean-target-libio \ | |
937 | clean-target-libstdc++ \ | |
f46d03c5 ILT |
938 | clean-target-librx \ |
939 | clean-target-libg++ \ | |
7508666f MM |
940 | clean-target-newlib \ |
941 | clean-target-winsup \ | |
942 | clean-target-libgloss \ | |
943 | clean-target-libiberty \ | |
10be59aa | 944 | clean-target-gperf \ |
664298e6 | 945 | clean-target-examples \ |
f4434c50 | 946 | clean-target-libstub \ |
06855275 | 947 | $(start-sanitize-java) \ |
3970ecc7 | 948 | clean-target-libjava \ |
06855275 SG |
949 | clean-target-boehm-gc \ |
950 | $(end-sanitize-java) \ | |
951 | clean-target-cygmon | |
7508666f MM |
952 | |
953 | # All of the x11 modules that can be cleaned | |
954 | CLEAN_X11_MODULES = \ | |
955 | clean-emacs \ | |
956 | clean-emacs19 \ | |
957 | clean-gdb \ | |
958 | clean-expect \ | |
959 | clean-gash \ | |
960 | clean-guile \ | |
961 | clean-tclX \ | |
9239dc26 ILT |
962 | clean-tk \ |
963 | clean-tix | |
7508666f | 964 | |
79337c85 | 965 | # The first rule in the file had better be this one. Don't put any above it. |
a59b94d2 | 966 | all: all.normal |
79337c85 ILT |
967 | .PHONY: all |
968 | ||
969 | # The target built for a native build. | |
970 | .PHONY: all.normal | |
971 | all.normal: \ | |
972 | $(ALL_MODULES) \ | |
46d0ca81 | 973 | $(ALL_X11_MODULES) \ |
2e482734 | 974 | $(ALL_TARGET_MODULES) \ |
79337c85 ILT |
975 | all-gcc |
976 | ||
0ef4728f | 977 | # Do a target for all the subdirectories. A ``make do-X'' will do a |
53222cbd RP |
978 | # ``make X'' in all subdirectories (because, in general, there is a |
979 | # dependency (below) of X upon do-X, a ``make X'' will also do this, | |
980 | # but it may do additional work as well). | |
0ef4728f ILT |
981 | # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once, |
982 | # because it is so large that it can easily overflow the command line | |
983 | # length limit on some systems. | |
79337c85 | 984 | DO_X = \ |
79337c85 ILT |
985 | do-clean \ |
986 | do-distclean \ | |
987 | do-dvi \ | |
988 | do-info \ | |
989 | do-install-info \ | |
990 | do-installcheck \ | |
991 | do-mostlyclean \ | |
ca2ce3b3 | 992 | do-maintainer-clean \ |
753d5049 | 993 | do-TAGS |
79337c85 ILT |
994 | .PHONY: $(DO_X) |
995 | $(DO_X): | |
0ef4728f | 996 | @target=`echo $@ | sed -e 's/^do-//'`; \ |
5cc73086 | 997 | r=`pwd`; export r; \ |
81eb5025 | 998 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 999 | $(SET_LIB_PATH) \ |
ab1cbc67 | 1000 | for i in $(SUBDIRS) -dummy-; do \ |
36286a3e | 1001 | if [ -f ./$$i/Makefile ]; then \ |
0ef4728f | 1002 | case $$i in \ |
0ef4728f | 1003 | gcc) \ |
6d681784 | 1004 | for flag in $(EXTRA_GCC_FLAGS); do \ |
0f8f1d33 | 1005 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ |
6d681784 | 1006 | done; \ |
0ef4728f ILT |
1007 | ;; \ |
1008 | *) \ | |
6d681784 | 1009 | for flag in $(EXTRA_HOST_FLAGS); do \ |
0f8f1d33 | 1010 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ |
6d681784 | 1011 | done; \ |
0ef4728f ILT |
1012 | ;; \ |
1013 | esac ; \ | |
d29cd970 | 1014 | export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \ |
0ef4728f | 1015 | if (cd ./$$i; \ |
6d681784 | 1016 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ |
64434418 | 1017 | "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ |
753d5049 | 1018 | "RANLIB=$${RANLIB}" \ |
d29cd970 | 1019 | "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ |
6d681784 | 1020 | $${target}); \ |
0ef4728f ILT |
1021 | then true; else exit 1; fi; \ |
1022 | else true; fi; \ | |
ec7a8792 ILT |
1023 | done |
1024 | @target=`echo $@ | sed -e 's/^do-//'`; \ | |
1025 | r=`pwd`; export r; \ | |
81eb5025 | 1026 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1027 | $(SET_LIB_PATH) \ |
ab1cbc67 PB |
1028 | for i in $(TARGET_CONFIGDIRS) -dummy-; do \ |
1029 | if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ | |
1030 | for flag in $(EXTRA_TARGET_FLAGS); do \ | |
0f8f1d33 | 1031 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \ |
ab1cbc67 | 1032 | done; \ |
d29cd970 | 1033 | export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \ |
ab1cbc67 PB |
1034 | if (cd $(TARGET_SUBDIR)/$$i; \ |
1035 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ | |
64434418 | 1036 | "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ |
ab1cbc67 | 1037 | "RANLIB=$${RANLIB}" \ |
d29cd970 | 1038 | "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ |
ab1cbc67 PB |
1039 | $${target}); \ |
1040 | then true; else exit 1; fi; \ | |
1041 | else true; fi; \ | |
0ef4728f | 1042 | done |
fb90daeb | 1043 | |
79337c85 ILT |
1044 | # Here are the targets which correspond to the do-X targets. |
1045 | ||
65088029 | 1046 | .PHONY: info installcheck dvi install-info |
ca2ce3b3 ILT |
1047 | .PHONY: clean distclean mostlyclean maintainer-clean realclean |
1048 | .PHONY: local-clean local-distclean local-maintainer-clean | |
0ef4728f | 1049 | info: do-info |
1a14993c | 1050 | installcheck: do-installcheck |
0ef4728f | 1051 | dvi: do-dvi |
9a9e8e7f | 1052 | |
97840afa TT |
1053 | # Make sure makeinfo is built before we do a `make info'. |
1054 | do-info: all-texinfo | |
1055 | ||
f35c6160 | 1056 | install-info: do-install-info dir.info |
81eb5025 | 1057 | s=`cd $(srcdir); pwd`; export s; \ |
72c09fbc SC |
1058 | if [ -f dir.info ] ; then \ |
1059 | $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \ | |
50fbe976 | 1060 | else true ; fi |
4d714963 | 1061 | |
0ef4728f | 1062 | local-clean: |
7fed4078 | 1063 | -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E |
3b30df82 | 1064 | |
0ef4728f | 1065 | local-distclean: |
2e482734 | 1066 | -rm -f Makefile config.status config.cache |
8c5bc3e3 ILT |
1067 | -if [ "$(TARGET_SUBDIR)" != "." ]; then \ |
1068 | rm -rf $(TARGET_SUBDIR); \ | |
1069 | else true; fi | |
7fcfdcf7 | 1070 | |
ca2ce3b3 ILT |
1071 | local-maintainer-clean: |
1072 | @echo "This command is intended for maintainers to use;" | |
1073 | @echo "it deletes files that may require special tools to rebuild." | |
1074 | ||
0ef4728f ILT |
1075 | clean: do-clean local-clean |
1076 | mostlyclean: do-mostlyclean local-clean | |
1077 | distclean: do-distclean local-clean local-distclean | |
ca2ce3b3 ILT |
1078 | maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean |
1079 | maintainer-clean: local-distclean | |
1080 | realclean: maintainer-clean | |
0ef4728f | 1081 | |
7508666f MM |
1082 | # This rule is used to clean specific modules. |
1083 | .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc | |
1084 | $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc: | |
1085 | @dir=`echo $@ | sed -e 's/clean-//'`; \ | |
1086 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1087 | r=`pwd`; export r; \ | |
81eb5025 | 1088 | s=`cd $(srcdir); pwd`; export s; \ |
7508666f MM |
1089 | $(SET_LIB_PATH) \ |
1090 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \ | |
1091 | else \ | |
1092 | true; \ | |
1093 | fi | |
1094 | ||
1095 | .PHONY: $(CLEAN_TARGET_MODULES) | |
1096 | $(CLEAN_TARGET_MODULES): | |
1097 | @dir=`echo $@ | sed -e 's/clean-target-//'`; \ | |
062aded9 | 1098 | rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ |
7508666f MM |
1099 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ |
1100 | r=`pwd`; export r; \ | |
81eb5025 | 1101 | s=`cd $(srcdir); pwd`; export s; \ |
7508666f MM |
1102 | $(SET_LIB_PATH) \ |
1103 | (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \ | |
1104 | else \ | |
1105 | true; \ | |
1106 | fi | |
1107 | ||
1108 | clean-target: $(CLEAN_TARGET_MODULES) | |
1109 | ||
65088029 ILT |
1110 | # Check target. |
1111 | ||
1112 | .PHONY: check | |
1113 | check: $(CHECK_MODULES) \ | |
1114 | $(CHECK_TARGET_MODULES) \ | |
1115 | $(CHECK_X11_MODULES) \ | |
1116 | check-gcc | |
1117 | ||
79337c85 | 1118 | # Installation targets. |
4d714963 | 1119 | |
04103845 | 1120 | .PHONY: install uninstall source-vault binary-vault vault-install |
98a33b6d | 1121 | install: $(INSTALL_TARGET) |
b26ff9d8 | 1122 | |
79337c85 ILT |
1123 | uninstall: |
1124 | @echo "the uninstall target is not supported in this tree" | |
1125 | ||
04103845 DE |
1126 | source-vault: |
1127 | $(MAKE) -f ./release/Build-A-Release \ | |
1128 | host=$(host_alias) source-vault | |
1129 | ||
1130 | binary-vault: | |
1131 | $(MAKE) -f ./release/Build-A-Release \ | |
1132 | host=$(host_alias) target=$(target_alias) | |
1133 | ||
275049c0 JK |
1134 | vault-install: |
1135 | @if [ -f ./release/vault-install ] ; then \ | |
1136 | ./release/vault-install $(host_alias) $(target_alias) ; \ | |
96bfa612 KR |
1137 | else \ |
1138 | true ; \ | |
275049c0 JK |
1139 | fi |
1140 | ||
79337c85 | 1141 | .PHONY: install.all |
06a07944 RP |
1142 | install.all: install-no-fixedincludes |
1143 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 1144 | r=`pwd` ; export r ; \ |
b6ae0f10 | 1145 | $(SET_LIB_PATH) \ |
06a07944 RP |
1146 | (cd ./gcc; \ |
1147 | $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ | |
1148 | else \ | |
1149 | true ; \ | |
1150 | fi | |
5a63b336 | 1151 | |
424c7ca7 | 1152 | # inet-install is used because the I*Net wants DejaGNU installed but |
f2b43566 | 1153 | # not built. Similarly, gzip is built but not installed. |
424c7ca7 | 1154 | inet-install: |
f2b43566 | 1155 | $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install |
424c7ca7 | 1156 | |
96bfa612 | 1157 | # install-no-fixedincludes is used because Cygnus can not distribute |
79337c85 ILT |
1158 | # the fixed header files. |
1159 | .PHONY: install-no-fixedincludes | |
1160 | install-no-fixedincludes: \ | |
ff290baf | 1161 | installdirs \ |
79337c85 ILT |
1162 | $(INSTALL_MODULES) \ |
1163 | $(INSTALL_TARGET_MODULES) \ | |
96bfa612 | 1164 | $(INSTALL_X11_MODULES) \ |
f35c6160 | 1165 | gcc-no-fixedincludes |
d1bea4c7 | 1166 | |
5cc24596 | 1167 | # Install the gcc headers files, but not the fixed include files, |
79337c85 ILT |
1168 | # which Cygnus is not allowed to distribute. This rule is very |
1169 | # dependent on the workings of the gcc Makefile.in. | |
1170 | .PHONY: gcc-no-fixedincludes | |
06a07944 | 1171 | gcc-no-fixedincludes: |
5cc24596 PB |
1172 | @if [ -f ./gcc/Makefile ]; then \ |
1173 | rm -rf gcc/tmp-include; \ | |
1174 | mv gcc/include gcc/tmp-include 2>/dev/null; \ | |
1175 | mkdir gcc/include; \ | |
7f9cb3b2 | 1176 | cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ |
753d5049 | 1177 | touch gcc/stmp-fixinc gcc/include/fixed; \ |
a54e05f6 | 1178 | rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ |
5cc73086 | 1179 | r=`pwd`; export r; \ |
81eb5025 | 1180 | s=`cd $(srcdir); pwd` ; export s; \ |
b6ae0f10 | 1181 | $(SET_LIB_PATH) \ |
5cc24596 PB |
1182 | (cd ./gcc; \ |
1183 | $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ | |
1184 | rm -rf gcc/include; \ | |
1185 | mv gcc/tmp-include gcc/include 2>/dev/null; \ | |
1186 | else true; fi | |
dcbfc14d | 1187 | |
2ec9f3fd KS |
1188 | # start-sanitize-ide |
1189 | # Install Foundry. Avoid installing a bunch of stuff we don't need. | |
1190 | install-foundry: | |
1191 | mods="$(INSTALL_MODULES)"; \ | |
1192 | x11_mods="$(INSTALL_X11_MODULES)"; \ | |
1193 | for d in install-tcl install-tk install-itcl install-tix install-ilu; do \ | |
1194 | mods="`echo $${mods} | sed -e "s/$$d//"`"; \ | |
1195 | x11_mods="`echo $${x11_mods} | sed -e "s/$$d//"`"; \ | |
1196 | done; \ | |
1197 | $(MAKE) INSTALL_MODULES="$${mods}" INSTALL_X11_MODULES="$${x11_mods}" install | |
1198 | for d in tcl tk itcl tix ilu; do \ | |
1199 | if [ -f $$d/Makefile ]; then \ | |
1200 | r=`pwd`; export r; \ | |
1201 | s=`cd $(srcdir); pwd`; export s; \ | |
1202 | $(SET_LIB_PATH) \ | |
1203 | (cd $$d; $(MAKE) $(FLAGS_TO_PASS) install-minimal); \ | |
1204 | else \ | |
1205 | true; \ | |
1206 | fi; \ | |
1207 | done | |
1208 | # end-sanitize-ide | |
1209 | ||
79337c85 ILT |
1210 | # This rule is used to build the modules which use FLAGS_TO_PASS. To |
1211 | # build a target all-X means to cd to X and make all. | |
3de70f1d | 1212 | # |
055cca84 | 1213 | # all-gui, and all-libproc are handled specially because |
4d802af9 MT |
1214 | # they are still experimental, and if they fail to build, that |
1215 | # shouldn't stop "make all". | |
04103845 DE |
1216 | .PHONY: $(ALL_MODULES) all-gui all-libproc |
1217 | $(ALL_MODULES) all-gui all-libproc: | |
79337c85 | 1218 | @dir=`echo $@ | sed -e 's/all-//'`; \ |
472af17f ILT |
1219 | if [ -f ./$${dir}/Makefile ] ; then \ |
1220 | r=`pwd`; export r; \ | |
81eb5025 | 1221 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1222 | $(SET_LIB_PATH) \ |
472af17f | 1223 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ |
07362bd9 | 1224 | else \ |
79337c85 | 1225 | true; \ |
07362bd9 DZ |
1226 | fi |
1227 | ||
80cbf870 ILT |
1228 | # These rules are used to check the modules which use FLAGS_TO_PASS. |
1229 | # To build a target check-X means to cd to X and make check. Some | |
1230 | # modules are only tested in a native toolchain. | |
4f0b8f27 | 1231 | |
d237841c BC |
1232 | .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) |
1233 | $(NATIVE_CHECK_MODULES): | |
39cc6dae RS |
1234 | @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
1235 | dir=`echo $@ | sed -e 's/check-//'`; \ | |
472af17f ILT |
1236 | if [ -f ./$${dir}/Makefile ] ; then \ |
1237 | r=`pwd`; export r; \ | |
81eb5025 | 1238 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1239 | $(SET_LIB_PATH) \ |
472af17f ILT |
1240 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ |
1241 | else \ | |
1242 | true; \ | |
4f0b8f27 TL |
1243 | fi; \ |
1244 | fi | |
1245 | ||
1246 | $(CROSS_CHECK_MODULES): | |
6a42d184 DZ |
1247 | @dir=`echo $@ | sed -e 's/check-//'`; \ |
1248 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 1249 | r=`pwd`; export r; \ |
81eb5025 | 1250 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1251 | $(SET_LIB_PATH) \ |
6a42d184 DZ |
1252 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ |
1253 | else \ | |
1254 | true; \ | |
1255 | fi | |
1256 | ||
79337c85 ILT |
1257 | # This rule is used to install the modules which use FLAGS_TO_PASS. |
1258 | # To build a target install-X means to cd to X and make install. | |
1259 | .PHONY: $(INSTALL_MODULES) | |
ff290baf | 1260 | $(INSTALL_MODULES): installdirs |
79337c85 ILT |
1261 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
1262 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 1263 | r=`pwd`; export r; \ |
81eb5025 | 1264 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1265 | $(SET_LIB_PATH) \ |
f35c6160 | 1266 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ |
07362bd9 | 1267 | else \ |
79337c85 | 1268 | true; \ |
07362bd9 DZ |
1269 | fi |
1270 | ||
ca2ce3b3 ILT |
1271 | # This rule is used to configure the modules which are built with the |
1272 | # target tools. | |
1273 | .PHONY: $(CONFIGURE_TARGET_MODULES) | |
1274 | $(CONFIGURE_TARGET_MODULES): | |
ab1cbc67 | 1275 | @dir=`echo $@ | sed -e 's/configure-target-//'`; \ |
354a86c7 | 1276 | if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \ |
59d3634c | 1277 | r=`pwd`; export r; \ |
f2b43566 ILT |
1278 | $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \ |
1279 | if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \ | |
1280 | if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \ | |
1281 | if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \ | |
1282 | rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ | |
1283 | else \ | |
1284 | echo "Multilibs changed for $${dir}, reconfiguring"; \ | |
1285 | rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \ | |
1286 | mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ | |
1287 | fi; \ | |
354a86c7 | 1288 | else \ |
0ab3f086 BK |
1289 | if echo '.;' | cmp - $(TARGET_SUBDIR)/$${dir}/tmpmulti.out >/dev/null 2>&1; then \ |
1290 | true; \ | |
1291 | else \ | |
1292 | rm -f $(TARGET_SUBDIR)/$${dir}/Makefile; \ | |
1293 | fi; \ | |
354a86c7 MM |
1294 | mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ |
1295 | fi; \ | |
062aded9 | 1296 | fi; \ |
354a86c7 MM |
1297 | fi; exit 0 # break command into two pieces |
1298 | @dir=`echo $@ | sed -e 's/configure-target-//'`; \ | |
3e288e27 SG |
1299 | if [ ! -d $(TARGET_SUBDIR) ]; then \ |
1300 | true; \ | |
1301 | elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
ca2ce3b3 ILT |
1302 | true; \ |
1303 | elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \ | |
efd7b806 | 1304 | if [ -d $(srcdir)/$${dir} ]; then \ |
ab1cbc67 | 1305 | [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\ |
efd7b806 | 1306 | r=`pwd`; export r; \ |
81eb5025 | 1307 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1308 | $(SET_LIB_PATH) \ |
efd7b806 SC |
1309 | AR="$(AR_FOR_TARGET)"; export AR; \ |
1310 | AS="$(AS_FOR_TARGET)"; export AS; \ | |
1311 | CC="$(CC_FOR_TARGET)"; export CC; \ | |
1312 | CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ | |
1313 | CXX="$(CXX_FOR_TARGET)"; export CXX; \ | |
1314 | CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ | |
b6ae0f10 | 1315 | DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ |
054f9ada | 1316 | LD="$(LD_FOR_TARGET)"; export LD; \ |
276c2d7d | 1317 | LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ |
efd7b806 SC |
1318 | NM="$(NM_FOR_TARGET)"; export NM; \ |
1319 | RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ | |
d29cd970 | 1320 | WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ |
19b1d034 | 1321 | echo Configuring in $(TARGET_SUBDIR)/$${dir}; \ |
ab1cbc67 | 1322 | cd $(TARGET_SUBDIR)/$${dir}; \ |
283a2b3d DE |
1323 | case $(srcdir) in \ |
1324 | /*) \ | |
1325 | topdir=$(srcdir) ;; \ | |
1326 | *) \ | |
1327 | case "$(TARGET_SUBDIR)" in \ | |
1328 | .) topdir="../$(srcdir)" ;; \ | |
1329 | *) topdir="../../$(srcdir)" ;; \ | |
1330 | esac ;; \ | |
1331 | esac; \ | |
1332 | if [ "$(srcdir)" = "." ] ; then \ | |
1333 | if [ "$(TARGET_SUBDIR)" != "." ] ; then \ | |
81eb5025 | 1334 | if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \ |
0f8f1d33 TT |
1335 | if [ -f Makefile ]; then \ |
1336 | if $(MAKE) distclean; then \ | |
1337 | true; \ | |
1338 | else \ | |
1339 | exit 1; \ | |
1340 | fi; \ | |
1341 | else \ | |
1342 | true; \ | |
1343 | fi; \ | |
283a2b3d DE |
1344 | else \ |
1345 | exit 1; \ | |
1346 | fi; \ | |
1347 | else \ | |
1348 | true; \ | |
1349 | fi; \ | |
1350 | srcdiroption="--srcdir=."; \ | |
1351 | libsrcdir="."; \ | |
1352 | else \ | |
1353 | srcdiroption="--srcdir=$${topdir}/$${dir}"; \ | |
81eb5025 | 1354 | libsrcdir="$$s/$${dir}"; \ |
283a2b3d DE |
1355 | fi; \ |
1356 | if [ -f $${libsrcdir}/configure ] ; then \ | |
1357 | $(SHELL) $${libsrcdir}/configure \ | |
1358 | $(CONFIG_ARGUMENTS) $${srcdiroption} \ | |
1359 | --with-target-subdir="$(TARGET_SUBDIR)"; \ | |
19b1d034 | 1360 | else \ |
81eb5025 | 1361 | $(SHELL) $$s/configure \ |
283a2b3d DE |
1362 | $(CONFIG_ARGUMENTS) $${srcdiroption} \ |
1363 | --with-target-subdir="$(TARGET_SUBDIR)"; \ | |
19b1d034 | 1364 | fi; \ |
efd7b806 SC |
1365 | else \ |
1366 | true; \ | |
9908eb6a | 1367 | fi; \ |
ca2ce3b3 ILT |
1368 | else \ |
1369 | true; \ | |
1370 | fi | |
1371 | ||
6a42d184 DZ |
1372 | # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS. |
1373 | # To build a target all-X means to cd to X and make all. | |
79337c85 ILT |
1374 | .PHONY: $(ALL_TARGET_MODULES) |
1375 | $(ALL_TARGET_MODULES): | |
ab1cbc67 PB |
1376 | @dir=`echo $@ | sed -e 's/all-target-//'`; \ |
1377 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
5cc73086 | 1378 | r=`pwd`; export r; \ |
81eb5025 | 1379 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1380 | $(SET_LIB_PATH) \ |
ab1cbc67 | 1381 | (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ |
07362bd9 | 1382 | else \ |
79337c85 | 1383 | true; \ |
07362bd9 DZ |
1384 | fi |
1385 | ||
6a42d184 DZ |
1386 | # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS. |
1387 | # To build a target install-X means to cd to X and make install. | |
1388 | .PHONY: $(CHECK_TARGET_MODULES) | |
1389 | $(CHECK_TARGET_MODULES): | |
136ca05d | 1390 | @dir=`echo $@ | sed -e 's/check-target-//'`; \ |
ab1cbc67 | 1391 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ |
5cc73086 | 1392 | r=`pwd`; export r; \ |
81eb5025 | 1393 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1394 | $(SET_LIB_PATH) \ |
ab1cbc67 | 1395 | (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\ |
6a42d184 DZ |
1396 | else \ |
1397 | true; \ | |
1398 | fi | |
1399 | ||
79337c85 ILT |
1400 | # This rule is used to install the modules which use |
1401 | # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X | |
1402 | # and make install. | |
1403 | .PHONY: $(INSTALL_TARGET_MODULES) | |
ff290baf | 1404 | $(INSTALL_TARGET_MODULES): installdirs |
ab1cbc67 PB |
1405 | @dir=`echo $@ | sed -e 's/install-target-//'`; \ |
1406 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
5cc73086 | 1407 | r=`pwd`; export r; \ |
81eb5025 | 1408 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1409 | $(SET_LIB_PATH) \ |
ab1cbc67 PB |
1410 | (cd $(TARGET_SUBDIR)/$${dir}; \ |
1411 | $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \ | |
07362bd9 | 1412 | else \ |
79337c85 | 1413 | true; \ |
07362bd9 DZ |
1414 | fi |
1415 | ||
6a42d184 | 1416 | # This rule is used to build the modules which use X11_FLAGS_TO_PASS. |
79337c85 ILT |
1417 | # To build a target all-X means to cd to X and make all. |
1418 | .PHONY: $(ALL_X11_MODULES) | |
1419 | $(ALL_X11_MODULES): | |
1420 | @dir=`echo $@ | sed -e 's/all-//'`; \ | |
1421 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 1422 | r=`pwd`; export r; \ |
81eb5025 | 1423 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1424 | $(SET_LIB_PATH) \ |
79337c85 ILT |
1425 | (cd $${dir}; \ |
1426 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \ | |
07362bd9 | 1427 | else \ |
79337c85 | 1428 | true; \ |
07362bd9 DZ |
1429 | fi |
1430 | ||
6a42d184 DZ |
1431 | # This rule is used to check the modules which use X11_FLAGS_TO_PASS. |
1432 | # To build a target check-X means to cd to X and make all. | |
1433 | .PHONY: $(CHECK_X11_MODULES) | |
1434 | $(CHECK_X11_MODULES): | |
1435 | @dir=`echo $@ | sed -e 's/check-//'`; \ | |
1436 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 1437 | r=`pwd`; export r; \ |
81eb5025 | 1438 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1439 | $(SET_LIB_PATH) \ |
6a42d184 DZ |
1440 | (cd $${dir}; \ |
1441 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \ | |
1442 | else \ | |
1443 | true; \ | |
1444 | fi | |
1445 | ||
1446 | # This rule is used to install the modules which use X11_FLAGS_TO_PASS. | |
79337c85 ILT |
1447 | # To build a target install-X means to cd to X and make install. |
1448 | .PHONY: $(INSTALL_X11_MODULES) | |
48a3d5e5 | 1449 | $(INSTALL_X11_MODULES): installdirs |
6a42d184 | 1450 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
79337c85 | 1451 | if [ -f ./$${dir}/Makefile ] ; then \ |
5cc73086 | 1452 | r=`pwd`; export r; \ |
81eb5025 | 1453 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1454 | $(SET_LIB_PATH) \ |
79337c85 ILT |
1455 | (cd $${dir}; \ |
1456 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \ | |
07362bd9 | 1457 | else \ |
79337c85 | 1458 | true; \ |
07362bd9 DZ |
1459 | fi |
1460 | ||
79337c85 ILT |
1461 | # gcc is the only module which uses GCC_FLAGS_TO_PASS. |
1462 | .PHONY: all-gcc | |
1463 | all-gcc: | |
1464 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 1465 | r=`pwd`; export r; \ |
81eb5025 | 1466 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1467 | $(SET_LIB_PATH) \ |
79337c85 | 1468 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ |
07362bd9 | 1469 | else \ |
79337c85 | 1470 | true; \ |
07362bd9 DZ |
1471 | fi |
1472 | ||
4c0b7ebc DE |
1473 | .PHONY: all-bootstrap |
1474 | all-bootstrap: | |
1475 | @if [ -f ./gcc/Makefile ] ; then \ | |
1476 | r=`pwd`; export r; \ | |
81eb5025 | 1477 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1478 | $(SET_LIB_PATH) \ |
4c0b7ebc DE |
1479 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \ |
1480 | else \ | |
1481 | true; \ | |
1482 | fi | |
1483 | ||
65088029 ILT |
1484 | .PHONY: check-gcc |
1485 | check-gcc: | |
1486 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 1487 | r=`pwd`; export r; \ |
81eb5025 | 1488 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1489 | $(SET_LIB_PATH) \ |
65088029 ILT |
1490 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ |
1491 | else \ | |
1492 | true; \ | |
1493 | fi | |
1494 | ||
79337c85 ILT |
1495 | .PHONY: install-gcc |
1496 | install-gcc: | |
1497 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 1498 | r=`pwd`; export r; \ |
81eb5025 | 1499 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1500 | $(SET_LIB_PATH) \ |
79337c85 | 1501 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ |
07362bd9 | 1502 | else \ |
79337c85 | 1503 | true; \ |
07362bd9 DZ |
1504 | fi |
1505 | ||
753d5049 SC |
1506 | |
1507 | # EXPERIMENTAL STUFF | |
1508 | # This rule is used to install the modules which use FLAGS_TO_PASS. | |
1509 | # To build a target install-X means to cd to X and make install. | |
09985c96 | 1510 | .PHONY: install-dosrel |
ff290baf | 1511 | install-dosrel: installdirs info |
753d5049 SC |
1512 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
1513 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1514 | r=`pwd`; export r; \ | |
81eb5025 | 1515 | s=`cd $(srcdir); pwd`; export s; \ |
b6ae0f10 | 1516 | $(SET_LIB_PATH) \ |
753d5049 SC |
1517 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ |
1518 | else \ | |
1519 | true; \ | |
1520 | fi | |
1521 | ||
09985c96 | 1522 | install-dosrel-fake: |
a987271c | 1523 | |
753d5049 | 1524 | |
79337c85 | 1525 | # This is a list of inter-dependencies among modules. |
53c403df | 1526 | all-apache: |
258950c5 | 1527 | all-ash: |
3a671555 | 1528 | all-autoconf: all-m4 all-texinfo |
08168809 | 1529 | all-automake: |
5db223e4 | 1530 | all-bash: |
6bf191bf TT |
1531 | all-bfd: all-libiberty all-intl |
1532 | all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl | |
97036944 | 1533 | all-bison: all-texinfo |
06855275 | 1534 | # start-sanitize-java |
ba7634ad | 1535 | all-target-boehm-gc: configure-target-boehm-gc |
06855275 | 1536 | # end-sanitize-java |
79337c85 | 1537 | all-byacc: |
0ab3f086 BK |
1538 | # start-sanitize-cygnus |
1539 | all-cgen: | |
1540 | # These two have dependencies on cgen, and while this section is alphabetically | |
1541 | # sorted, I wish to keep these together until things settle. | |
1542 | all-opcodes: all-cgen | |
1543 | all-sim: all-cgen | |
1544 | # end-sanitize-cygnus | |
97b951fb | 1545 | all-cvssrc: |
664298e6 | 1546 | configure-target-cygmon: $(ALL_GCC) |
f4434c50 | 1547 | all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub |
2e482734 | 1548 | all-db: |
4d802af9 | 1549 | all-dejagnu: all-tcl all-expect all-tk |
79337c85 ILT |
1550 | all-diff: all-libiberty |
1551 | all-emacs: | |
3a671555 | 1552 | all-emacs19: all-bison all-byacc |
79337c85 | 1553 | all-etc: |
4c0b7ebc DE |
1554 | configure-target-examples: $(ALL_GCC) |
1555 | all-target-examples: configure-target-examples | |
c6ba9ae0 | 1556 | all-expect: all-tcl all-tk |
275049c0 | 1557 | all-fileutils: all-libiberty |
97840afa | 1558 | all-findutils: |
79337c85 | 1559 | all-find: |
3a671555 | 1560 | all-flex: all-libiberty all-bison all-byacc |
bcbcf456 BE |
1561 | # start-sanitize-cygnus |
1562 | all-flexlm: | |
1563 | # end-sanitize-cygnus | |
6bf191bf | 1564 | all-gas: all-libiberty all-opcodes all-bfd all-intl |
65e21701 | 1565 | all-gash: all-tcl |
79337c85 | 1566 | all-gawk: |
fc3524a9 | 1567 | ALL_GCC = all-gcc |
3a671555 JM |
1568 | all-gcc: all-bison all-byacc all-binutils all-gas all-ld |
1569 | all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld | |
43e1bf25 JL |
1570 | GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui |
1571 | # start-sanitize-ide | |
f46d03c5 | 1572 | GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui all-libide all-libidetcl |
43e1bf25 | 1573 | # end-sanitize-ide |
3a671555 | 1574 | all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK) |
f46d03c5 | 1575 | all-gettext: |
ba26181f | 1576 | all-gnuserv: |
10be59aa | 1577 | configure-target-gperf: $(ALL_GCC) |
97b951fb | 1578 | all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++ |
6bf191bf | 1579 | all-gprof: all-libiberty all-bfd all-opcodes all-intl |
b6ae0f10 | 1580 | all-grez: all-libiberty all-bfd all-opcodes |
ab1cbc67 | 1581 | all-gui: all-gdb all-libproc all-target-librx |
0f8f1d33 | 1582 | all-guile: |
79337c85 ILT |
1583 | all-gzip: all-libiberty |
1584 | all-hello: all-libiberty | |
3718029f ILT |
1585 | # start-sanitize-ide |
1586 | all-ilu: | |
1587 | # end-sanitize-ide | |
79337c85 | 1588 | all-indent: |
8d1d94b6 | 1589 | all-inet: all-tcl all-send-pr all-perl |
f46d03c5 | 1590 | all-intl: |
3585593d | 1591 | all-ispell: all-emacs19 |
754a6784 | 1592 | all-itcl: all-tcl all-tk |
c070fb34 | 1593 | # start-sanitize-ide |
f46d03c5 | 1594 | all-jstools: all-tcl all-tk all-tix all-libgui all-libide all-libidetcl |
c070fb34 | 1595 | # end-sanitize-ide |
6bf191bf | 1596 | all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl |
283a2b3d | 1597 | configure-target-libg++: $(ALL_GCC) configure-target-librx |
ab1cbc67 PB |
1598 | all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++ |
1599 | configure-target-libgloss: $(ALL_GCC) | |
283a2b3d | 1600 | all-target-libgloss: configure-target-libgloss configure-target-newlib |
ab1cbc67 PB |
1601 | configure-target-libio: $(ALL_GCC) |
1602 | all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib | |
2ec9f3fd | 1603 | check-target-libio: all-target-libstdc++ |
67ae6381 | 1604 | all-libgui: all-tcl all-tk all-itcl |
79337c85 | 1605 | all-libiberty: |
87d36c31 | 1606 | # start-sanitize-ide |
f46d03c5 ILT |
1607 | all-libide: all-ilu |
1608 | all-libidetcl: all-tcl all-tk all-itcl all-ilu all-libgui all-libide | |
87d36c31 | 1609 | # end-sanitize-ide |
06855275 | 1610 | # start-sanitize-java |
0ab3f086 BK |
1611 | configure-target-libjava: $(ALL_GCC) configure-target-boehm-gc |
1612 | all-target-libjava: configure-target-libjava all-gcc all-target-newlib all-target-boehm-gc | |
06855275 | 1613 | # end-sanitize-java |
ab1cbc67 PB |
1614 | configure-target-librx: $(ALL_GCC) configure-target-newlib |
1615 | all-target-librx: configure-target-librx | |
1616 | configure-target-libstdc++: $(ALL_GCC) | |
1617 | all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio | |
f4434c50 BM |
1618 | configure-target-libstub: $(ALL_GCC) |
1619 | all-target-libstub: configure-target-libstub | |
c99e91d2 | 1620 | all-libtool: |
79337c85 ILT |
1621 | all-m4: all-libiberty |
1622 | all-make: all-libiberty | |
1623 | all-mmalloc: | |
ab1cbc67 PB |
1624 | configure-target-newlib: $(ALL_GCC) |
1625 | all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc | |
b6ae0f10 | 1626 | all-opcodes: all-bfd all-libiberty |
be2c65d3 | 1627 | all-patch: all-libiberty |
0f8f1d33 | 1628 | all-perl: |
b255ccdb | 1629 | all-prms: all-libiberty |
79337c85 ILT |
1630 | all-rcs: |
1631 | all-readline: | |
1632 | all-recode: all-libiberty | |
ac259c28 JM |
1633 | all-sed: all-libiberty |
1634 | all-send-pr: all-prms | |
79337c85 | 1635 | all-shellutils: |
97036944 | 1636 | all-sim: all-libiberty all-bfd all-opcodes all-readline |
b0dae4d7 SP |
1637 | # start-sanitize-cygnus |
1638 | all-snavigator: all-tcl all-tk all-tix all-itcl all-db all-grep all-flexlm all-libgui | |
1639 | # end-sanitize-cygnus | |
07362bd9 | 1640 | all-tar: all-libiberty |
79337c85 ILT |
1641 | all-tcl: |
1642 | all-tclX: all-tcl all-tk | |
1643 | all-tk: all-tcl | |
1644 | all-texinfo: all-libiberty | |
1645 | all-textutils: | |
b6ae0f10 | 1646 | all-tgas: all-libiberty all-bfd all-opcodes |
79337c85 | 1647 | all-time: |
c446cc8b | 1648 | all-tix: all-tcl all-tk |
eebe454c | 1649 | # start-sanitize-ide |
f46d03c5 | 1650 | all-vmake: all-tcl all-tk all-itcl all-tix all-libgui all-libide all-libidetcl |
eebe454c | 1651 | # end-sanitize-ide |
79337c85 | 1652 | all-wdiff: |
fd249336 | 1653 | all-target-winsup: all-target-newlib all-target-libiberty all-target-libio configure-target-winsup |
ab1cbc67 | 1654 | configure-target-winsup: configure-target-newlib |
79337c85 | 1655 | all-uudecode: all-libiberty |
ab1cbc67 PB |
1656 | configure-target-libiberty: $(ALL_GCC) |
1657 | all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib | |
0f8f1d33 TT |
1658 | all-target: $(ALL_TARGET_MODULES) |
1659 | install-target: $(INSTALL_TARGET_MODULES) | |
abc93570 | 1660 | # start-sanitize-gdbtk |
bfde75f7 | 1661 | install-gdb: install-tcl install-tk install-itcl install-tix install-libgui |
abc93570 | 1662 | #end-sanitize-gdbtk |
79337c85 | 1663 | ### other supporting targets |
07362bd9 | 1664 | |
79337c85 ILT |
1665 | MAKEDIRS= \ |
1666 | $(prefix) \ | |
9deb9485 | 1667 | $(exec_prefix) |
ff290baf ILT |
1668 | .PHONY: installdirs |
1669 | installdirs: mkinstalldirs | |
fab3dd2d | 1670 | $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) |
23e3e7f9 | 1671 | |
79337c85 ILT |
1672 | dir.info: do-install-info |
1673 | if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ | |
1674 | $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ | |
1675 | mv -f dir.info.new dir.info ; \ | |
1676 | else true ; \ | |
72c09fbc | 1677 | fi |
6b7e5998 | 1678 | |
b1cceba2 DZ |
1679 | dist: |
1680 | @echo "Building a full distribution of this tree isn't done" | |
1681 | @echo "via 'make dist'. Check out the etc/ subdirectory" | |
1682 | ||
eb02fd64 RP |
1683 | etags tags: TAGS |
1684 | ||
753d5049 SC |
1685 | # Right now this just builds TAGS in each subdirectory. emacs19 has the |
1686 | # ability to use several tags files at once, so there is probably no need | |
1687 | # to combine them into one big TAGS file (like CVS 1.3 does). We could | |
1688 | # (if we felt like it) have this Makefile write a piece of elisp which | |
1689 | # the user could load to tell emacs19 where all the TAGS files we just | |
1690 | # built are. | |
1691 | TAGS: do-TAGS | |
eb02fd64 | 1692 | |
eb02fd64 RP |
1693 | # with the gnu make, this is done automatically. |
1694 | ||
01ec9588 | 1695 | Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) |
a26878d1 | 1696 | $(SHELL) ./config.status |
eb02fd64 | 1697 | |
11954bf1 | 1698 | # |
01ec9588 | 1699 | # Support for building net releases |
11954bf1 | 1700 | |
01ec9588 JK |
1701 | # Files in devo used in any net release. |
1702 | # ChangeLog omitted because it may refer to files which are not in this | |
1703 | # distribution (perhaps it would be better to include it anyway). | |
d94d255d | 1704 | DEVO_SUPPORT= README Makefile.in configure configure.in \ |
9823504d | 1705 | config.guess config.sub config move-if-change \ |
5f69e8bc | 1706 | mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \ |
08499fc2 | 1707 | COPYING COPYING.LIB install-sh config-ml.in symlink-tree \ |
6e68a23e | 1708 | mkinstalldirs ltconfig ltmain.sh missing ylwrap |
01ec9588 JK |
1709 | |
1710 | # Files in devo/etc used in any net release. | |
1711 | # ChangeLog omitted because it may refer to files which are not in this | |
1712 | # distribution (perhaps it would be better to include it anyway). | |
f046ec67 JM |
1713 | ETC_SUPPORT= Makefile.in configure configure.in standards.texi \ |
1714 | make-stds.texi standards.info* | |
01ec9588 | 1715 | |
40e16078 KR |
1716 | # When you use `make setup-dirs' or `make taz' you should always redefine |
1717 | # this macro. | |
1718 | SUPPORT_FILES = list-of-support-files-for-tool-in-question | |
40e16078 | 1719 | |
a54e05f6 KR |
1720 | .PHONY: taz |
1721 | ||
484fa12d JW |
1722 | taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \ |
1723 | texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo | |
258950c5 | 1724 | # Take out texinfo from a few places. |
484fa12d JW |
1725 | sed -e '/^all\.normal: /s/\all-texinfo //' \ |
1726 | -e '/^ install-texinfo /d' \ | |
484fa12d JW |
1727 | <Makefile.in >tmp |
1728 | mv -f tmp Makefile.in | |
65e21701 | 1729 | # |
1d5fcc66 PB |
1730 | $(start-sanitize-Sanitize) |
1731 | @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ; | |
1732 | $(end-sanitize-Sanitize) | |
40e16078 | 1733 | ./configure sun4 |
ab1cbc67 PB |
1734 | [ -z "$(CONFIGURE_TARGET_MODULES)" ] \ |
1735 | || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \ | |
aaefc574 | 1736 | CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)" |
6b9e3a78 | 1737 | # Make links, and run "make diststuff" or "make info" when needed. |
a54e05f6 | 1738 | rm -rf proto-toplev ; mkdir proto-toplev |
7f9cb3b2 | 1739 | set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \ |
a54e05f6 KR |
1740 | for d in $$dirs ; do \ |
1741 | if [ -d $$d ]; then \ | |
ab1cbc67 PB |
1742 | if [ ! -f $$d/Makefile ] ; then true ; \ |
1743 | elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \ | |
1744 | (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \ | |
6b9e3a78 | 1745 | elif grep '^info:' $$d/Makefile >/dev/null ; then \ |
ab1cbc67 | 1746 | (cd $$d ; $(MAKE) info ) || exit 1 ; \ |
6b9e3a78 | 1747 | fi ; \ |
7f9cb3b2 KR |
1748 | if [ -d $$d/proto-$$d.dir ]; then \ |
1749 | ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ | |
1750 | else \ | |
1751 | ln -s ../$$d proto-toplev/$$d ; \ | |
1752 | fi ; \ | |
a54e05f6 | 1753 | else ln -s ../$$d proto-toplev/$$d ; fi ; \ |
40e16078 | 1754 | done |
3dbe0fa2 | 1755 | cd etc ; $(MAKE) info |
5600fbd2 | 1756 | $(MAKE) distclean |
a54e05f6 | 1757 | # |
40e16078 | 1758 | mkdir proto-toplev/etc |
15408b3b KR |
1759 | (cd proto-toplev/etc; \ |
1760 | for i in $(ETC_SUPPORT); do \ | |
40e16078 | 1761 | ln -s ../../etc/$$i . ; \ |
15408b3b | 1762 | done) |
a54e05f6 | 1763 | # |
04103845 | 1764 | # Take out texinfo from configurable dirs |
40e16078 KR |
1765 | rm proto-toplev/configure.in |
1766 | sed -e '/^host_tools=/s/texinfo //' \ | |
40e16078 | 1767 | <configure.in >proto-toplev/configure.in |
a54e05f6 | 1768 | # |
40e16078 | 1769 | mkdir proto-toplev/texinfo |
8d190aa3 KR |
1770 | ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ |
1771 | ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/ | |
1772 | ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/ | |
1773 | if test -r texinfo/util/tex3patch ; then \ | |
1774 | mkdir proto-toplev/texinfo/util && \ | |
1775 | ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \ | |
1776 | else true; fi | |
a561909f | 1777 | chmod og=u `find . -print` |
19ebe123 ILT |
1778 | if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ |
1779 | ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \ | |
1780 | else \ | |
1781 | ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \ | |
1782 | fi; \ | |
1783 | $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver | |
b5dbae28 KR |
1784 | |
1785 | do-tar-gz: | |
1786 | echo "==> Making $(TOOL)-$(VER).tar.gz" | |
1787 | -rm -f $(TOOL)-$(VER) | |
1788 | ln -s proto-toplev $(TOOL)-$(VER) | |
1789 | tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER) | |
1790 | $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar | |
40e16078 | 1791 | |
484fa12d | 1792 | TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo |
7f9cb3b2 | 1793 | DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) |
40e16078 | 1794 | |
96bfa612 | 1795 | .PHONY: gas.tar.gz |
1e93b49b | 1796 | GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms |
96bfa612 | 1797 | gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas |
484fa12d JW |
1798 | $(MAKE) -f Makefile.in taz TOOL=gas \ |
1799 | SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" | |
40e16078 | 1800 | |
7f9cb3b2 | 1801 | # The FSF "binutils" release includes gprof and ld. |
96bfa612 | 1802 | .PHONY: binutils.tar.gz |
1e93b49b | 1803 | BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms |
96bfa612 | 1804 | binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils |
484fa12d | 1805 | $(MAKE) -f Makefile.in taz TOOL=binutils \ |
2492f942 | 1806 | SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat" |
7f9cb3b2 | 1807 | |
96bfa612 | 1808 | .PHONY: gas+binutils.tar.gz |
b0dae4d7 | 1809 | GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof |
96bfa612 | 1810 | gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas |
484fa12d | 1811 | $(MAKE) -f Makefile.in taz TOOL=gas \ |
2492f942 | 1812 | SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat" |
79337c85 | 1813 | |
5600fbd2 | 1814 | .PHONY: libg++.tar.gz |
ab1cbc67 | 1815 | LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty |
5600fbd2 | 1816 | libg++.tar.gz: $(DIST_SUPPORT) libg++ |
484fa12d JW |
1817 | $(MAKE) -f Makefile.in taz TOOL=libg++ \ |
1818 | SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)" | |
5600fbd2 | 1819 | |
49dfa984 JM |
1820 | GNATS_SUPPORT_DIRS=include libiberty send-pr |
1821 | gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats | |
a0bd8e18 | 1822 | $(MAKE) -f Makefile.in taz TOOL=gnats \ |
49dfa984 JM |
1823 | SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)" |
1824 | ||
1d5fcc66 | 1825 | .PHONY: gdb.tar.gz |
1e93b49b | 1826 | GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl |
ca2ce3b3 | 1827 | GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi` |
1d5fcc66 PB |
1828 | gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb |
1829 | $(MAKE) -f Makefile.in taz TOOL=gdb \ | |
ca2ce3b3 | 1830 | SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)" |
1d5fcc66 | 1831 | |
7166a308 | 1832 | .PHONY: newlib.tar.gz |
a220ba0f | 1833 | NEWLIB_SUPPORT_DIRS=libgloss |
04103845 | 1834 | # taz configures for the sun4 target which won't configure newlib. |
a220ba0f SC |
1835 | # We need newlib configured so that the .info files are made. |
1836 | # Unfortunately, it is not enough to just configure newlib separately: | |
1837 | # taz will build the .info files but since SUBDIRS won't contain newlib, | |
1838 | # distclean won't be run (leaving Makefile, config.status, and the tmp files | |
1839 | # used in building the .info files, eg: *.def, *.ref). | |
4c0b7ebc DE |
1840 | # The problem isn't solvable however without a lot of extra work because |
1841 | # target libraries are built in subdir $(target_alias) which gets nuked during | |
1842 | # the make distclean. For now punt on the issue of shipping newlib info files | |
1843 | # with newlib net releases and wait for a day when some native target (sun4?) | |
1844 | # supports newlib (if only minimally). | |
7166a308 KR |
1845 | newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib |
1846 | $(MAKE) -f Makefile.in taz TOOL=newlib \ | |
1847 | SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \ | |
6b9e3a78 | 1848 | DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib |
7166a308 | 1849 | |
79337c85 | 1850 | .NOEXPORT: |
05992891 | 1851 | MAKEOVERRIDES= |
79337c85 ILT |
1852 | |
1853 | # start-sanitize-chill | |
1854 | ## This is ugly, but I don't want GNU make to put these variables in | |
1855 | ## the environment. Older makes will see this as a set of targets | |
1856 | ## with no dependencies and no actions. | |
1857 | unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET : | |
1858 | # end-sanitize-chill | |
1859 | ||
eb02fd64 | 1860 | # end of Makefile.in |