]>
Commit | Line | Data |
---|---|---|
6599da04 JM |
1 | # |
2 | # Makefile for directory with subdirs to build. | |
6e2a4843 | 3 | # Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, |
3f19b439 | 4 | # 1999, 2000, 2001 Free Software Foundation |
6599da04 JM |
5 | # |
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 | |
18 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
19 | # | |
20 | ||
21 | srcdir = . | |
22 | ||
23 | prefix = /usr/local | |
6599da04 | 24 | exec_prefix = $(prefix) |
5d4a5ee6 JL |
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 | |
88101ab9 | 38 | gxx_include_dir=${includedir}/g++ |
5d4a5ee6 | 39 | |
5cb95c7a JL |
40 | tooldir = $(exec_prefix)/$(target_alias) |
41 | build_tooldir = $(exec_prefix)/$(target_alias) | |
42 | ||
6599da04 JM |
43 | program_transform_name = |
44 | ||
6599da04 JM |
45 | man1dir = $(mandir)/man1 |
46 | man2dir = $(mandir)/man2 | |
47 | man3dir = $(mandir)/man3 | |
48 | man4dir = $(mandir)/man4 | |
49 | man5dir = $(mandir)/man5 | |
50 | man6dir = $(mandir)/man6 | |
51 | man7dir = $(mandir)/man7 | |
52 | man8dir = $(mandir)/man8 | |
53 | man9dir = $(mandir)/man9 | |
54 | infodir = $(prefix)/info | |
55 | includedir = $(prefix)/include | |
fe2fa3c4 MH |
56 | # Directory in which the compiler finds executables, libraries, etc. |
57 | libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version) | |
6599da04 JM |
58 | GDB_NLM_DEPS = |
59 | ||
60 | SHELL = /bin/sh | |
61 | ||
62 | # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a | |
d207ebef | 63 | # cygwin host. |
6599da04 JM |
64 | INSTALL_PROGRAM_ARGS = |
65 | ||
66 | INSTALL = $(SHELL) $$s/install-sh -c | |
67 | INSTALL_PROGRAM = $(INSTALL) $(INSTALL_PROGRAM_ARGS) | |
68 | INSTALL_SCRIPT = $(INSTALL) | |
69 | INSTALL_DATA = $(INSTALL) -m 644 | |
70 | ||
71 | INSTALL_DOSREL = install-dosrel-fake | |
72 | ||
73 | AS = as | |
74 | AR = ar | |
75 | AR_FLAGS = rc | |
76 | CC = cc | |
77 | ||
78 | # Special variables passed down in EXTRA_GCC_FLAGS. They are defined | |
79 | # here so that they can be overridden by Makefile fragments. | |
80 | HOST_CC = $(CC_FOR_BUILD) | |
81 | HOST_PREFIX = | |
82 | HOST_PREFIX_1 = loser- | |
83 | ||
84 | # These flag values are normally overridden by the configure script. | |
85 | CFLAGS = -g | |
86 | CXXFLAGS = -g -O2 | |
87 | ||
d207ebef | 88 | LDFLAGS = |
6599da04 | 89 | LIBCFLAGS = $(CFLAGS) |
d920e825 | 90 | CFLAGS_FOR_BUILD = $(CFLAGS) |
6599da04 JM |
91 | CFLAGS_FOR_TARGET = $(CFLAGS) |
92 | LDFLAGS_FOR_TARGET = | |
93 | LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) | |
94 | PICFLAG = | |
95 | PICFLAG_FOR_TARGET = | |
96 | ||
5d4a5ee6 JL |
97 | CHILLFLAGS = $(CFLAGS) |
98 | CHILL_LIB = -lchill | |
6599da04 JM |
99 | CXX = c++ |
100 | ||
101 | # Use -O2 to stress test the compiler. | |
102 | LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates | |
103 | CXXFLAGS_FOR_TARGET = $(CXXFLAGS) | |
104 | LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates | |
105 | ||
6599da04 JM |
106 | DLLTOOL = dlltool |
107 | WINDRES = windres | |
108 | ||
109 | NM = nm | |
110 | ||
111 | LD = ld | |
112 | ||
d207ebef JM |
113 | BZIPPROG = bzip2 |
114 | MD5PROG = md5sum | |
6599da04 JM |
115 | |
116 | # These values are substituted by configure. | |
117 | DEFAULT_YACC = yacc | |
118 | DEFAULT_LEX = lex | |
3a35dcc4 | 119 | DEFAULT_M4 = m4 |
6599da04 JM |
120 | |
121 | BISON = `if [ -f $$r/bison/bison ] ; then \ | |
122 | echo $$r/bison/bison -L $$s/bison/ ; \ | |
123 | else \ | |
124 | echo bison ; \ | |
125 | fi` | |
126 | ||
127 | YACC = `if [ -f $$r/bison/bison ] ; then \ | |
128 | echo $$r/bison/bison -y -L $$s/bison/ ; \ | |
129 | elif [ -f $$r/byacc/byacc ] ; then \ | |
130 | echo $$r/byacc/byacc ; \ | |
131 | else \ | |
132 | echo ${DEFAULT_YACC} ; \ | |
133 | fi` | |
134 | ||
135 | LEX = `if [ -f $$r/flex/flex ] ; \ | |
136 | then echo $$r/flex/flex ; \ | |
137 | else echo ${DEFAULT_LEX} ; fi` | |
138 | ||
139 | M4 = `if [ -f $$r/m4/m4 ] ; \ | |
140 | then echo $$r/m4/m4 ; \ | |
3a35dcc4 | 141 | else echo ${DEFAULT_M4} ; fi` |
6599da04 | 142 | |
53cdb27a HPN |
143 | # For an installed makeinfo, we require it to be from texinfo 4 or |
144 | # higher, else we use the "missing" dummy. | |
6599da04 JM |
145 | MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \ |
146 | then echo $$r/texinfo/makeinfo/makeinfo ; \ | |
53cdb27a HPN |
147 | else if (makeinfo --version \ |
148 | | egrep 'texinfo[^0-9]*([1-3][0-9]|[4-9])') >/dev/null 2>&1; \ | |
149 | then echo makeinfo; else echo $$s/missing makeinfo; fi; fi` | |
6599da04 JM |
150 | |
151 | # This just becomes part of the MAKEINFO definition passed down to | |
152 | # sub-makes. It lets flags be given on the command line while still | |
153 | # using the makeinfo from the object tree. | |
154 | MAKEINFOFLAGS = | |
155 | ||
156 | EXPECT = `if [ -f $$r/expect/expect ] ; \ | |
157 | then echo $$r/expect/expect ; \ | |
158 | else echo expect ; fi` | |
159 | ||
160 | RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \ | |
161 | then echo $$s/dejagnu/runtest ; \ | |
162 | else echo runtest ; fi` | |
163 | ||
164 | ||
165 | # compilers to use to create programs which must be run in the build | |
166 | # environment. | |
167 | CC_FOR_BUILD = $(CC) | |
168 | CXX_FOR_BUILD = $(CXX) | |
169 | ||
170 | SUBDIRS = "this is set via configure, don't edit this" | |
171 | OTHERS = | |
172 | ||
173 | # This is set by the configure script to the list of directories which | |
174 | # should be built using the target tools. | |
4d88a68a | 175 | TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib librx winsup opcodes bsp libstub cygmon libf2c libchill libobjc |
6599da04 JM |
176 | |
177 | # Target libraries are put under this directory: | |
178 | # Changed by configure to $(target_alias) if cross. | |
179 | TARGET_SUBDIR = . | |
180 | ||
181 | # This is set by the configure script to the arguments passed to configure. | |
182 | CONFIG_ARGUMENTS = | |
183 | ||
184 | # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared | |
185 | # was used. | |
186 | SET_LIB_PATH = | |
187 | ||
188 | # This is the name of the environment variable used for the path to | |
189 | # the libraries. This may be changed by configure.in. | |
190 | RPATH_ENVVAR = LD_LIBRARY_PATH | |
191 | ||
ce8e06b1 AO |
192 | # This is the list of directories that may be needed in RPATH_ENVVAR |
193 | # so that programs built for the host machine work. | |
194 | HOST_LIB_PATH = $$r/bfd:$$r/opcodes | |
195 | ||
196 | # This is the list of directories that may be needed in RPATH_ENVVAR | |
197 | # so that prorgams built for the target machine work. | |
4d88a68a | 198 | TARGET_LIB_PATH = $$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs: |
ce8e06b1 | 199 | |
6599da04 | 200 | # configure.in sets SET_LIB_PATH to this if --enable-shared was used. |
ce8e06b1 AO |
201 | # Some platforms don't like blank entries, so we remove duplicate, |
202 | # leading and trailing colons. | |
6599da04 | 203 | REALLY_SET_LIB_PATH = \ |
ce8e06b1 | 204 | $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH):$(TARGET_LIB_PATH):$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); |
6599da04 JM |
205 | |
206 | ALL = all.normal | |
207 | INSTALL_TARGET = installdirs \ | |
96b0f1fc | 208 | install-gcc \ |
6599da04 JM |
209 | $(INSTALL_MODULES) \ |
210 | $(INSTALL_TARGET_MODULES) \ | |
211 | $(INSTALL_X11_MODULES) \ | |
6599da04 JM |
212 | $(INSTALL_DOSREL) |
213 | ||
205cba53 JL |
214 | INSTALL_TARGET_CROSS = installdirs \ |
215 | install-gcc-cross \ | |
216 | $(INSTALL_MODULES) \ | |
217 | $(INSTALL_TARGET_MODULES) \ | |
218 | $(INSTALL_X11_MODULES) \ | |
219 | $(INSTALL_DOSREL) | |
6599da04 | 220 | |
b87487b6 AO |
221 | # Should be substed by configure.in |
222 | FLAGS_FOR_TARGET = | |
223 | CC_FOR_TARGET = | |
224 | CHILL_FOR_TARGET = | |
225 | CXX_FOR_TARGET = | |
a3406c06 | 226 | CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = |
85b99cbe | 227 | GCJ_FOR_TARGET = |
6599da04 | 228 | |
b87487b6 | 229 | # If GCC_FOR_TARGET is not overriden on the command line, then this |
6599da04 JM |
230 | # variable is passed down to the gcc Makefile, where it is used to |
231 | # build libgcc2.a. We define it here so that it can itself be | |
232 | # overridden on the command line. | |
acffa7c4 | 233 | GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET) |
6599da04 JM |
234 | |
235 | AS_FOR_TARGET = ` \ | |
236 | if [ -f $$r/gas/as-new ] ; then \ | |
237 | echo $$r/gas/as-new ; \ | |
e9a8af10 AO |
238 | elif [ -f $$r/gcc/xgcc ]; then \ |
239 | $(CC_FOR_TARGET) -print-prog-name=as ; \ | |
6599da04 | 240 | else \ |
759bfa90 | 241 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ |
6599da04 JM |
242 | echo $(AS); \ |
243 | else \ | |
244 | t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \ | |
245 | fi; \ | |
246 | fi` | |
247 | ||
248 | LD_FOR_TARGET = ` \ | |
249 | if [ -f $$r/ld/ld-new ] ; then \ | |
250 | echo $$r/ld/ld-new ; \ | |
e9a8af10 AO |
251 | elif [ -f $$r/gcc/xgcc ]; then \ |
252 | $(CC_FOR_TARGET) -print-prog-name=ld ; \ | |
6599da04 | 253 | else \ |
759bfa90 | 254 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ |
6599da04 JM |
255 | echo $(LD); \ |
256 | else \ | |
257 | t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \ | |
258 | fi; \ | |
259 | fi` | |
260 | ||
261 | DLLTOOL_FOR_TARGET = ` \ | |
262 | if [ -f $$r/binutils/dlltool ] ; then \ | |
263 | echo $$r/binutils/dlltool ; \ | |
264 | else \ | |
759bfa90 | 265 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ |
6599da04 JM |
266 | echo $(DLLTOOL); \ |
267 | else \ | |
268 | t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \ | |
269 | fi; \ | |
270 | fi` | |
271 | ||
272 | WINDRES_FOR_TARGET = ` \ | |
273 | if [ -f $$r/binutils/windres ] ; then \ | |
274 | echo $$r/binutils/windres ; \ | |
275 | else \ | |
759bfa90 | 276 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ |
6599da04 JM |
277 | echo $(WINDRES); \ |
278 | else \ | |
279 | t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \ | |
280 | fi; \ | |
281 | fi` | |
282 | ||
283 | AR_FOR_TARGET = ` \ | |
284 | if [ -f $$r/binutils/ar ] ; then \ | |
285 | echo $$r/binutils/ar ; \ | |
286 | else \ | |
759bfa90 | 287 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ |
6599da04 JM |
288 | echo $(AR); \ |
289 | else \ | |
290 | t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \ | |
291 | fi; \ | |
292 | fi` | |
293 | ||
294 | RANLIB_FOR_TARGET = ` \ | |
295 | if [ -f $$r/binutils/ranlib ] ; then \ | |
296 | echo $$r/binutils/ranlib ; \ | |
297 | else \ | |
759bfa90 AO |
298 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ |
299 | if [ x'$(RANLIB)' != x ]; then \ | |
6822468a LB |
300 | echo $(RANLIB); \ |
301 | else \ | |
302 | echo ranlib; \ | |
303 | fi; \ | |
6599da04 JM |
304 | else \ |
305 | t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \ | |
306 | fi; \ | |
307 | fi` | |
308 | ||
309 | NM_FOR_TARGET = ` \ | |
310 | if [ -f $$r/binutils/nm-new ] ; then \ | |
311 | echo $$r/binutils/nm-new ; \ | |
e9a8af10 AO |
312 | elif [ -f $$r/gcc/xgcc ]; then \ |
313 | $(CC_FOR_TARGET) -print-prog-name=nm ; \ | |
6599da04 | 314 | else \ |
759bfa90 | 315 | if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ |
6599da04 JM |
316 | echo $(NM); \ |
317 | else \ | |
318 | t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \ | |
319 | fi; \ | |
320 | fi` | |
321 | ||
5d4a5ee6 JL |
322 | # The first rule in the file had better be this one. Don't put any above it. |
323 | # This lives here to allow makefile fragments to contain dependencies. | |
324 | all: all.normal | |
325 | .PHONY: all | |
326 | ||
327 | # These can be overridden by config/mt-*. | |
328 | # The _TARGET_ is because they're specified in mt-foo. | |
329 | # The _HOST_ is because they're programs that run on the host. | |
330 | EXTRA_TARGET_HOST_ALL_MODULES = | |
331 | EXTRA_TARGET_HOST_INSTALL_MODULES = | |
332 | EXTRA_TARGET_HOST_CHECK_MODULES = | |
333 | ||
6599da04 JM |
334 | #### host and target specific makefile fragments come in here. |
335 | ### | |
336 | ||
337 | # Flags to pass down to all sub-makes. | |
338 | # Please keep these in alphabetical order. | |
339 | BASE_FLAGS_TO_PASS = \ | |
340 | "AR_FLAGS=$(AR_FLAGS)" \ | |
341 | "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ | |
342 | "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ | |
343 | "BISON=$(BISON)" \ | |
344 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ | |
345 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ | |
346 | "CFLAGS=$(CFLAGS)" \ | |
347 | "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ | |
5d4a5ee6 JL |
348 | "CHILLFLAGS=$(CHILLFLAGS)" \ |
349 | "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \ | |
350 | "CHILL_LIB=$(CHILL_LIB)" \ | |
85b99cbe | 351 | "GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \ |
6599da04 JM |
352 | "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ |
353 | "CXXFLAGS=$(CXXFLAGS)" \ | |
354 | "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \ | |
355 | "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ | |
356 | "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \ | |
357 | "INSTALL=$(INSTALL)" \ | |
358 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
359 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ | |
360 | "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ | |
361 | "LDFLAGS=$(LDFLAGS)" \ | |
362 | "LEX=$(LEX)" \ | |
363 | "LD_FOR_TARGET=$(LD_FOR_TARGET)" \ | |
364 | "LIBCFLAGS=$(LIBCFLAGS)" \ | |
365 | "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ | |
366 | "LIBCXXFLAGS=$(LIBCXXFLAGS)" \ | |
367 | "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \ | |
368 | "M4=$(M4)" \ | |
369 | "MAKE=$(MAKE)" \ | |
370 | "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ | |
371 | "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ | |
6599da04 | 372 | "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ |
5d4a5ee6 | 373 | "RPATH_ENVVAR=$(RPATH_ENVVAR)" \ |
6599da04 JM |
374 | "SHELL=$(SHELL)" \ |
375 | "EXPECT=$(EXPECT)" \ | |
376 | "RUNTEST=$(RUNTEST)" \ | |
377 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ | |
81241b5e | 378 | "TARGET_SUBDIR=$(TARGET_SUBDIR)" \ |
6599da04 JM |
379 | "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \ |
380 | "YACC=$(YACC)" \ | |
5d4a5ee6 JL |
381 | "bindir=$(bindir)" \ |
382 | "datadir=$(datadir)" \ | |
6599da04 | 383 | "exec_prefix=$(exec_prefix)" \ |
5d4a5ee6 JL |
384 | "includedir=$(includedir)" \ |
385 | "infodir=$(infodir)" \ | |
386 | "libdir=$(libdir)" \ | |
387 | "libexecdir=$(libexecdir)" \ | |
388 | "lispdir=$(lispdir)" \ | |
cc330df9 BK |
389 | "libstdcxx_incdir=$(libstdcxx_incdir)" \ |
390 | "libsubdir=$(libsubdir)" \ | |
5d4a5ee6 JL |
391 | "localstatedir=$(localstatedir)" \ |
392 | "mandir=$(mandir)" \ | |
393 | "oldincludedir=$(oldincludedir)" \ | |
6599da04 | 394 | "prefix=$(prefix)" \ |
5d4a5ee6 JL |
395 | "sbindir=$(sbindir)" \ |
396 | "sharedstatedir=$(sharedstatedir)" \ | |
397 | "sysconfdir=$(sysconfdir)" \ | |
d0a8352c | 398 | "tooldir=$(tooldir)" \ |
5cb95c7a | 399 | "build_tooldir=$(build_tooldir)" \ |
fe2fa3c4 MH |
400 | "gxx_include_dir=$(gxx_include_dir)" \ |
401 | "gcc_version=$(gcc_version)" \ | |
6dd27861 | 402 | "gcc_version_trigger=$(gcc_version_trigger)" \ |
cc330df9 | 403 | "target_alias=$(target_alias)" |
6599da04 | 404 | |
a3406c06 AO |
405 | # For any flags above that may contain shell code that varies from one |
406 | # target library to another. When doing recursive invocations of the | |
407 | # top-level Makefile, we don't want the outer make to evaluate them, | |
408 | # so we pass these variables down unchanged. They must not contain | |
409 | # single nor double quotes. | |
410 | RECURSE_FLAGS = \ | |
411 | CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)' | |
412 | ||
6599da04 JM |
413 | # Flags to pass down to most sub-makes, in which we're building with |
414 | # the host environment. | |
415 | # If any variables are added here, they must be added to do-*, below. | |
416 | EXTRA_HOST_FLAGS = \ | |
417 | 'AR=$(AR)' \ | |
418 | 'AS=$(AS)' \ | |
419 | 'CC=$(CC)' \ | |
420 | 'CXX=$(CXX)' \ | |
421 | 'DLLTOOL=$(DLLTOOL)' \ | |
422 | 'LD=$(LD)' \ | |
423 | 'NM=$(NM)' \ | |
6822468a | 424 | "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \ |
6599da04 JM |
425 | 'WINDRES=$(WINDRES)' |
426 | ||
427 | FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) | |
428 | ||
429 | # Flags that are concerned with the location of the X11 include files | |
430 | # and library files | |
431 | # | |
432 | # NOTE: until the top-level is getting the values via autoconf, it only | |
433 | # causes problems to have this top-level Makefile overriding the autoconf-set | |
434 | # values in child directories. Only variables that don't conflict with | |
435 | # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now. | |
436 | # | |
437 | X11_FLAGS_TO_PASS = \ | |
438 | 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \ | |
439 | 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)' | |
440 | ||
441 | # Flags to pass down to makes which are built with the target environment. | |
442 | # The double $ decreases the length of the command line; the variables | |
443 | # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. | |
444 | # If any variables are added here, they must be added to do-*, below. | |
445 | EXTRA_TARGET_FLAGS = \ | |
446 | 'AR=$$(AR_FOR_TARGET)' \ | |
447 | 'AS=$$(AS_FOR_TARGET)' \ | |
448 | 'CC=$$(CC_FOR_TARGET)' \ | |
449 | 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \ | |
450 | 'CXX=$$(CXX_FOR_TARGET)' \ | |
451 | 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \ | |
452 | 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ | |
453 | 'LD=$$(LD_FOR_TARGET)' \ | |
454 | 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ | |
455 | 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \ | |
456 | 'NM=$$(NM_FOR_TARGET)' \ | |
0c055e34 | 457 | 'RANLIB=$$(RANLIB_FOR_TARGET)' \ |
6599da04 JM |
458 | 'WINDRES=$$(WINDRES_FOR_TARGET)' |
459 | ||
460 | TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) | |
461 | ||
462 | # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it | |
463 | # unfortunately needs the native compiler and the target ar and | |
464 | # ranlib. | |
465 | # If any variables are added here, they must be added to do-*, below. | |
466 | # The HOST_* variables are a special case, which are used for the gcc | |
467 | # cross-building scheme. | |
468 | EXTRA_GCC_FLAGS = \ | |
ecd62820 | 469 | 'AR=$(AR)' \ |
6599da04 JM |
470 | 'AS=$(AS)' \ |
471 | 'CC=$(CC)' \ | |
472 | 'CXX=$(CXX)' \ | |
473 | 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \ | |
474 | 'HOST_CC=$(CC_FOR_BUILD)' \ | |
475 | 'HOST_PREFIX=$(HOST_PREFIX)' \ | |
476 | 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \ | |
477 | 'NM=$(NM)' \ | |
6822468a | 478 | "`echo 'RANLIB=$(RANLIB)' | sed -e s/.*=$$/XFOO=/`" \ |
6599da04 JM |
479 | 'WINDRES=$$(WINDRES_FOR_TARGET)' \ |
480 | "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \ | |
d920e825 | 481 | "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ |
5d4a5ee6 JL |
482 | "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \ |
483 | "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \ | |
484 | "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \ | |
485 | "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \ | |
486 | "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ | |
487 | "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ | |
488 | "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \ | |
489 | "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \ | |
78faa32d | 490 | "`echo 'STAGE1_CFLAGS=$(STAGE1_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \ |
5d4a5ee6 | 491 | "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" |
6599da04 JM |
492 | |
493 | GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) | |
494 | ||
495 | # This is a list of the targets for all of the modules which are compiled | |
496 | # using $(FLAGS_TO_PASS). | |
497 | ALL_MODULES = \ | |
498 | all-apache \ | |
5d4a5ee6 | 499 | all-ash \ |
6599da04 JM |
500 | all-autoconf \ |
501 | all-automake \ | |
502 | all-bash \ | |
503 | all-bfd \ | |
504 | all-binutils \ | |
505 | all-bison \ | |
506 | all-byacc \ | |
5d4a5ee6 | 507 | all-bzip2 \ |
6e2a4843 | 508 | all-cgen \ |
5d4a5ee6 | 509 | all-cvssrc \ |
6599da04 JM |
510 | all-db \ |
511 | all-dejagnu \ | |
512 | all-diff \ | |
513 | all-dosutils \ | |
514 | all-etc \ | |
5db1f7ed | 515 | all-fastjar \ |
6599da04 JM |
516 | all-fileutils \ |
517 | all-findutils \ | |
518 | all-find \ | |
519 | all-flex \ | |
520 | all-gas \ | |
521 | all-gawk \ | |
5d4a5ee6 | 522 | all-gettext \ |
6599da04 JM |
523 | all-gnuserv \ |
524 | all-gprof \ | |
525 | all-grep \ | |
526 | all-grez \ | |
527 | all-gzip \ | |
528 | all-hello \ | |
529 | all-indent \ | |
530 | all-inet \ | |
5d4a5ee6 | 531 | all-intl \ |
6599da04 JM |
532 | all-ispell \ |
533 | all-itcl \ | |
534 | all-ld \ | |
5d4a5ee6 | 535 | all-libgui \ |
6599da04 | 536 | all-libiberty \ |
d207ebef | 537 | all-libtool \ |
6599da04 JM |
538 | all-m4 \ |
539 | all-make \ | |
540 | all-mmalloc \ | |
541 | all-opcodes \ | |
542 | all-patch \ | |
543 | all-perl \ | |
544 | all-prms \ | |
545 | all-rcs \ | |
546 | all-readline \ | |
547 | all-release \ | |
548 | all-recode \ | |
549 | all-sed \ | |
550 | all-send-pr \ | |
551 | all-shellutils \ | |
3f19b439 | 552 | all-sid \ |
6599da04 | 553 | all-sim \ |
5d4a5ee6 | 554 | all-snavigator \ |
6599da04 JM |
555 | all-tar \ |
556 | all-tcl \ | |
d207ebef | 557 | all-tcl8.1 \ |
6599da04 JM |
558 | all-texinfo \ |
559 | all-textutils \ | |
560 | all-tgas \ | |
561 | all-time \ | |
562 | all-uudecode \ | |
5d4a5ee6 | 563 | all-wdiff \ |
99d60508 | 564 | all-zip \ |
3c809ba4 | 565 | all-zlib \ |
5d4a5ee6 | 566 | $(EXTRA_TARGET_HOST_ALL_MODULES) |
6599da04 JM |
567 | |
568 | # This is a list of the check targets for all of the modules which are | |
569 | # compiled using $(FLAGS_TO_PASS). | |
570 | # | |
571 | # The list is in two parts. The first lists those tools which | |
572 | # are tested as part of the host's native tool-chain, and not | |
573 | # tested in a cross configuration. | |
574 | NATIVE_CHECK_MODULES = \ | |
575 | check-bison \ | |
576 | check-byacc \ | |
5db1f7ed | 577 | check-fastjar \ |
99d60508 TT |
578 | check-flex \ |
579 | check-zip | |
6599da04 JM |
580 | |
581 | CROSS_CHECK_MODULES = \ | |
582 | check-apache \ | |
5d4a5ee6 | 583 | check-ash \ |
6599da04 JM |
584 | check-autoconf \ |
585 | check-automake \ | |
586 | check-bash \ | |
587 | check-bfd \ | |
588 | check-binutils \ | |
5d4a5ee6 | 589 | check-bzip2 \ |
6e2a4843 | 590 | check-cgen \ |
5d4a5ee6 | 591 | check-cvssrc \ |
6599da04 JM |
592 | check-db \ |
593 | check-dejagnu \ | |
594 | check-diff \ | |
595 | check-etc \ | |
596 | check-fileutils \ | |
597 | check-findutils \ | |
598 | check-find \ | |
599 | check-gas \ | |
600 | check-gawk \ | |
5d4a5ee6 | 601 | check-gettext \ |
6599da04 JM |
602 | check-gnuserv \ |
603 | check-gprof \ | |
604 | check-grep \ | |
605 | check-gzip \ | |
606 | check-hello \ | |
607 | check-indent \ | |
608 | check-inet \ | |
5d4a5ee6 | 609 | check-intl \ |
6599da04 JM |
610 | check-ispell \ |
611 | check-itcl \ | |
612 | check-ld \ | |
5d4a5ee6 | 613 | check-libgui \ |
6599da04 | 614 | check-libiberty \ |
5d4a5ee6 | 615 | check-libtool \ |
6599da04 JM |
616 | check-m4 \ |
617 | check-make \ | |
618 | check-mmcheckoc \ | |
619 | check-opcodes \ | |
620 | check-patch \ | |
621 | check-perl \ | |
622 | check-prms \ | |
623 | check-rcs \ | |
624 | check-readline \ | |
625 | check-recode \ | |
626 | check-sed \ | |
627 | check-send-pr \ | |
628 | check-shellutils \ | |
1ebe758f | 629 | check-snavigator \ |
3f19b439 | 630 | check-sid \ |
6599da04 JM |
631 | check-sim \ |
632 | check-tar \ | |
633 | check-tcl \ | |
634 | check-texinfo \ | |
635 | check-textutils \ | |
636 | check-tgas \ | |
637 | check-time \ | |
638 | check-uudecode \ | |
5d4a5ee6 JL |
639 | check-wdiff \ |
640 | $(EXTRA_TARGET_HOST_CHECK_MODULES) | |
6599da04 JM |
641 | |
642 | CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) | |
643 | ||
644 | # This is a list of the install targets for all of the modules which are | |
645 | # compiled using $(FLAGS_TO_PASS). | |
646 | # We put install-opcodes before install-binutils because the installed | |
647 | # binutils might be on PATH, and they might need the shared opcodes | |
648 | # library. | |
5d4a5ee6 JL |
649 | # We put install-tcl before install-itcl because itcl wants to run a |
650 | # program on installation which uses the Tcl libraries. | |
6599da04 JM |
651 | INSTALL_MODULES = \ |
652 | install-apache \ | |
5d4a5ee6 | 653 | install-ash \ |
6599da04 JM |
654 | install-autoconf \ |
655 | install-automake \ | |
656 | install-bash \ | |
657 | install-bfd \ | |
5d4a5ee6 | 658 | install-bzip2 \ |
6599da04 JM |
659 | install-opcodes \ |
660 | install-binutils \ | |
661 | install-bison \ | |
662 | install-byacc \ | |
6e2a4843 | 663 | install-cgen \ |
5d4a5ee6 | 664 | install-cvssrc \ |
6599da04 JM |
665 | install-db \ |
666 | install-dejagnu \ | |
667 | install-diff \ | |
668 | install-dosutils \ | |
669 | install-etc \ | |
5db1f7ed | 670 | install-fastjar \ |
6599da04 JM |
671 | install-fileutils \ |
672 | install-findutils \ | |
673 | install-find \ | |
674 | install-flex \ | |
675 | install-gas \ | |
676 | install-gawk \ | |
5d4a5ee6 | 677 | install-gettext \ |
6599da04 JM |
678 | install-gnuserv \ |
679 | install-gprof \ | |
680 | install-grep \ | |
681 | install-grez \ | |
682 | install-gzip \ | |
683 | install-hello \ | |
684 | install-indent \ | |
685 | install-inet \ | |
5d4a5ee6 | 686 | install-intl \ |
6599da04 | 687 | install-ispell \ |
5d4a5ee6 | 688 | install-tcl \ |
d207ebef | 689 | install-tcl8.1 \ |
6599da04 JM |
690 | install-itcl \ |
691 | install-ld \ | |
5d4a5ee6 | 692 | install-libgui \ |
6599da04 | 693 | install-libiberty \ |
5d4a5ee6 | 694 | install-libtool \ |
6599da04 JM |
695 | install-m4 \ |
696 | install-make \ | |
697 | install-mmalloc \ | |
698 | install-patch \ | |
699 | install-perl \ | |
700 | install-prms \ | |
701 | install-rcs \ | |
702 | install-readline \ | |
703 | install-recode \ | |
704 | install-sed \ | |
705 | install-send-pr \ | |
706 | install-shellutils \ | |
3f19b439 | 707 | install-sid \ |
6599da04 | 708 | install-sim \ |
5d4a5ee6 | 709 | install-snavigator \ |
6599da04 | 710 | install-tar \ |
6599da04 JM |
711 | install-textutils \ |
712 | install-tgas \ | |
713 | install-time \ | |
714 | install-uudecode \ | |
5d4a5ee6 | 715 | install-wdiff \ |
99d60508 | 716 | install-zip \ |
5d4a5ee6 | 717 | $(EXTRA_TARGET_HOST_INSTALL_MODULES) |
6599da04 JM |
718 | |
719 | # This is a list of the targets for all of the modules which are compiled | |
720 | # using $(X11_FLAGS_TO_PASS). | |
721 | ALL_X11_MODULES = \ | |
722 | all-emacs \ | |
723 | all-emacs19 \ | |
724 | all-gdb \ | |
725 | all-expect \ | |
726 | all-gash \ | |
727 | all-guile \ | |
728 | all-tclX \ | |
729 | all-tk \ | |
d207ebef | 730 | all-tk8.1 \ |
6599da04 JM |
731 | all-tix |
732 | ||
733 | # This is a list of the check targets for all of the modules which are | |
734 | # compiled using $(X11_FLAGS_TO_PASS). | |
735 | CHECK_X11_MODULES = \ | |
736 | check-emacs \ | |
737 | check-gdb \ | |
738 | check-guile \ | |
739 | check-expect \ | |
740 | check-gash \ | |
741 | check-tclX \ | |
742 | check-tk \ | |
743 | check-tix | |
744 | ||
745 | # This is a list of the install targets for all the modules which are | |
746 | # compiled using $(X11_FLAGS_TO_PASS). | |
747 | INSTALL_X11_MODULES = \ | |
748 | install-emacs \ | |
749 | install-emacs19 \ | |
750 | install-gdb \ | |
751 | install-guile \ | |
752 | install-expect \ | |
753 | install-gash \ | |
754 | install-tclX \ | |
755 | install-tk \ | |
d207ebef | 756 | install-tk8.1 \ |
6599da04 JM |
757 | install-tix |
758 | ||
759 | # This is a list of the targets for all of the modules which are compiled | |
760 | # using $(TARGET_FLAGS_TO_PASS). | |
761 | ALL_TARGET_MODULES = \ | |
17090313 | 762 | all-target-libstdc++-v3 \ |
6599da04 | 763 | all-target-librx \ |
6599da04 | 764 | all-target-newlib \ |
8821a725 | 765 | all-target-libf2c \ |
b54db294 | 766 | all-target-libchill \ |
6fc19d6d | 767 | all-target-libobjc \ |
d207ebef | 768 | all-target-libtermcap \ |
6599da04 JM |
769 | all-target-winsup \ |
770 | all-target-libgloss \ | |
771 | all-target-libiberty \ | |
772 | all-target-gperf \ | |
5d4a5ee6 JL |
773 | all-target-examples \ |
774 | all-target-libstub \ | |
aab0d19d | 775 | all-target-libffi \ |
99d60508 TT |
776 | all-target-libjava \ |
777 | all-target-zlib \ | |
778 | all-target-boehm-gc \ | |
779 | all-target-qthreads \ | |
d207ebef | 780 | all-target-bsp \ |
5d4a5ee6 | 781 | all-target-cygmon |
6599da04 JM |
782 | |
783 | # This is a list of the configure targets for all of the modules which | |
784 | # are compiled using the target tools. | |
785 | CONFIGURE_TARGET_MODULES = \ | |
17090313 | 786 | configure-target-libstdc++-v3 \ |
6599da04 | 787 | configure-target-librx \ |
6599da04 | 788 | configure-target-newlib \ |
8821a725 | 789 | configure-target-libf2c \ |
b54db294 | 790 | configure-target-libchill \ |
6fc19d6d | 791 | configure-target-libobjc \ |
d207ebef | 792 | configure-target-libtermcap \ |
6599da04 JM |
793 | configure-target-winsup \ |
794 | configure-target-libgloss \ | |
795 | configure-target-libiberty \ | |
796 | configure-target-gperf \ | |
5d4a5ee6 JL |
797 | configure-target-examples \ |
798 | configure-target-libstub \ | |
aab0d19d | 799 | configure-target-libffi \ |
99d60508 TT |
800 | configure-target-libjava \ |
801 | configure-target-zlib \ | |
802 | configure-target-boehm-gc \ | |
803 | configure-target-qthreads \ | |
d207ebef | 804 | configure-target-bsp \ |
5d4a5ee6 | 805 | configure-target-cygmon |
6599da04 JM |
806 | |
807 | # This is a list of the check targets for all of the modules which are | |
808 | # compiled using $(TARGET_FLAGS_TO_PASS). | |
809 | CHECK_TARGET_MODULES = \ | |
17090313 | 810 | check-target-libstdc++-v3 \ |
6599da04 | 811 | check-target-newlib \ |
8821a725 | 812 | check-target-libf2c \ |
b54db294 | 813 | check-target-libchill \ |
6fc19d6d | 814 | check-target-libobjc \ |
6599da04 JM |
815 | check-target-winsup \ |
816 | check-target-libiberty \ | |
aab0d19d | 817 | check-target-libffi \ |
99d60508 TT |
818 | check-target-libjava \ |
819 | check-target-zlib \ | |
820 | check-target-boehm-gc \ | |
821 | check-target-qthreads \ | |
6599da04 JM |
822 | check-target-gperf |
823 | ||
824 | # This is a list of the install targets for all of the modules which are | |
825 | # compiled using $(TARGET_FLAGS_TO_PASS). | |
826 | INSTALL_TARGET_MODULES = \ | |
17090313 | 827 | install-target-libstdc++-v3 \ |
6599da04 | 828 | install-target-newlib \ |
8821a725 | 829 | install-target-libf2c \ |
b54db294 | 830 | install-target-libchill \ |
6fc19d6d | 831 | install-target-libobjc \ |
d207ebef | 832 | install-target-libtermcap \ |
6599da04 JM |
833 | install-target-winsup \ |
834 | install-target-libgloss \ | |
835 | install-target-libiberty \ | |
99d60508 TT |
836 | install-target-bsp \ |
837 | install-target-libjava \ | |
838 | install-target-zlib \ | |
839 | install-target-boehm-gc \ | |
840 | install-target-qthreads \ | |
6599da04 JM |
841 | install-target-gperf |
842 | ||
843 | # This is a list of the targets for which we can do a clean-{target}. | |
844 | CLEAN_MODULES = \ | |
845 | clean-apache \ | |
5d4a5ee6 | 846 | clean-ash \ |
6599da04 JM |
847 | clean-autoconf \ |
848 | clean-automake \ | |
849 | clean-bash \ | |
850 | clean-bfd \ | |
851 | clean-binutils \ | |
852 | clean-bison \ | |
853 | clean-byacc \ | |
5d4a5ee6 | 854 | clean-bzip2 \ |
6e2a4843 | 855 | clean-cgen \ |
5d4a5ee6 | 856 | clean-cvssrc \ |
6599da04 JM |
857 | clean-db \ |
858 | clean-dejagnu \ | |
859 | clean-diff \ | |
860 | clean-dosutils \ | |
861 | clean-etc \ | |
5db1f7ed | 862 | clean-fastjar \ |
6599da04 JM |
863 | clean-fileutils \ |
864 | clean-findutils \ | |
865 | clean-find \ | |
866 | clean-flex \ | |
867 | clean-gas \ | |
868 | clean-gawk \ | |
5d4a5ee6 | 869 | clean-gettext \ |
6599da04 JM |
870 | clean-gnuserv \ |
871 | clean-gprof \ | |
872 | clean-grep \ | |
873 | clean-grez \ | |
874 | clean-gzip \ | |
875 | clean-hello \ | |
876 | clean-indent \ | |
877 | clean-inet \ | |
5d4a5ee6 | 878 | clean-intl \ |
6599da04 JM |
879 | clean-ispell \ |
880 | clean-itcl \ | |
881 | clean-ld \ | |
5d4a5ee6 | 882 | clean-libgui \ |
6599da04 | 883 | clean-libiberty \ |
5d4a5ee6 | 884 | clean-libtool \ |
6599da04 JM |
885 | clean-m4 \ |
886 | clean-make \ | |
887 | clean-mmalloc \ | |
888 | clean-opcodes \ | |
889 | clean-patch \ | |
890 | clean-perl \ | |
891 | clean-prms \ | |
892 | clean-rcs \ | |
893 | clean-readline \ | |
894 | clean-release \ | |
895 | clean-recode \ | |
896 | clean-sed \ | |
897 | clean-send-pr \ | |
898 | clean-shellutils \ | |
3f19b439 | 899 | clean-sid \ |
6599da04 | 900 | clean-sim \ |
5d4a5ee6 | 901 | clean-snavigator \ |
6599da04 JM |
902 | clean-tar \ |
903 | clean-tcl \ | |
904 | clean-texinfo \ | |
905 | clean-textutils \ | |
906 | clean-tgas \ | |
907 | clean-time \ | |
908 | clean-uudecode \ | |
99d60508 | 909 | clean-wdiff \ |
3c809ba4 AG |
910 | clean-zip \ |
911 | clean-zlib | |
99d60508 | 912 | |
6599da04 JM |
913 | # All of the target modules that can be cleaned |
914 | CLEAN_TARGET_MODULES = \ | |
17090313 | 915 | clean-target-libstdc++-v3 \ |
6599da04 | 916 | clean-target-librx \ |
6599da04 | 917 | clean-target-newlib \ |
8821a725 | 918 | clean-target-libf2c \ |
b54db294 | 919 | clean-target-libchill \ |
6fc19d6d | 920 | clean-target-libobjc \ |
6599da04 JM |
921 | clean-target-winsup \ |
922 | clean-target-libgloss \ | |
923 | clean-target-libiberty \ | |
924 | clean-target-gperf \ | |
5d4a5ee6 JL |
925 | clean-target-examples \ |
926 | clean-target-libstub \ | |
aab0d19d | 927 | clean-target-libffi \ |
99d60508 TT |
928 | clean-target-libjava \ |
929 | clean-target-zlib \ | |
930 | clean-target-boehm-gc \ | |
931 | clean-target-qthreads \ | |
d207ebef | 932 | clean-target-bsp \ |
5d4a5ee6 | 933 | clean-target-cygmon |
6599da04 JM |
934 | |
935 | # All of the x11 modules that can be cleaned | |
936 | CLEAN_X11_MODULES = \ | |
937 | clean-emacs \ | |
938 | clean-emacs19 \ | |
939 | clean-gdb \ | |
940 | clean-expect \ | |
941 | clean-gash \ | |
942 | clean-guile \ | |
943 | clean-tclX \ | |
944 | clean-tk \ | |
945 | clean-tix | |
946 | ||
6599da04 JM |
947 | # The target built for a native build. |
948 | .PHONY: all.normal | |
949 | all.normal: \ | |
950 | $(ALL_MODULES) \ | |
951 | $(ALL_X11_MODULES) \ | |
952 | $(ALL_TARGET_MODULES) \ | |
953 | all-gcc | |
954 | ||
955 | # Do a target for all the subdirectories. A ``make do-X'' will do a | |
956 | # ``make X'' in all subdirectories (because, in general, there is a | |
957 | # dependency (below) of X upon do-X, a ``make X'' will also do this, | |
958 | # but it may do additional work as well). | |
959 | # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once, | |
960 | # because it is so large that it can easily overflow the command line | |
961 | # length limit on some systems. | |
962 | DO_X = \ | |
963 | do-clean \ | |
964 | do-distclean \ | |
965 | do-dvi \ | |
966 | do-info \ | |
967 | do-install-info \ | |
968 | do-installcheck \ | |
969 | do-mostlyclean \ | |
970 | do-maintainer-clean \ | |
971 | do-TAGS | |
972 | .PHONY: $(DO_X) | |
973 | $(DO_X): | |
974 | @target=`echo $@ | sed -e 's/^do-//'`; \ | |
975 | r=`pwd`; export r; \ | |
976 | s=`cd $(srcdir); pwd`; export s; \ | |
977 | $(SET_LIB_PATH) \ | |
978 | for i in $(SUBDIRS) -dummy-; do \ | |
979 | if [ -f ./$$i/Makefile ]; then \ | |
980 | case $$i in \ | |
981 | gcc) \ | |
982 | for flag in $(EXTRA_GCC_FLAGS); do \ | |
759bfa90 | 983 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ |
6599da04 JM |
984 | done; \ |
985 | ;; \ | |
986 | *) \ | |
987 | for flag in $(EXTRA_HOST_FLAGS); do \ | |
759bfa90 | 988 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ |
6599da04 JM |
989 | done; \ |
990 | ;; \ | |
991 | esac ; \ | |
6599da04 JM |
992 | if (cd ./$$i; \ |
993 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ | |
994 | "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ | |
e9f4fa71 | 995 | "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ |
6599da04 JM |
996 | "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ |
997 | $${target}); \ | |
998 | then true; else exit 1; fi; \ | |
999 | else true; fi; \ | |
1000 | done | |
1001 | @target=`echo $@ | sed -e 's/^do-//'`; \ | |
1002 | r=`pwd`; export r; \ | |
1003 | s=`cd $(srcdir); pwd`; export s; \ | |
1004 | $(SET_LIB_PATH) \ | |
1005 | for i in $(TARGET_CONFIGDIRS) -dummy-; do \ | |
1006 | if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \ | |
1007 | for flag in $(EXTRA_TARGET_FLAGS); do \ | |
759bfa90 | 1008 | eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ |
6599da04 | 1009 | done; \ |
6599da04 JM |
1010 | if (cd $(TARGET_SUBDIR)/$$i; \ |
1011 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ | |
1012 | "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ | |
7238de5c | 1013 | "`echo \"RANLIB=$${RANLIB}\" | sed -e 's/.*=$$/XFOO=/'`" \ |
6599da04 JM |
1014 | "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ |
1015 | $${target}); \ | |
1016 | then true; else exit 1; fi; \ | |
1017 | else true; fi; \ | |
1018 | done | |
1019 | ||
1020 | # Here are the targets which correspond to the do-X targets. | |
1021 | ||
1022 | .PHONY: info installcheck dvi install-info | |
1023 | .PHONY: clean distclean mostlyclean maintainer-clean realclean | |
1024 | .PHONY: local-clean local-distclean local-maintainer-clean | |
1025 | info: do-info | |
1026 | installcheck: do-installcheck | |
1027 | dvi: do-dvi | |
1028 | ||
1029 | # Make sure makeinfo is built before we do a `make info'. | |
1030 | do-info: all-texinfo | |
1031 | ||
1032 | install-info: do-install-info dir.info | |
1033 | s=`cd $(srcdir); pwd`; export s; \ | |
1034 | if [ -f dir.info ] ; then \ | |
1035 | $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \ | |
1036 | else true ; fi | |
1037 | ||
1038 | local-clean: | |
c4137c50 | 1039 | -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E *.log |
6599da04 JM |
1040 | |
1041 | local-distclean: | |
f401679e | 1042 | -rm -f Makefile config.status config.cache mh-frag mt-frag |
6599da04 JM |
1043 | -if [ "$(TARGET_SUBDIR)" != "." ]; then \ |
1044 | rm -rf $(TARGET_SUBDIR); \ | |
1045 | else true; fi | |
5a2eb52b MS |
1046 | -rm -f texinfo/po/Makefile texinfo/po/Makefile.in texinfo/info/Makefile |
1047 | -rm -f texinfo/doc/Makefile texinfo/po/POTFILES | |
5e59997c MS |
1048 | -rmdir texinfo/doc texinfo/info texinfo/intl texinfo/lib 2>/dev/null |
1049 | -rmdir texinfo/makeinfo texinfo/po texinfo/util 2>/dev/null | |
e2f601da | 1050 | -rmdir fastjar gcc libiberty texinfo zlib 2>/dev/null |
6599da04 JM |
1051 | |
1052 | local-maintainer-clean: | |
1053 | @echo "This command is intended for maintainers to use;" | |
1054 | @echo "it deletes files that may require special tools to rebuild." | |
1055 | ||
1056 | clean: do-clean local-clean | |
1057 | mostlyclean: do-mostlyclean local-clean | |
1058 | distclean: do-distclean local-clean local-distclean | |
1059 | maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean | |
1060 | maintainer-clean: local-distclean | |
1061 | realclean: maintainer-clean | |
1062 | ||
1063 | # This rule is used to clean specific modules. | |
1064 | .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc | |
1065 | $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc: | |
1066 | @dir=`echo $@ | sed -e 's/clean-//'`; \ | |
1067 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1068 | r=`pwd`; export r; \ | |
1069 | s=`cd $(srcdir); pwd`; export s; \ | |
1070 | $(SET_LIB_PATH) \ | |
1071 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \ | |
1072 | else \ | |
1073 | true; \ | |
1074 | fi | |
1075 | ||
1076 | .PHONY: $(CLEAN_TARGET_MODULES) | |
1077 | $(CLEAN_TARGET_MODULES): | |
1078 | @dir=`echo $@ | sed -e 's/clean-target-//'`; \ | |
1079 | rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ | |
1080 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
1081 | r=`pwd`; export r; \ | |
1082 | s=`cd $(srcdir); pwd`; export s; \ | |
1083 | $(SET_LIB_PATH) \ | |
1084 | (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \ | |
1085 | else \ | |
1086 | true; \ | |
1087 | fi | |
1088 | ||
1670d1ea AO |
1089 | clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc |
1090 | clean-target-libgcc: | |
1091 | test ! -d gcc/libgcc || \ | |
1092 | (cd gcc/libgcc && find . -type d -print) | \ | |
1093 | while read d; do rm -f gcc/$$d/libgcc.a || : ; done | |
1094 | -rm -rf gcc/libgcc | |
6599da04 JM |
1095 | |
1096 | # Check target. | |
1097 | ||
1098 | .PHONY: check | |
1099 | check: $(CHECK_MODULES) \ | |
1100 | $(CHECK_TARGET_MODULES) \ | |
1101 | $(CHECK_X11_MODULES) \ | |
1102 | check-gcc | |
1103 | ||
c4137c50 AO |
1104 | # Automated reporting of test results. |
1105 | ||
1106 | warning.log: build.log | |
1107 | $(srcdir)/contrib/warn_summary build.log > $@ | |
1108 | ||
1109 | mail-report.log: | |
1110 | if test x'$(BOOT_CFLAGS)' != x''; then \ | |
1111 | BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ | |
1112 | fi; \ | |
1113 | $(srcdir)/contrib/test_summary -t >$@ | |
1114 | chmod +x $@ | |
1115 | echo If you really want to send e-mail, run ./$@ now | |
1116 | ||
1117 | mail-report-with-warnings.log: warning.log | |
1118 | if test x'$(BOOT_CFLAGS)' != x''; then \ | |
1119 | BOOT_CFLAGS='$(BOOT_CFLAGS)'; export BOOT_CFLAGS; \ | |
1120 | fi; \ | |
1121 | $(srcdir)/contrib/test_summary -t -i warning.log >$@ | |
1122 | chmod +x $@ | |
1123 | echo If you really want to send e-mail, run ./$@ now | |
1124 | ||
6599da04 JM |
1125 | # Installation targets. |
1126 | ||
205cba53 | 1127 | .PHONY: install install-cross uninstall source-vault binary-vault vault-install |
6599da04 | 1128 | install: $(INSTALL_TARGET) |
205cba53 | 1129 | install-cross: $(INSTALL_TARGET_CROSS) |
6599da04 JM |
1130 | |
1131 | uninstall: | |
1132 | @echo "the uninstall target is not supported in this tree" | |
1133 | ||
1134 | source-vault: | |
1135 | $(MAKE) -f ./release/Build-A-Release \ | |
1136 | host=$(host_alias) source-vault | |
1137 | ||
1138 | binary-vault: | |
1139 | $(MAKE) -f ./release/Build-A-Release \ | |
1140 | host=$(host_alias) target=$(target_alias) | |
1141 | ||
1142 | vault-install: | |
1143 | @if [ -f ./release/vault-install ] ; then \ | |
1144 | ./release/vault-install $(host_alias) $(target_alias) ; \ | |
1145 | else \ | |
1146 | true ; \ | |
1147 | fi | |
1148 | ||
1149 | .PHONY: install.all | |
1150 | install.all: install-no-fixedincludes | |
1151 | @if [ -f ./gcc/Makefile ] ; then \ | |
1152 | r=`pwd` ; export r ; \ | |
1153 | $(SET_LIB_PATH) \ | |
1154 | (cd ./gcc; \ | |
1155 | $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ | |
1156 | else \ | |
1157 | true ; \ | |
1158 | fi | |
1159 | ||
1160 | # inet-install is used because the I*Net wants DejaGNU installed but | |
1161 | # not built. Similarly, gzip is built but not installed. | |
1162 | inet-install: | |
1163 | $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install | |
1164 | ||
1165 | # install-no-fixedincludes is used because Cygnus can not distribute | |
1166 | # the fixed header files. | |
1167 | .PHONY: install-no-fixedincludes | |
1168 | install-no-fixedincludes: \ | |
1169 | installdirs \ | |
1170 | $(INSTALL_MODULES) \ | |
1171 | $(INSTALL_TARGET_MODULES) \ | |
1172 | $(INSTALL_X11_MODULES) \ | |
1173 | gcc-no-fixedincludes | |
1174 | ||
1175 | # Install the gcc headers files, but not the fixed include files, | |
1176 | # which Cygnus is not allowed to distribute. This rule is very | |
1177 | # dependent on the workings of the gcc Makefile.in. | |
1178 | .PHONY: gcc-no-fixedincludes | |
1179 | gcc-no-fixedincludes: | |
1180 | @if [ -f ./gcc/Makefile ]; then \ | |
1181 | rm -rf gcc/tmp-include; \ | |
1182 | mv gcc/include gcc/tmp-include 2>/dev/null; \ | |
1183 | mkdir gcc/include; \ | |
1184 | cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ | |
1185 | touch gcc/stmp-fixinc gcc/include/fixed; \ | |
1186 | rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ | |
1187 | r=`pwd`; export r; \ | |
1188 | s=`cd $(srcdir); pwd` ; export s; \ | |
1189 | $(SET_LIB_PATH) \ | |
1190 | (cd ./gcc; \ | |
1191 | $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ | |
1192 | rm -rf gcc/include; \ | |
1193 | mv gcc/tmp-include gcc/include 2>/dev/null; \ | |
1194 | else true; fi | |
1195 | ||
1196 | # This rule is used to build the modules which use FLAGS_TO_PASS. To | |
1197 | # build a target all-X means to cd to X and make all. | |
1198 | # | |
1199 | # all-gui, and all-libproc are handled specially because | |
1200 | # they are still experimental, and if they fail to build, that | |
1201 | # shouldn't stop "make all". | |
1202 | .PHONY: $(ALL_MODULES) all-gui all-libproc | |
1203 | $(ALL_MODULES) all-gui all-libproc: | |
1204 | @dir=`echo $@ | sed -e 's/all-//'`; \ | |
1205 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1206 | r=`pwd`; export r; \ | |
1207 | s=`cd $(srcdir); pwd`; export s; \ | |
1208 | $(SET_LIB_PATH) \ | |
1209 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ | |
1210 | else \ | |
1211 | true; \ | |
1212 | fi | |
1213 | ||
1214 | # These rules are used to check the modules which use FLAGS_TO_PASS. | |
1215 | # To build a target check-X means to cd to X and make check. Some | |
1216 | # modules are only tested in a native toolchain. | |
1217 | ||
1218 | .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) | |
1219 | $(NATIVE_CHECK_MODULES): | |
759bfa90 | 1220 | @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \ |
6599da04 JM |
1221 | dir=`echo $@ | sed -e 's/check-//'`; \ |
1222 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1223 | r=`pwd`; export r; \ | |
1224 | s=`cd $(srcdir); pwd`; export s; \ | |
1225 | $(SET_LIB_PATH) \ | |
1226 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ | |
1227 | else \ | |
1228 | true; \ | |
1229 | fi; \ | |
1230 | fi | |
1231 | ||
1232 | $(CROSS_CHECK_MODULES): | |
1233 | @dir=`echo $@ | sed -e 's/check-//'`; \ | |
1234 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1235 | r=`pwd`; export r; \ | |
1236 | s=`cd $(srcdir); pwd`; export s; \ | |
1237 | $(SET_LIB_PATH) \ | |
1238 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ | |
1239 | else \ | |
1240 | true; \ | |
1241 | fi | |
1242 | ||
1243 | # This rule is used to install the modules which use FLAGS_TO_PASS. | |
1244 | # To build a target install-X means to cd to X and make install. | |
1245 | .PHONY: $(INSTALL_MODULES) | |
1246 | $(INSTALL_MODULES): installdirs | |
1247 | @dir=`echo $@ | sed -e 's/install-//'`; \ | |
1248 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1249 | r=`pwd`; export r; \ | |
1250 | s=`cd $(srcdir); pwd`; export s; \ | |
1251 | $(SET_LIB_PATH) \ | |
1252 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ | |
1253 | else \ | |
1254 | true; \ | |
1255 | fi | |
1256 | ||
1257 | # This rule is used to configure the modules which are built with the | |
1258 | # target tools. | |
1259 | .PHONY: $(CONFIGURE_TARGET_MODULES) | |
1260 | $(CONFIGURE_TARGET_MODULES): | |
1261 | @dir=`echo $@ | sed -e 's/configure-target-//'`; \ | |
1262 | if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \ | |
1263 | r=`pwd`; export r; \ | |
1264 | $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \ | |
1265 | if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \ | |
1266 | if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \ | |
1267 | if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \ | |
1268 | rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ | |
1269 | else \ | |
1270 | echo "Multilibs changed for $${dir}, reconfiguring"; \ | |
1271 | rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \ | |
1272 | mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ | |
1273 | fi; \ | |
1274 | else \ | |
1275 | mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ | |
1276 | fi; \ | |
1277 | fi; \ | |
1278 | fi; exit 0 # break command into two pieces | |
1279 | @dir=`echo $@ | sed -e 's/configure-target-//'`; \ | |
1280 | if [ ! -d $(TARGET_SUBDIR) ]; then \ | |
1281 | true; \ | |
1282 | elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
1283 | true; \ | |
1284 | elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \ | |
1285 | if [ -d $(srcdir)/$${dir} ]; then \ | |
1286 | [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\ | |
1287 | r=`pwd`; export r; \ | |
1288 | s=`cd $(srcdir); pwd`; export s; \ | |
1289 | $(SET_LIB_PATH) \ | |
1290 | AR="$(AR_FOR_TARGET)"; export AR; \ | |
1291 | AS="$(AS_FOR_TARGET)"; export AS; \ | |
1292 | CC="$(CC_FOR_TARGET)"; export CC; \ | |
1293 | CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \ | |
1294 | CXX="$(CXX_FOR_TARGET)"; export CXX; \ | |
1295 | CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ | |
85b99cbe | 1296 | GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \ |
6599da04 JM |
1297 | DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ |
1298 | LD="$(LD_FOR_TARGET)"; export LD; \ | |
1299 | LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ | |
1300 | NM="$(NM_FOR_TARGET)"; export NM; \ | |
1301 | RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ | |
1302 | WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \ | |
1303 | echo Configuring in $(TARGET_SUBDIR)/$${dir}; \ | |
6e2d9a7a | 1304 | cd "$(TARGET_SUBDIR)/$${dir}" || exit 1; \ |
6599da04 | 1305 | case $(srcdir) in \ |
fc26516b | 1306 | /* | [A-Za-z]:[\\/]*) \ |
6599da04 JM |
1307 | topdir=$(srcdir) ;; \ |
1308 | *) \ | |
1309 | case "$(TARGET_SUBDIR)" in \ | |
1310 | .) topdir="../$(srcdir)" ;; \ | |
1311 | *) topdir="../../$(srcdir)" ;; \ | |
1312 | esac ;; \ | |
1313 | esac; \ | |
1314 | if [ "$(srcdir)" = "." ] ; then \ | |
1315 | if [ "$(TARGET_SUBDIR)" != "." ] ; then \ | |
1316 | if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \ | |
1317 | if [ -f Makefile ]; then \ | |
1318 | if $(MAKE) distclean; then \ | |
1319 | true; \ | |
1320 | else \ | |
1321 | exit 1; \ | |
1322 | fi; \ | |
1323 | else \ | |
1324 | true; \ | |
1325 | fi; \ | |
1326 | else \ | |
1327 | exit 1; \ | |
1328 | fi; \ | |
1329 | else \ | |
1330 | true; \ | |
1331 | fi; \ | |
1332 | srcdiroption="--srcdir=."; \ | |
1333 | libsrcdir="."; \ | |
1334 | else \ | |
1335 | srcdiroption="--srcdir=$${topdir}/$${dir}"; \ | |
1336 | libsrcdir="$$s/$${dir}"; \ | |
1337 | fi; \ | |
1338 | if [ -f $${libsrcdir}/configure ] ; then \ | |
71205e0b | 1339 | rm -f no-such-file skip-this-dir; \ |
601c6475 | 1340 | CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ |
6599da04 JM |
1341 | $(CONFIG_ARGUMENTS) $${srcdiroption} \ |
1342 | --with-target-subdir="$(TARGET_SUBDIR)"; \ | |
1343 | else \ | |
71205e0b | 1344 | rm -f no-such-file skip-this-dir; \ |
601c6475 | 1345 | CONFIG_SITE=no-such-file $(SHELL) $$s/configure \ |
6599da04 JM |
1346 | $(CONFIG_ARGUMENTS) $${srcdiroption} \ |
1347 | --with-target-subdir="$(TARGET_SUBDIR)"; \ | |
6e2d9a7a | 1348 | fi || exit 1; \ |
71205e0b MH |
1349 | if [ -f skip-this-dir ] ; then \ |
1350 | sh skip-this-dir; \ | |
1351 | rm -f skip-this-dir; \ | |
1352 | cd ..; rmdir $${dir} || true; \ | |
1353 | else \ | |
1354 | true; \ | |
1355 | fi; \ | |
6599da04 JM |
1356 | else \ |
1357 | true; \ | |
1358 | fi; \ | |
1359 | else \ | |
1360 | true; \ | |
1361 | fi | |
1362 | ||
1363 | # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS. | |
1364 | # To build a target all-X means to cd to X and make all. | |
1365 | .PHONY: $(ALL_TARGET_MODULES) | |
1366 | $(ALL_TARGET_MODULES): | |
1367 | @dir=`echo $@ | sed -e 's/all-target-//'`; \ | |
1368 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
1369 | r=`pwd`; export r; \ | |
1370 | s=`cd $(srcdir); pwd`; export s; \ | |
1371 | $(SET_LIB_PATH) \ | |
a3406c06 AO |
1372 | (cd $(TARGET_SUBDIR)/$${dir}; \ |
1373 | $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ | |
6599da04 JM |
1374 | else \ |
1375 | true; \ | |
1376 | fi | |
1377 | ||
1378 | # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS. | |
1379 | # To build a target install-X means to cd to X and make install. | |
1380 | .PHONY: $(CHECK_TARGET_MODULES) | |
1381 | $(CHECK_TARGET_MODULES): | |
1382 | @dir=`echo $@ | sed -e 's/check-target-//'`; \ | |
1383 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
1384 | r=`pwd`; export r; \ | |
1385 | s=`cd $(srcdir); pwd`; export s; \ | |
1386 | $(SET_LIB_PATH) \ | |
a3406c06 AO |
1387 | (cd $(TARGET_SUBDIR)/$${dir}; \ |
1388 | $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\ | |
6599da04 JM |
1389 | else \ |
1390 | true; \ | |
1391 | fi | |
1392 | ||
1393 | # This rule is used to install the modules which use | |
1394 | # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X | |
1395 | # and make install. | |
1396 | .PHONY: $(INSTALL_TARGET_MODULES) | |
1397 | $(INSTALL_TARGET_MODULES): installdirs | |
1398 | @dir=`echo $@ | sed -e 's/install-target-//'`; \ | |
1399 | if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ | |
1400 | r=`pwd`; export r; \ | |
1401 | s=`cd $(srcdir); pwd`; export s; \ | |
1402 | $(SET_LIB_PATH) \ | |
1403 | (cd $(TARGET_SUBDIR)/$${dir}; \ | |
1404 | $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \ | |
1405 | else \ | |
1406 | true; \ | |
1407 | fi | |
1408 | ||
1409 | # This rule is used to build the modules which use X11_FLAGS_TO_PASS. | |
1410 | # To build a target all-X means to cd to X and make all. | |
1411 | .PHONY: $(ALL_X11_MODULES) | |
1412 | $(ALL_X11_MODULES): | |
1413 | @dir=`echo $@ | sed -e 's/all-//'`; \ | |
1414 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1415 | r=`pwd`; export r; \ | |
1416 | s=`cd $(srcdir); pwd`; export s; \ | |
1417 | $(SET_LIB_PATH) \ | |
1418 | (cd $${dir}; \ | |
1419 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \ | |
1420 | else \ | |
1421 | true; \ | |
1422 | fi | |
1423 | ||
1424 | # This rule is used to check the modules which use X11_FLAGS_TO_PASS. | |
1425 | # To build a target check-X means to cd to X and make all. | |
1426 | .PHONY: $(CHECK_X11_MODULES) | |
1427 | $(CHECK_X11_MODULES): | |
1428 | @dir=`echo $@ | sed -e 's/check-//'`; \ | |
1429 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1430 | r=`pwd`; export r; \ | |
1431 | s=`cd $(srcdir); pwd`; export s; \ | |
1432 | $(SET_LIB_PATH) \ | |
1433 | (cd $${dir}; \ | |
1434 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \ | |
1435 | else \ | |
1436 | true; \ | |
1437 | fi | |
1438 | ||
1439 | # This rule is used to install the modules which use X11_FLAGS_TO_PASS. | |
1440 | # To build a target install-X means to cd to X and make install. | |
1441 | .PHONY: $(INSTALL_X11_MODULES) | |
1442 | $(INSTALL_X11_MODULES): installdirs | |
1443 | @dir=`echo $@ | sed -e 's/install-//'`; \ | |
1444 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1445 | r=`pwd`; export r; \ | |
1446 | s=`cd $(srcdir); pwd`; export s; \ | |
1447 | $(SET_LIB_PATH) \ | |
1448 | (cd $${dir}; \ | |
1449 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \ | |
1450 | else \ | |
1451 | true; \ | |
1452 | fi | |
1453 | ||
1454 | # gcc is the only module which uses GCC_FLAGS_TO_PASS. | |
1455 | .PHONY: all-gcc | |
1456 | all-gcc: | |
1457 | @if [ -f ./gcc/Makefile ] ; then \ | |
1458 | r=`pwd`; export r; \ | |
1459 | s=`cd $(srcdir); pwd`; export s; \ | |
1460 | $(SET_LIB_PATH) \ | |
1461 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ | |
1462 | else \ | |
1463 | true; \ | |
1464 | fi | |
1465 | ||
ec20b1b9 JL |
1466 | # Building GCC uses some tools for rebuilding "source" files |
1467 | # like texinfo, bison/byacc, etc. So we must depend on those. | |
1468 | # | |
1469 | # While building GCC, it may be necessary to run various target | |
1470 | # programs like the assembler, linker, etc. So we depend on | |
1471 | # those too. | |
1472 | # | |
1473 | # In theory, on an SMP all those dependencies can be resolved | |
1474 | # in parallel. | |
1475 | # | |
f0983958 | 1476 | .PHONY: bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean |
4d73d07a | 1477 | bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean: all-bootstrap |
ec20b1b9 JL |
1478 | @r=`pwd`; export r; \ |
1479 | s=`cd $(srcdir); pwd`; export s; \ | |
1480 | $(SET_LIB_PATH) \ | |
339c9b00 | 1481 | echo "Bootstrapping the compiler"; \ |
3a4fee66 | 1482 | cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@ |
ec20b1b9 JL |
1483 | @r=`pwd`; export r; \ |
1484 | s=`cd $(srcdir); pwd`; export s; \ | |
cc71c0ca | 1485 | case "$@" in \ |
f0983958 AO |
1486 | *bootstrap4-lean ) \ |
1487 | msg="Comparing stage3 and stage4 of the compiler"; \ | |
1488 | compare=compare3-lean ;; \ | |
cc71c0ca MH |
1489 | *bootstrap4 ) msg="Comparing stage3 and stage4 of the compiler"; \ |
1490 | compare=compare3 ;; \ | |
1491 | *-lean ) msg="Comparing stage2 and stage3 of the compiler"; \ | |
1492 | compare=compare-lean ;; \ | |
1493 | * ) msg="Comparing stage2 and stage3 of the compiler"; \ | |
1494 | compare=compare ;; \ | |
1495 | esac; \ | |
ec20b1b9 | 1496 | $(SET_LIB_PATH) \ |
cc71c0ca | 1497 | echo "$$msg"; \ |
3a4fee66 | 1498 | cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare |
f6b58262 JW |
1499 | @r=`pwd`; export r; \ |
1500 | s=`cd $(srcdir); pwd` ; export s; \ | |
1501 | $(SET_LIB_PATH) \ | |
1502 | echo "Building runtime libraries"; \ | |
a3406c06 | 1503 | $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all |
b1e3ddfd | 1504 | |
09f97c1e JL |
1505 | .PHONY: cross |
1506 | cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld | |
1507 | @r=`pwd`; export r; \ | |
1508 | s=`cd $(srcdir); pwd`; export s; \ | |
1509 | $(SET_LIB_PATH) \ | |
1510 | echo "Building the C and C++ compiler"; \ | |
3a4fee66 | 1511 | cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" |
f6b58262 JW |
1512 | @r=`pwd`; export r; \ |
1513 | s=`cd $(srcdir); pwd` ; export s; \ | |
1514 | $(SET_LIB_PATH) \ | |
1515 | echo "Building runtime libraries"; \ | |
a3406c06 AO |
1516 | $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \ |
1517 | LANGUAGES="c c++" all | |
09f97c1e | 1518 | |
6599da04 JM |
1519 | .PHONY: check-gcc |
1520 | check-gcc: | |
1521 | @if [ -f ./gcc/Makefile ] ; then \ | |
1522 | r=`pwd`; export r; \ | |
1523 | s=`cd $(srcdir); pwd`; export s; \ | |
1524 | $(SET_LIB_PATH) \ | |
1525 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ | |
1526 | else \ | |
1527 | true; \ | |
1528 | fi | |
1529 | ||
3d55d2f8 BK |
1530 | .PHONY: check-c++ |
1531 | check-c++: | |
f04885d3 BK |
1532 | @if [ -f ./gcc/Makefile ] ; then \ |
1533 | r=`pwd`; export r; \ | |
1534 | s=`cd $(srcdir); pwd`; export s; \ | |
1535 | $(SET_LIB_PATH) \ | |
1536 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check-c++); \ | |
91b54f7f | 1537 | $(MAKE) check-target-libstdc++-v3; \ |
f04885d3 BK |
1538 | else \ |
1539 | true; \ | |
1540 | fi | |
3d55d2f8 | 1541 | |
6599da04 JM |
1542 | .PHONY: install-gcc |
1543 | install-gcc: | |
1544 | @if [ -f ./gcc/Makefile ] ; then \ | |
1545 | r=`pwd`; export r; \ | |
1546 | s=`cd $(srcdir); pwd`; export s; \ | |
1547 | $(SET_LIB_PATH) \ | |
3cd730af | 1548 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ |
6599da04 JM |
1549 | else \ |
1550 | true; \ | |
1551 | fi | |
1552 | ||
205cba53 JL |
1553 | .PHONY: install-gcc-cross |
1554 | install-gcc-cross: | |
1555 | @if [ -f ./gcc/Makefile ] ; then \ | |
1556 | r=`pwd`; export r; \ | |
1557 | s=`cd $(srcdir); pwd`; export s; \ | |
1558 | $(SET_LIB_PATH) \ | |
3cd730af | 1559 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) LANGUAGES="c c++" install); \ |
205cba53 JL |
1560 | else \ |
1561 | true; \ | |
1562 | fi | |
6599da04 JM |
1563 | # EXPERIMENTAL STUFF |
1564 | # This rule is used to install the modules which use FLAGS_TO_PASS. | |
1565 | # To build a target install-X means to cd to X and make install. | |
1566 | .PHONY: install-dosrel | |
1567 | install-dosrel: installdirs info | |
1568 | @dir=`echo $@ | sed -e 's/install-//'`; \ | |
1569 | if [ -f ./$${dir}/Makefile ] ; then \ | |
1570 | r=`pwd`; export r; \ | |
1571 | s=`cd $(srcdir); pwd`; export s; \ | |
1572 | $(SET_LIB_PATH) \ | |
1573 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ | |
1574 | else \ | |
1575 | true; \ | |
1576 | fi | |
1577 | ||
1578 | install-dosrel-fake: | |
1579 | ||
c9a54638 AO |
1580 | ALL_GCC = all-gcc |
1581 | ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss | |
1582 | ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++-v3 | |
6599da04 JM |
1583 | |
1584 | # This is a list of inter-dependencies among modules. | |
1585 | all-apache: | |
5d4a5ee6 | 1586 | all-ash: |
6599da04 | 1587 | all-autoconf: all-m4 all-texinfo |
5d4a5ee6 | 1588 | all-automake: all-m4 all-texinfo |
6599da04 | 1589 | all-bash: |
5d4a5ee6 JL |
1590 | all-bfd: all-libiberty all-intl |
1591 | all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl | |
6599da04 | 1592 | all-bison: all-texinfo |
6e2a4843 | 1593 | configure-target-boehm-gc: $(ALL_GCC_CXX) configure-target-qthreads |
99d60508 | 1594 | all-target-boehm-gc: configure-target-boehm-gc |
6e2a4843 AO |
1595 | configure-target-bsp: $(ALL_GCC_C) |
1596 | all-target-bsp: configure-target-bsp | |
6599da04 | 1597 | all-byacc: |
5d4a5ee6 | 1598 | all-bzip2: |
6e2a4843 | 1599 | all-cgen: all-libiberty |
5d4a5ee6 | 1600 | all-cvssrc: |
6e2a4843 | 1601 | configure-target-cygmon: $(ALL_GCC_C) |
4d88a68a | 1602 | all-target-cygmon: configure-target-cygmon all-target-libiberty all-target-libstub all-target-bsp |
6599da04 JM |
1603 | all-db: |
1604 | all-dejagnu: all-tcl all-expect all-tk | |
1605 | all-diff: all-libiberty | |
1606 | all-emacs: | |
1607 | all-emacs19: all-bison all-byacc | |
1608 | all-etc: | |
6e2a4843 | 1609 | configure-target-examples: $(ALL_GCC_C) |
6599da04 JM |
1610 | all-target-examples: configure-target-examples |
1611 | all-expect: all-tcl all-tk | |
1612 | all-fileutils: all-libiberty | |
1613 | all-findutils: | |
1614 | all-find: | |
1615 | all-flex: all-libiberty all-bison all-byacc | |
5d4a5ee6 | 1616 | all-gas: all-libiberty all-opcodes all-bfd all-intl |
6599da04 JM |
1617 | all-gash: all-tcl |
1618 | all-gawk: | |
3c809ba4 | 1619 | all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib |
4d73d07a | 1620 | all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib |
5d4a5ee6 | 1621 | GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui |
6599da04 | 1622 | all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK) |
5d4a5ee6 | 1623 | all-gettext: |
6599da04 | 1624 | all-gnuserv: |
7fddf9a9 | 1625 | configure-target-gperf: $(ALL_GCC_CXX) |
4d88a68a | 1626 | all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++-v3 |
5d4a5ee6 | 1627 | all-gprof: all-libiberty all-bfd all-opcodes all-intl |
6599da04 JM |
1628 | all-grep: all-libiberty |
1629 | all-grez: all-libiberty all-bfd all-opcodes | |
1630 | all-gui: all-gdb all-libproc all-target-librx | |
1631 | all-guile: | |
1632 | all-gzip: all-libiberty | |
1633 | all-hello: all-libiberty | |
1634 | all-indent: | |
1635 | all-inet: all-tcl all-send-pr all-perl | |
5d4a5ee6 | 1636 | all-intl: |
6599da04 | 1637 | all-ispell: all-emacs19 |
d207ebef | 1638 | all-itcl: all-tcl all-tk all-tcl8.1 all-tk8.1 |
5d4a5ee6 | 1639 | all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl |
6599da04 JM |
1640 | configure-target-libgloss: $(ALL_GCC) |
1641 | all-target-libgloss: configure-target-libgloss configure-target-newlib | |
d207ebef | 1642 | all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl |
6599da04 | 1643 | all-libiberty: |
6e2a4843 | 1644 | configure-target-libffi: $(ALL_GCC_C) |
aab0d19d | 1645 | all-target-libffi: configure-target-libffi |
6e2a4843 | 1646 | configure-target-libjava: $(ALL_GCC_CXX) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi |
5db1f7ed | 1647 | all-target-libjava: configure-target-libjava all-fastjar all-target-zlib all-target-boehm-gc all-target-qthreads all-target-libffi |
6e2a4843 | 1648 | configure-target-librx: $(ALL_GCC_C) |
6599da04 | 1649 | all-target-librx: configure-target-librx |
6e2a4843 AO |
1650 | configure-target-libstdc++-v3: $(ALL_GCC_C) |
1651 | all-target-libstdc++-v3: configure-target-libstdc++-v3 all-target-libiberty | |
1652 | configure-target-libstub: $(ALL_GCC_C) | |
5d4a5ee6 JL |
1653 | all-target-libstub: configure-target-libstub |
1654 | all-libtool: | |
6e2a4843 AO |
1655 | configure-target-libf2c: $(ALL_GCC_C) |
1656 | all-target-libf2c: configure-target-libf2c all-target-libiberty | |
1657 | configure-target-libchill: $(ALL_GCC_C) | |
1658 | all-target-libchill: configure-target-libchill all-target-libiberty | |
1659 | configure-target-libobjc: $(ALL_GCC_C) | |
1660 | all-target-libobjc: configure-target-libobjc all-target-libiberty | |
191de407 | 1661 | all-m4: all-libiberty all-texinfo |
6599da04 JM |
1662 | all-make: all-libiberty |
1663 | all-mmalloc: | |
1664 | configure-target-newlib: $(ALL_GCC) | |
6e2a4843 AO |
1665 | all-target-newlib: configure-target-newlib |
1666 | configure-target-libtermcap: $(ALL_GCC_C) | |
1667 | all-target-libtermcap: configure-target-libtermcap | |
1668 | all-opcodes: all-bfd all-libiberty all-cgen | |
6599da04 JM |
1669 | all-patch: all-libiberty |
1670 | all-perl: | |
1671 | all-prms: all-libiberty | |
6e2a4843 | 1672 | configure-target-qthreads: $(ALL_GCC_C) |
99d60508 | 1673 | all-target-qthreads: configure-target-qthreads |
6599da04 JM |
1674 | all-rcs: |
1675 | all-readline: | |
1676 | all-recode: all-libiberty | |
1677 | all-sed: all-libiberty | |
1678 | all-send-pr: all-prms | |
1679 | all-shellutils: | |
3f19b439 | 1680 | all-sid: all-tcl all-tk |
6e2a4843 | 1681 | all-sim: all-libiberty all-bfd all-opcodes all-readline all-cgen |
e44e84da | 1682 | all-snavigator: all-tcl all-tk all-itcl all-db all-grep all-libgui |
6599da04 JM |
1683 | all-tar: all-libiberty |
1684 | all-tcl: | |
d207ebef | 1685 | all-tcl8.1: |
6599da04 JM |
1686 | all-tclX: all-tcl all-tk |
1687 | all-tk: all-tcl | |
d207ebef | 1688 | all-tk8.1: all-tcl8.1 |
6599da04 JM |
1689 | all-texinfo: all-libiberty |
1690 | all-textutils: | |
1691 | all-tgas: all-libiberty all-bfd all-opcodes | |
1692 | all-time: | |
d207ebef | 1693 | all-tix: all-tcl all-tk all-tcl8.1 all-tk8.1 |
6599da04 | 1694 | all-wdiff: |
6e2a4843 AO |
1695 | configure-target-winsup: $(ALL_GCC_C) |
1696 | all-target-winsup: all-target-libiberty all-target-libtermcap configure-target-winsup | |
6599da04 | 1697 | all-uudecode: all-libiberty |
99d60508 | 1698 | all-zip: |
4b92758a | 1699 | all-zlib: |
6e2a4843 | 1700 | configure-target-zlib: $(ALL_GCC_C) |
99d60508 | 1701 | all-target-zlib: configure-target-zlib |
5db1f7ed APB |
1702 | all-fastjar: all-zlib |
1703 | configure-target-fastjar: configure-target-zlib | |
1704 | all-target-fastjar: configure-target-fastjar all-target-zlib | |
6e2a4843 AO |
1705 | configure-target-libiberty: $(ALL_GCC_C) |
1706 | all-target-libiberty: configure-target-libiberty | |
6599da04 JM |
1707 | all-target: $(ALL_TARGET_MODULES) |
1708 | install-target: $(INSTALL_TARGET_MODULES) | |
d207ebef | 1709 | install-gdb: install-tcl install-tk install-itcl install-tix install-libgui |
3f19b439 | 1710 | install-sid: install-tcl install-tk |
6599da04 JM |
1711 | ### other supporting targets |
1712 | ||
1713 | MAKEDIRS= \ | |
1714 | $(prefix) \ | |
1715 | $(exec_prefix) | |
1716 | .PHONY: installdirs | |
1717 | installdirs: mkinstalldirs | |
1718 | $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS) | |
1719 | ||
1720 | dir.info: do-install-info | |
1721 | if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ | |
1722 | $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ | |
1723 | mv -f dir.info.new dir.info ; \ | |
1724 | else true ; \ | |
1725 | fi | |
1726 | ||
1727 | dist: | |
1728 | @echo "Building a full distribution of this tree isn't done" | |
1729 | @echo "via 'make dist'. Check out the etc/ subdirectory" | |
1730 | ||
1731 | etags tags: TAGS | |
1732 | ||
1733 | # Right now this just builds TAGS in each subdirectory. emacs19 has the | |
1734 | # ability to use several tags files at once, so there is probably no need | |
1735 | # to combine them into one big TAGS file (like CVS 1.3 does). We could | |
1736 | # (if we felt like it) have this Makefile write a piece of elisp which | |
1737 | # the user could load to tell emacs19 where all the TAGS files we just | |
1738 | # built are. | |
1739 | TAGS: do-TAGS | |
1740 | ||
1741 | # with the gnu make, this is done automatically. | |
1742 | ||
6dd27861 | 1743 | Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) $(gcc_version_trigger) |
6599da04 JM |
1744 | $(SHELL) ./config.status |
1745 | ||
1746 | # | |
1747 | # Support for building net releases | |
1748 | ||
1749 | # Files in devo used in any net release. | |
1750 | # ChangeLog omitted because it may refer to files which are not in this | |
1751 | # distribution (perhaps it would be better to include it anyway). | |
1752 | DEVO_SUPPORT= README Makefile.in configure configure.in \ | |
52d4e5b7 | 1753 | config.guess config.if config.sub config move-if-change \ |
6599da04 JM |
1754 | mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \ |
1755 | COPYING COPYING.LIB install-sh config-ml.in symlink-tree \ | |
de710532 AO |
1756 | mkinstalldirs ltconfig ltmain.sh missing ylwrap \ |
1757 | libtool.m4 gettext.m4 ltcf-c.sh ltcf-cxx.sh ltcf-gcj.sh | |
6599da04 JM |
1758 | |
1759 | # Files in devo/etc used in any net release. | |
1760 | # ChangeLog omitted because it may refer to files which are not in this | |
1761 | # distribution (perhaps it would be better to include it anyway). | |
1762 | ETC_SUPPORT= Makefile.in configure configure.in standards.texi \ | |
1763 | make-stds.texi standards.info* | |
1764 | ||
1765 | # When you use `make setup-dirs' or `make taz' you should always redefine | |
1766 | # this macro. | |
1767 | SUPPORT_FILES = list-of-support-files-for-tool-in-question | |
1768 | ||
d207ebef JM |
1769 | # NOTE: No double quotes in the below. It is used within shell script |
1770 | # as VER="$(VER)" | |
1771 | VER = ` if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \ | |
1772 | sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \ | |
1773 | else \ | |
1774 | sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \ | |
1775 | fi` | |
1776 | PACKAGE = $(TOOL) | |
6599da04 | 1777 | |
d207ebef JM |
1778 | .PHONY: taz |
1779 | taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex | |
1780 | $(MAKE) -f Makefile.in do-proto-toplev \ | |
1781 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1782 | MD5PROG="$(MD5PROG)" \ | |
1783 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1784 | $(MAKE) -f Makefile.in do-md5sum \ | |
1785 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1786 | MD5PROG="$(MD5PROG)" \ | |
1787 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1788 | $(MAKE) -f Makefile.in do-tar-bz2 \ | |
1789 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1790 | MD5PROG="$(MD5PROG)" \ | |
1791 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1792 | ||
1793 | .PHONY: gdb-taz | |
1794 | gdb-taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex | |
1795 | $(MAKE) -f Makefile.in do-proto-toplev \ | |
1796 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1797 | MD5PROG="$(MD5PROG)" \ | |
1798 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1799 | $(MAKE) -f Makefile.in do-md5sum \ | |
1800 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1801 | MD5PROG="$(MD5PROG)" \ | |
1802 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1803 | $(MAKE) -f Makefile.in do-djunpack \ | |
1804 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1805 | MD5PROG="$(MD5PROG)" \ | |
1806 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1807 | $(MAKE) -f Makefile.in do-tar-bz2 \ | |
1808 | TOOL=$(TOOL) PACKAGE="$(PACKAGE)" VER="$(VER)" \ | |
1809 | MD5PROG="$(MD5PROG)" \ | |
1810 | SUPPORT_FILES="$(SUPPORT_FILES)" | |
1811 | ||
1812 | .PHONY: do-proto-toplev | |
1813 | do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex | |
1814 | echo "==> Making $(PACKAGE)-$(VER)/" | |
1815 | # Take out texinfo from a few places. | |
6599da04 JM |
1816 | sed -e '/^all\.normal: /s/\all-texinfo //' \ |
1817 | -e '/^ install-texinfo /d' \ | |
1818 | <Makefile.in >tmp | |
1819 | mv -f tmp Makefile.in | |
1820 | # | |
1821 | ./configure sun4 | |
1822 | [ -z "$(CONFIGURE_TARGET_MODULES)" ] \ | |
6e2a4843 AO |
1823 | || $(MAKE) $(CONFIGURE_TARGET_MODULES) \ |
1824 | ALL_GCC="" ALL_GCC_C="" ALL_GCC_CXX="" \ | |
6599da04 JM |
1825 | CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)" |
1826 | # Make links, and run "make diststuff" or "make info" when needed. | |
1827 | rm -rf proto-toplev ; mkdir proto-toplev | |
1828 | set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \ | |
1829 | for d in $$dirs ; do \ | |
1830 | if [ -d $$d ]; then \ | |
1831 | if [ ! -f $$d/Makefile ] ; then true ; \ | |
1832 | elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \ | |
1833 | (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \ | |
1834 | elif grep '^info:' $$d/Makefile >/dev/null ; then \ | |
1835 | (cd $$d ; $(MAKE) info ) || exit 1 ; \ | |
1836 | fi ; \ | |
1837 | if [ -d $$d/proto-$$d.dir ]; then \ | |
1838 | ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ | |
1839 | else \ | |
1840 | ln -s ../$$d proto-toplev/$$d ; \ | |
1841 | fi ; \ | |
1842 | else ln -s ../$$d proto-toplev/$$d ; fi ; \ | |
1843 | done | |
3a4fee66 | 1844 | cd etc && $(MAKE) info |
6599da04 JM |
1845 | $(MAKE) distclean |
1846 | # | |
1847 | mkdir proto-toplev/etc | |
1848 | (cd proto-toplev/etc; \ | |
1849 | for i in $(ETC_SUPPORT); do \ | |
1850 | ln -s ../../etc/$$i . ; \ | |
1851 | done) | |
1852 | # | |
1853 | # Take out texinfo from configurable dirs | |
1854 | rm proto-toplev/configure.in | |
1855 | sed -e '/^host_tools=/s/texinfo //' \ | |
1856 | <configure.in >proto-toplev/configure.in | |
1857 | # | |
1858 | mkdir proto-toplev/texinfo | |
1859 | ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ | |
6599da04 JM |
1860 | if test -r texinfo/util/tex3patch ; then \ |
1861 | mkdir proto-toplev/texinfo/util && \ | |
1862 | ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \ | |
1863 | else true; fi | |
5d4a5ee6 | 1864 | chmod -R og=u . || chmod og=u `find . -print` |
d207ebef JM |
1865 | # |
1866 | -rm -f $(PACKAGE)-$(VER) | |
1867 | ln -s proto-toplev $(PACKAGE)-$(VER) | |
1868 | ||
1869 | .PHONY: do-tar-bz2 | |
1870 | do-tar-bz2: | |
1871 | echo "==> Making $(PACKAGE)-$(VER).tar.bz2" | |
1872 | -rm -f $(PACKAGE)-$(VER).tar.bz2 | |
1873 | find $(PACKAGE)-$(VER) -follow -name CVS -prune -o -type f -print \ | |
1874 | | tar cTfh - $(PACKAGE)-$(VER).tar | |
1875 | $(BZIPPROG) -v -9 $(PACKAGE)-$(VER).tar | |
1876 | ||
1877 | .PHONY: do-md5sum | |
1878 | do-md5sum: | |
1879 | echo "==> Adding md5 checksum to top-level directory" | |
1880 | cd proto-toplev && find * -follow -name CVS -prune -o -type f -print \ | |
1881 | | xargs $(MD5PROG) > ../md5.sum | |
1882 | mv md5.sum proto-toplev | |
1883 | ||
1884 | .PHONY: do-djunpack | |
1885 | do-djunpack: | |
1886 | echo "==> Adding updated djunpack.bat to top-level directory" | |
1887 | echo - 's /gdb-[0-9\.]*/gdb-'"$(VER)"'/' | |
1888 | sed < djunpack.bat > djunpack.new \ | |
1889 | -e 's/gdb-[0-9][0-9\.]*/gdb-'"$(VER)"'/' | |
1890 | mv djunpack.new djunpack.bat | |
1891 | -rm -f proto-toplev/djunpack.bat | |
1892 | ln -s ../djunpack.bat proto-toplev/djunpack.bat | |
1893 | ||
1894 | TEXINFO_SUPPORT= texinfo/texinfo.tex | |
6599da04 JM |
1895 | DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) |
1896 | ||
d207ebef JM |
1897 | .PHONY: gas.tar.bz2 |
1898 | GAS_SUPPORT_DIRS= bfd include libiberty opcodes intl setup.com makefile.vms mkdep | |
1899 | gas.tar.bz2: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas | |
6599da04 | 1900 | $(MAKE) -f Makefile.in taz TOOL=gas \ |
d207ebef | 1901 | MD5PROG="$(MD5PROG)" \ |
6599da04 JM |
1902 | SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" |
1903 | ||
1904 | # The FSF "binutils" release includes gprof and ld. | |
d207ebef JM |
1905 | .PHONY: binutils.tar.bz2 |
1906 | BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof intl setup.com makefile.vms mkdep | |
1907 | binutils.tar.bz2: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils | |
6599da04 | 1908 | $(MAKE) -f Makefile.in taz TOOL=binutils \ |
d207ebef JM |
1909 | MD5PROG="$(MD5PROG)" \ |
1910 | SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)" | |
6599da04 | 1911 | |
d207ebef | 1912 | .PHONY: gas+binutils.tar.bz2 |
6599da04 | 1913 | GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof |
d207ebef | 1914 | gas+binutils.tar.bz2: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas |
6599da04 | 1915 | $(MAKE) -f Makefile.in taz TOOL=gas \ |
d207ebef JM |
1916 | MD5PROG="$(MD5PROG)" \ |
1917 | SUPPORT_FILES="$(GASB_SUPPORT_DIRS)" | |
6599da04 | 1918 | |
6599da04 | 1919 | GNATS_SUPPORT_DIRS=include libiberty send-pr |
d207ebef | 1920 | gnats.tar.bz2: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats |
6599da04 | 1921 | $(MAKE) -f Makefile.in taz TOOL=gnats \ |
d207ebef | 1922 | MD5PROG="$(MD5PROG)" \ |
6599da04 JM |
1923 | SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)" |
1924 | ||
d207ebef | 1925 | .PHONY: gdb.tar.bz2 |
5d4a5ee6 | 1926 | GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils intl |
d207ebef JM |
1927 | gdb.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb |
1928 | $(MAKE) -f Makefile.in gdb-taz TOOL=gdb \ | |
1929 | MD5PROG="$(MD5PROG)" \ | |
1930 | SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" | |
1931 | ||
1932 | .PHONY: dejagnu.tar.bz2 | |
1933 | DEJAGNU_SUPPORT_DIRS= tcl expect libiberty | |
1934 | dejagnu.tar.bz2: $(DIST_SUPPORT) $(DEJAGNU_SUPPORT_DIRS) dejagnu | |
1935 | $(MAKE) -f Makefile.in taz TOOL=dejagnu \ | |
1936 | MD5PROG="$(MD5PROG)" \ | |
1937 | SUPPORT_FILES="$(DEJAGNU_SUPPORT_DIRS)" | |
1938 | ||
1939 | .PHONY: gdb+dejagnu.tar.bz2 | |
1940 | GDBD_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl expect dejagnu | |
1941 | gdb+dejagnu.tar.bz2: $(DIST_SUPPORT) $(GDBD_SUPPORT_DIRS) gdb | |
1942 | $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=gdb+dejagnu \ | |
1943 | MD5PROG="$(MD5PROG)" \ | |
1944 | SUPPORT_FILES="$(GDBD_SUPPORT_DIRS)" | |
1945 | ||
1946 | .PHONY: insight.tar.bz2 | |
1947 | INSIGHT_SUPPORT_DIRS= $(GDB_SUPPORT_DIRS) tcl tk itcl tix libgui | |
1948 | insight.tar.bz2: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb | |
1949 | $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE=insight \ | |
1950 | MD5PROG="$(MD5PROG)" \ | |
1951 | SUPPORT_FILES="$(INSIGHT_SUPPORT_DIRS)" | |
1952 | ||
1953 | .PHONY: insight+dejagnu.tar.bz2 | |
1954 | INSIGHTD_SUPPORT_DIRS= $(INSIGHT_SUPPORT_DIRS) expect dejagnu | |
1955 | insight+dejagnu.tar.bz2: $(DIST_SUPPORT) $(INSIGHTD_SUPPORT_DIRS) gdb | |
1956 | $(MAKE) -f Makefile.in gdb-taz TOOL=gdb PACKAGE="insight+dejagnu" \ | |
1957 | MD5PROG="$(MD5PROG)" \ | |
1958 | SUPPORT_FILES="$(INSIGHTD_SUPPORT_DIRS)" | |
1959 | ||
1960 | .PHONY: newlib.tar.bz2 | |
6599da04 JM |
1961 | NEWLIB_SUPPORT_DIRS=libgloss |
1962 | # taz configures for the sun4 target which won't configure newlib. | |
1963 | # We need newlib configured so that the .info files are made. | |
1964 | # Unfortunately, it is not enough to just configure newlib separately: | |
1965 | # taz will build the .info files but since SUBDIRS won't contain newlib, | |
1966 | # distclean won't be run (leaving Makefile, config.status, and the tmp files | |
1967 | # used in building the .info files, eg: *.def, *.ref). | |
1968 | # The problem isn't solvable however without a lot of extra work because | |
1969 | # target libraries are built in subdir $(target_alias) which gets nuked during | |
1970 | # the make distclean. For now punt on the issue of shipping newlib info files | |
1971 | # with newlib net releases and wait for a day when some native target (sun4?) | |
1972 | # supports newlib (if only minimally). | |
d207ebef | 1973 | newlib.tar.bz2: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib |
6599da04 | 1974 | $(MAKE) -f Makefile.in taz TOOL=newlib \ |
d207ebef | 1975 | MD5PROG="$(MD5PROG)" \ |
6599da04 JM |
1976 | SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \ |
1977 | DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib | |
1978 | ||
1979 | .NOEXPORT: | |
1980 | MAKEOVERRIDES= | |
1981 | ||
6599da04 | 1982 | # end of Makefile.in |