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