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