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