]>
Commit | Line | Data |
---|---|---|
eb02fd64 | 1 | # |
131a3881 | 2 | # Makefile for directory with subdirs to build. |
79337c85 | 3 | # Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation |
eb02fd64 | 4 | # |
4dfe09da RP |
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., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
18 | # | |
f149eb99 | 19 | |
eb02fd64 | 20 | srcdir = . |
28f3b094 | 21 | |
4d714963 | 22 | prefix = /usr/local |
eb02fd64 | 23 | |
7fcfdcf7 SC |
24 | exec_prefix = $(prefix) |
25 | bindir = $(exec_prefix)/bin | |
26 | libdir = $(exec_prefix)/lib | |
a54e05f6 | 27 | tooldir = $(exec_prefix)/$(target) |
7fcfdcf7 | 28 | |
51489233 ILT |
29 | program_transform_name = |
30 | ||
4d714963 | 31 | datadir = $(prefix)/lib |
7fcfdcf7 | 32 | mandir = $(prefix)/man |
4d714963 RP |
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 | |
7fcfdcf7 | 42 | infodir = $(prefix)/info |
4d714963 RP |
43 | includedir = $(prefix)/include |
44 | docdir = $(datadir)/doc | |
45 | ||
46 | SHELL = /bin/sh | |
47 | ||
f35c6160 | 48 | INSTALL = $${srcroot}/install.sh -c |
4d714963 | 49 | INSTALL_PROGRAM = $(INSTALL) |
5cc73086 | 50 | INSTALL_DATA = $(INSTALL) -m 644 |
fe560b9f | 51 | INSTALL_XFORM = $(INSTALL) -t='$(program_transform_name)' |
3c8735af | 52 | |
09985c96 | 53 | INSTALL_DOSREL = install-dosrel-fake |
a987271c | 54 | |
440868a0 | 55 | AS = as |
ec342d7d | 56 | AR = ar |
b5329d84 | 57 | AR_FLAGS = rc |
e85e07cb | 58 | CC = cc |
7b636683 | 59 | |
66957ce4 ILT |
60 | # Special variables passed down in EXTRA_GCC_FLAGS. They are defined |
61 | # here so that they can be overridden by Makefile fragments. | |
753d5049 SC |
62 | HOST_CC = $(CC_FOR_BUILD) |
63 | HOST_PREFIX = | |
64 | HOST_PREFIX_1 = loser- | |
65 | ||
7b636683 JK |
66 | # We don't specify -g -O because many compilers don't support -g -O, |
67 | # and/or -O is broken in and of itself. | |
f8a6ad66 | 68 | CFLAGS = -g |
7b636683 | 69 | |
a4e879a1 | 70 | # start-sanitize-chill |
7d9f0c54 MW |
71 | CHILLFLAGS = $(CFLAGS) |
72 | CHILL_LIB = -lchill | |
a4e879a1 | 73 | # end-sanitize-chill |
e85e07cb | 74 | CXX = gcc |
7b636683 | 75 | |
1d5fcc66 | 76 | # Use -O2 to stress test the compiler. |
b255ccdb | 77 | CXXFLAGS = -g -O2 -fno-implicit-templates |
7b636683 | 78 | |
4d714963 | 79 | RANLIB = ranlib |
51489233 | 80 | NM = nm |
5cc73086 KR |
81 | # Not plain GZIP, since gzip looks there for extra command-line options. |
82 | GZIPPROG = gzip | |
eb02fd64 | 83 | |
40e16078 | 84 | # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove. |
5cc73086 KR |
85 | BISON = `if [ -f $$r/byacc/byacc ] ; \ |
86 | then echo $$r/byacc/byacc ; \ | |
378fd382 | 87 | else echo byacc ; \ |
06a07944 | 88 | fi` |
2645fb0c | 89 | |
5cc73086 KR |
90 | LEX = `if [ -f $$r/flex/flex ] ; \ |
91 | then echo $$r/flex/flex ; \ | |
2198e4ba MT |
92 | else echo flex ; fi` |
93 | ||
5cc73086 KR |
94 | M4 = `if [ -f $$r/m4/m4 ] ; \ |
95 | then echo $$r/m4/m4 ; \ | |
65e21701 KR |
96 | else echo m4 ; fi` |
97 | ||
5cc73086 KR |
98 | MAKEINFO = `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \ |
99 | then echo $$r/texinfo/makeinfo/makeinfo ; \ | |
77806c3e | 100 | else echo makeinfo ; fi` |
484fa12d | 101 | |
9823504d ILT |
102 | # This just becomes part of the MAKEINFO definition passed down to |
103 | # sub-makes. It lets flags be given on the command line while still | |
104 | # using the makeinfo from the object tree. | |
105 | MAKEINFOFLAGS = | |
b772d75e | 106 | |
5cc73086 KR |
107 | EXPECT = `if [ -f $$r/expect/expect ] ; \ |
108 | then echo $$r/expect/expect ; \ | |
a54e05f6 KR |
109 | else echo expect ; fi` |
110 | ||
111 | RUNTEST = `if [ -f $${srcroot}/dejagnu/runtest ] ; \ | |
112 | then echo $${srcroot}/dejagnu/runtest ; \ | |
6a42d184 DZ |
113 | else echo runtest ; fi` |
114 | ||
f980fcfb JG |
115 | |
116 | # libraries that may need to be augmented on a system-by-system basis | |
117 | X11_LIB = -lX11 | |
118 | ||
e85e07cb | 119 | # compilers to use to create programs which must be run in the build |
440868a0 ILT |
120 | # environment. |
121 | CC_FOR_BUILD = $(CC) | |
e85e07cb | 122 | CXX_FOR_BUILD = $(CXX) |
440868a0 | 123 | |
9f73dd6a | 124 | SUBDIRS = "this is set via configure, don't edit this" |
6a3958b2 RP |
125 | OTHERS = |
126 | ||
a0f47eb7 | 127 | ALL = all.normal |
f35c6160 DZ |
128 | INSTALL_TARGET = install-dirs \ |
129 | $(INSTALL_MODULES) \ | |
130 | $(INSTALL_TARGET_MODULES) \ | |
131 | $(INSTALL_X11_MODULES) \ | |
753d5049 | 132 | install-gcc \ |
09985c96 | 133 | $(INSTALL_DOSREL) |
753d5049 | 134 | |
fb660409 | 135 | |
51489233 | 136 | CC_FOR_TARGET = ` \ |
5cc73086 | 137 | if [ -f $$r/gcc/Makefile ] ; then \ |
753d5049 SC |
138 | if [ -f $$r/newlib/Makefile ] ; then \ |
139 | echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \ | |
140 | else \ | |
141 | echo $$r/gcc/xgcc -B$$r/gcc/; \ | |
142 | fi; \ | |
51489233 | 143 | else \ |
378fd382 | 144 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
145 | echo $(CC); \ |
146 | else \ | |
753d5049 | 147 | t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \ |
51489233 ILT |
148 | fi; \ |
149 | fi` | |
150 | ||
a4e879a1 | 151 | # start-sanitize-chill |
7d9f0c54 | 152 | CHILL_FOR_TARGET = ` \ |
5cc73086 KR |
153 | if [ -f $$r/gcc/Makefile ] ; then \ |
154 | echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/chillrt/; \ | |
7d9f0c54 MW |
155 | else \ |
156 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ | |
157 | echo $(CC); \ | |
158 | else \ | |
753d5049 | 159 | t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \ |
7d9f0c54 MW |
160 | fi; \ |
161 | fi` | |
34b3298b | 162 | |
a4e879a1 | 163 | # end-sanitize-chill |
7d9f0c54 | 164 | |
d1bea4c7 | 165 | CXX_FOR_TARGET = ` \ |
5cc73086 | 166 | if [ -f $$r/gcc/Makefile ] ; then \ |
753d5049 SC |
167 | if [ -f $$r/newlib/Makefile ] ; then \ |
168 | echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \ | |
169 | else \ | |
170 | echo $$r/gcc/xgcc -B$$r/gcc/; \ | |
171 | fi; \ | |
fca4f908 | 172 | else \ |
e85e07cb ILT |
173 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
174 | echo $(CXX); \ | |
fca4f908 | 175 | else \ |
753d5049 | 176 | t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \ |
fca4f908 MW |
177 | fi; \ |
178 | fi` | |
179 | ||
440868a0 | 180 | AS_FOR_TARGET = ` \ |
5cc73086 KR |
181 | if [ -f $$r/gas/Makefile ] ; then \ |
182 | echo $$r/gas/as.new ; \ | |
440868a0 | 183 | else \ |
e85e07cb | 184 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
440868a0 ILT |
185 | echo $(AS); \ |
186 | else \ | |
753d5049 | 187 | t='$(program_transform_name)'; echo as | sed -e 's/brokensed/brokensed/' $$t ; \ |
81246025 | 188 | fi; \ |
440868a0 ILT |
189 | fi` |
190 | ||
51489233 | 191 | AR_FOR_TARGET = ` \ |
5cc73086 KR |
192 | if [ -f $$r/binutils/ar ] ; then \ |
193 | echo $$r/binutils/ar ; \ | |
51489233 | 194 | else \ |
378fd382 | 195 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
196 | echo $(AR); \ |
197 | else \ | |
753d5049 | 198 | t='$(program_transform_name)'; echo ar | sed -e 's/brokensed/brokensed/' $$t ; \ |
81246025 | 199 | fi; \ |
51489233 ILT |
200 | fi` |
201 | ||
202 | RANLIB_FOR_TARGET = ` \ | |
5cc73086 KR |
203 | if [ -f $$r/binutils/ranlib ] ; then \ |
204 | echo $$r/binutils/ranlib ; \ | |
51489233 | 205 | else \ |
378fd382 | 206 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
207 | echo $(RANLIB); \ |
208 | else \ | |
753d5049 | 209 | t='$(program_transform_name)'; echo ranlib | sed -e 's/brokensed/brokensed/' $$t ; \ |
81246025 | 210 | fi; \ |
51489233 ILT |
211 | fi` |
212 | ||
213 | NM_FOR_TARGET = ` \ | |
5cc73086 | 214 | if [ -f $$r/binutils/Makefile ] ; then \ |
753d5049 | 215 | echo $$r/binutils/nm.new ; \ |
51489233 | 216 | else \ |
378fd382 | 217 | if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
51489233 ILT |
218 | echo $(NM); \ |
219 | else \ | |
753d5049 | 220 | t='$(program_transform_name)'; echo nm | sed -e 's/brokensed/brokensed/' $$t ; \ |
81246025 | 221 | fi; \ |
51489233 ILT |
222 | fi` |
223 | ||
a987271c | 224 | |
eb02fd64 | 225 | #### host and target specific makefile fragments come in here. |
ec342d7d | 226 | ### |
eb02fd64 | 227 | |
0ef4728f ILT |
228 | # Flags to pass down to all sub-makes. |
229 | # Please keep these in alphabetical order. | |
230 | BASE_FLAGS_TO_PASS = \ | |
2198e4ba | 231 | "AR_FLAGS=$(AR_FLAGS)" \ |
d09de70e | 232 | "AR_FOR_TARGET=$(AR_FOR_TARGET)" \ |
0ef4728f | 233 | "AS_FOR_TARGET=$(AS_FOR_TARGET)" \ |
378fd382 | 234 | "BISON=$(BISON)" \ |
378fd382 | 235 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ |
0ef4728f | 236 | "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ |
2198e4ba | 237 | "CFLAGS=$(CFLAGS)" \ |
a4e879a1 | 238 | $(start-sanitize-chill)\ |
7d9f0c54 MW |
239 | "CHILLFLAGS=$(CHILLFLAGS)" \ |
240 | "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \ | |
241 | "CHILL_LIB=$(CHILL_LIB)" \ | |
a4e879a1 | 242 | $(end-sanitize-chill)\ |
0ef4728f ILT |
243 | "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \ |
244 | "CXXFLAGS=$(CXXFLAGS)" \ | |
245 | "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \ | |
a9a2f22f | 246 | "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \ |
2198e4ba MT |
247 | "INSTALL=$(INSTALL)" \ |
248 | "INSTALL_DATA=$(INSTALL_DATA)" \ | |
440868a0 | 249 | "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ |
f35c6160 | 250 | "INSTALL_XFORM=$(INSTALL_XFORM)" \ |
378fd382 DZ |
251 | "LDFLAGS=$(LDFLAGS)" \ |
252 | "LEX=$(LEX)" \ | |
65e21701 | 253 | "M4=$(M4)" \ |
9823504d | 254 | "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ |
0ef4728f | 255 | "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ |
d09de70e | 256 | "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \ |
49dfa984 | 257 | "SHELL=$(SHELL)" \ |
a54e05f6 | 258 | "EXPECT=$(EXPECT)" \ |
6a42d184 | 259 | "RUNTEST=$(RUNTEST)" \ |
86365152 | 260 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ |
5cc73086 | 261 | "YACC=$(BISON)" \ |
378fd382 DZ |
262 | "exec_prefix=$(exec_prefix)" \ |
263 | "prefix=$(prefix)" \ | |
264 | "tooldir=$(tooldir)" | |
2198e4ba | 265 | |
0ef4728f ILT |
266 | # Flags to pass down to most sub-makes, in which we're building with |
267 | # the host environment. | |
6d681784 | 268 | # If any variables are added here, they must be added to do-*, below. |
0ef4728f | 269 | EXTRA_HOST_FLAGS = \ |
6d681784 JG |
270 | 'AR=$(AR)' \ |
271 | 'AS=$(AS)' \ | |
272 | 'CC=$(CC)' \ | |
273 | 'CXX=$(CXX)' \ | |
274 | 'NM=$(NM)' \ | |
753d5049 | 275 | 'RANLIB=$(RANLIB)' |
0ef4728f ILT |
276 | |
277 | FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) | |
278 | ||
d1bea4c7 DZ |
279 | # Flags that are concerned with the location of the X11 include files |
280 | # and library files | |
281 | X11_FLAGS_TO_PASS = \ | |
282 | "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \ | |
f980fcfb JG |
283 | "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \ |
284 | "X11_LIB=$(X11_LIB)" | |
d1bea4c7 | 285 | |
0ef4728f ILT |
286 | # Flags to pass down to makes which are built with the target environment. |
287 | # The double $ decreases the length of the command line; the variables | |
288 | # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. | |
6d681784 | 289 | # If any variables are added here, they must be added to do-*, below. |
0ef4728f ILT |
290 | EXTRA_TARGET_FLAGS = \ |
291 | 'AR=$$(AR_FOR_TARGET)' \ | |
292 | 'AS=$$(AS_FOR_TARGET)' \ | |
293 | 'CC=$$(CC_FOR_TARGET)' \ | |
294 | 'CXX=$$(CXX_FOR_TARGET)' \ | |
295 | 'NM=$$(NM_FOR_TARGET)' \ | |
753d5049 | 296 | 'RANLIB=$$(RANLIB_FOR_TARGET)' |
0ef4728f ILT |
297 | |
298 | TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS) | |
51489233 | 299 | |
f4e414f1 ILT |
300 | # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it |
301 | # unfortunately needs the native compiler and the target ar and | |
0ef4728f | 302 | # ranlib. |
66957ce4 ILT |
303 | # If any variables are added here, they must be added to do-*, below. |
304 | # The HOST_* variables are a special case, which are used for the gcc | |
305 | # cross-building scheme. | |
0ef4728f ILT |
306 | EXTRA_GCC_FLAGS = \ |
307 | 'AR=$$(AR_FOR_TARGET)' \ | |
6d681784 JG |
308 | 'AS=$(AS)' \ |
309 | 'CC=$(CC)' \ | |
310 | 'CXX=$(CXX)' \ | |
a54e05f6 KR |
311 | 'HOST_CC=$(CC_FOR_BUILD)' \ |
312 | 'HOST_PREFIX=$(HOST_PREFIX)' \ | |
313 | 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \ | |
6d681784 | 314 | 'NM=$(NM)' \ |
753d5049 | 315 | 'RANLIB=$$(RANLIB_FOR_TARGET)' |
0ef4728f | 316 | |
34b3298b | 317 | GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) |
f4e414f1 | 318 | |
6a42d184 | 319 | # This is a list of the targets for all of the modules which are compiled |
79337c85 ILT |
320 | # using $(FLAGS_TO_PASS). |
321 | ALL_MODULES = \ | |
322 | all-autoconf \ | |
323 | all-bfd \ | |
324 | all-binutils \ | |
325 | all-byacc \ | |
326 | all-cvs \ | |
327 | all-dejagnu \ | |
328 | all-diff \ | |
ac259c28 | 329 | all-dosutils \ |
79337c85 ILT |
330 | all-etc \ |
331 | all-fileutils \ | |
332 | all-find \ | |
333 | all-flex \ | |
334 | all-gas \ | |
335 | all-gawk \ | |
336 | all-gdb \ | |
337 | all-gprof \ | |
338 | all-grep \ | |
339 | all-gzip \ | |
340 | all-hello \ | |
341 | all-indent \ | |
342 | all-ispell \ | |
343 | all-ld \ | |
344 | all-libiberty \ | |
345 | all-m4 \ | |
346 | all-make \ | |
347 | all-mmalloc \ | |
348 | all-opcodes \ | |
65e21701 | 349 | all-pagas \ |
79337c85 ILT |
350 | all-patch \ |
351 | all-prms \ | |
352 | all-rcs \ | |
353 | all-readline \ | |
275049c0 | 354 | all-release \ |
79337c85 ILT |
355 | all-recode \ |
356 | all-sed \ | |
357 | all-send-pr \ | |
358 | all-shellutils \ | |
359 | all-sim \ | |
360 | all-tar \ | |
361 | all-tcl \ | |
362 | all-texinfo \ | |
363 | all-textutils \ | |
364 | all-tgas \ | |
365 | all-time \ | |
366 | all-uudecode \ | |
753d5049 SC |
367 | all-wdiff |
368 | ||
6a42d184 DZ |
369 | # This is a list of the check targets for all of the modules which are |
370 | # compiled using $(FLAGS_TO_PASS). | |
4f0b8f27 TL |
371 | # This is a list of the check targets for all of the modules which are |
372 | # compiled using $(FLAGS_TO_PASS). | |
373 | # | |
d237841c BC |
374 | # The list is in two parts. The first lists those tools which |
375 | # are tested as part of the host's native tool-chain, and not | |
376 | # tested in a cross configuration. | |
377 | NATIVE_CHECK_MODULES = \ | |
378 | check-byacc \ | |
4f0b8f27 TL |
379 | check-flex |
380 | ||
d237841c | 381 | CROSS_CHECK_MODULES = \ |
6a42d184 DZ |
382 | check-autoconf \ |
383 | check-bfd \ | |
384 | check-binutils \ | |
6a42d184 DZ |
385 | check-cvs \ |
386 | check-dejagnu \ | |
387 | check-diff \ | |
388 | check-etc \ | |
389 | check-fileutils \ | |
390 | check-find \ | |
6a42d184 DZ |
391 | check-gas \ |
392 | check-gawk \ | |
393 | check-gdb \ | |
394 | check-gprof \ | |
395 | check-grep \ | |
396 | check-gzip \ | |
397 | check-hello \ | |
398 | check-indent \ | |
399 | check-ispell \ | |
400 | check-ld \ | |
401 | check-libiberty \ | |
402 | check-m4 \ | |
403 | check-make \ | |
404 | check-mmcheckoc \ | |
405 | check-opcodes \ | |
65e21701 | 406 | check-pagas \ |
6a42d184 DZ |
407 | check-patch \ |
408 | check-prms \ | |
409 | check-rcs \ | |
410 | check-readline \ | |
411 | check-recode \ | |
412 | check-sed \ | |
413 | check-send-pr \ | |
414 | check-shellutils \ | |
415 | check-sim \ | |
416 | check-tar \ | |
417 | check-tcl \ | |
418 | check-texinfo \ | |
419 | check-textutils \ | |
420 | check-tgas \ | |
421 | check-time \ | |
422 | check-uudecode \ | |
423 | check-wdiff | |
d237841c BC |
424 | |
425 | CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) | |
6a42d184 DZ |
426 | |
427 | # This is a list of the install targets for all of the modules which are | |
79337c85 ILT |
428 | # compiled using $(FLAGS_TO_PASS). |
429 | INSTALL_MODULES = \ | |
430 | install-autoconf \ | |
431 | install-bfd \ | |
432 | install-binutils \ | |
433 | install-byacc \ | |
434 | install-cvs \ | |
435 | install-dejagnu \ | |
436 | install-diff \ | |
753d5049 | 437 | install-dosutils \ |
79337c85 ILT |
438 | install-etc \ |
439 | install-fileutils \ | |
440 | install-find \ | |
441 | install-flex \ | |
442 | install-gas \ | |
443 | install-gawk \ | |
444 | install-gdb \ | |
445 | install-glob \ | |
446 | install-gprof \ | |
447 | install-grep \ | |
448 | install-gzip \ | |
449 | install-hello \ | |
450 | install-indent \ | |
451 | install-ispell \ | |
452 | install-ld \ | |
453 | install-libiberty \ | |
454 | install-m4 \ | |
455 | install-make \ | |
456 | install-mmalloc \ | |
457 | install-opcodes \ | |
65e21701 | 458 | install-pagas \ |
79337c85 ILT |
459 | install-patch \ |
460 | install-prms \ | |
461 | install-rcs \ | |
462 | install-readline \ | |
463 | install-recode \ | |
464 | install-sed \ | |
465 | install-send-pr \ | |
466 | install-shellutils \ | |
467 | install-sim \ | |
468 | install-tar \ | |
469 | install-tcl \ | |
470 | install-texinfo \ | |
471 | install-textutils \ | |
472 | install-tgas \ | |
473 | install-time \ | |
474 | install-uudecode \ | |
475 | install-wdiff | |
476 | ||
6a42d184 | 477 | # This is a list of the targets for all of the modules which are compiled |
79337c85 ILT |
478 | # using $(X11_FLAGS_TO_PASS). |
479 | ALL_X11_MODULES = \ | |
480 | all-emacs \ | |
4d802af9 | 481 | all-emacs19 \ |
79337c85 | 482 | all-expect \ |
65e21701 | 483 | all-gash \ |
79337c85 ILT |
484 | all-tclX \ |
485 | all-tk | |
486 | ||
6a42d184 DZ |
487 | # This is a list of the check targets for all of the modules which are |
488 | # compiled using $(X11_FLAGS_TO_PASS). | |
489 | CHECK_X11_MODULES = \ | |
490 | check-emacs \ | |
491 | check-expect \ | |
65e21701 | 492 | check-gash \ |
6a42d184 DZ |
493 | check-tclX \ |
494 | check-tk | |
495 | ||
79337c85 ILT |
496 | # This is a list of the install targets for all the modules which are |
497 | # compiled using $(X11_FLAGS_TO_PASS). | |
498 | INSTALL_X11_MODULES = \ | |
499 | install-emacs \ | |
4d802af9 | 500 | install-emacs19 \ |
79337c85 | 501 | install-expect \ |
65e21701 | 502 | install-gash \ |
79337c85 ILT |
503 | install-tclX \ |
504 | install-tk | |
fca4f908 | 505 | |
6a42d184 | 506 | # This is a list of the targets for all of the modules which are compiled |
79337c85 ILT |
507 | # using $(TARGET_FLAGS_TO_PASS). |
508 | ALL_TARGET_MODULES = \ | |
509 | $(start-sanitize-chill) \ | |
510 | all-chillrt \ | |
511 | $(end-sanitize-chill) \ | |
6214eb23 | 512 | all-libio \ |
4be4b991 | 513 | all-libstdc++ \ |
1d5fcc66 | 514 | all-librx \ |
79337c85 ILT |
515 | all-libg++ \ |
516 | all-newlib \ | |
517 | all-xiberty | |
518 | ||
6a42d184 DZ |
519 | # This is a list of the check targets for all of the modules which are |
520 | # compiled using $(TARGET_FLAGS_TO_PASS). | |
521 | CHECK_TARGET_MODULES = \ | |
522 | $(start-sanitize-chill) \ | |
523 | check-chillrt \ | |
524 | $(end-sanitize-chill) \ | |
6214eb23 | 525 | check-libio \ |
4be4b991 | 526 | check-libstdc++ \ |
6a42d184 DZ |
527 | check-libg++ \ |
528 | check-newlib \ | |
529 | check-xiberty | |
530 | ||
531 | # This is a list of the install targets for all of the modules which are | |
79337c85 ILT |
532 | # compiled using $(TARGET_FLAGS_TO_PASS). |
533 | INSTALL_TARGET_MODULES = \ | |
534 | $(start-sanitize-chill) \ | |
535 | install-chillrt \ | |
536 | $(end-sanitize-chill) \ | |
6214eb23 | 537 | install-libio \ |
4be4b991 | 538 | install-libstdc++ \ |
79337c85 ILT |
539 | install-libg++ \ |
540 | install-newlib \ | |
541 | install-xiberty | |
4d714963 | 542 | |
79337c85 ILT |
543 | # This is a shell case of all modules which are compiled using |
544 | # $(TARGET_FLAGS_TO_PASS), used in the do-X rule. | |
4be4b991 | 545 | TARGET_LIBS = libio | libstdc++ | librx | libg++ | newlib | xiberty |
a4e879a1 | 546 | # start-sanitize-chill |
4be4b991 | 547 | TARGET_LIBS = chillrt | libio | libstdc++ | librx | libg++ | newlib | xiberty |
a4e879a1 | 548 | # end-sanitize-chill |
7481617f | 549 | |
79337c85 | 550 | # The first rule in the file had better be this one. Don't put any above it. |
a59b94d2 | 551 | all: all.normal |
79337c85 ILT |
552 | .PHONY: all |
553 | ||
554 | # The target built for a native build. | |
555 | .PHONY: all.normal | |
556 | all.normal: \ | |
557 | $(ALL_MODULES) \ | |
558 | $(ALL_TARGET_MODULES) \ | |
46d0ca81 | 559 | $(ALL_X11_MODULES) \ |
79337c85 ILT |
560 | all-gcc |
561 | ||
0ef4728f | 562 | # Do a target for all the subdirectories. A ``make do-X'' will do a |
53222cbd RP |
563 | # ``make X'' in all subdirectories (because, in general, there is a |
564 | # dependency (below) of X upon do-X, a ``make X'' will also do this, | |
565 | # but it may do additional work as well). | |
0ef4728f ILT |
566 | # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once, |
567 | # because it is so large that it can easily overflow the command line | |
568 | # length limit on some systems. | |
79337c85 | 569 | DO_X = \ |
79337c85 ILT |
570 | do-clean \ |
571 | do-distclean \ | |
572 | do-dvi \ | |
573 | do-info \ | |
574 | do-install-info \ | |
575 | do-installcheck \ | |
576 | do-mostlyclean \ | |
753d5049 SC |
577 | do-realclean \ |
578 | do-TAGS | |
79337c85 ILT |
579 | .PHONY: $(DO_X) |
580 | $(DO_X): | |
0ef4728f | 581 | @target=`echo $@ | sed -e 's/^do-//'`; \ |
5cc73086 | 582 | r=`pwd`; export r; \ |
0ef4728f ILT |
583 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
584 | for i in $(SUBDIRS); do \ | |
36286a3e | 585 | if [ -f ./$$i/Makefile ]; then \ |
0ef4728f ILT |
586 | case $$i in \ |
587 | $(TARGET_LIBS) ) \ | |
6d681784 JG |
588 | for flag in $(EXTRA_TARGET_FLAGS); do \ |
589 | eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \ | |
590 | done; \ | |
0ef4728f ILT |
591 | ;; \ |
592 | gcc) \ | |
6d681784 JG |
593 | for flag in $(EXTRA_GCC_FLAGS); do \ |
594 | eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \ | |
595 | done; \ | |
0ef4728f ILT |
596 | ;; \ |
597 | *) \ | |
6d681784 JG |
598 | for flag in $(EXTRA_HOST_FLAGS); do \ |
599 | eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \ | |
600 | done; \ | |
0ef4728f ILT |
601 | ;; \ |
602 | esac ; \ | |
753d5049 | 603 | export AR AS CC CXX NM RANLIB; \ |
0ef4728f | 604 | if (cd ./$$i; \ |
6d681784 JG |
605 | $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ |
606 | "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \ | |
753d5049 | 607 | "RANLIB=$${RANLIB}" \ |
6d681784 | 608 | $${target}); \ |
0ef4728f ILT |
609 | then true; else exit 1; fi; \ |
610 | else true; fi; \ | |
611 | done | |
fb90daeb | 612 | |
79337c85 ILT |
613 | # Here are the targets which correspond to the do-X targets. |
614 | ||
65088029 | 615 | .PHONY: info installcheck dvi install-info |
79337c85 | 616 | .PHONY: clean distclean mostlyclean realclean local-clean local-distclean |
0ef4728f | 617 | info: do-info |
1a14993c | 618 | installcheck: do-installcheck |
0ef4728f | 619 | dvi: do-dvi |
9a9e8e7f | 620 | |
f35c6160 DZ |
621 | install-info: do-install-info dir.info |
622 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ | |
72c09fbc SC |
623 | if [ -f dir.info ] ; then \ |
624 | $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \ | |
50fbe976 | 625 | else true ; fi |
4d714963 | 626 | |
0ef4728f | 627 | local-clean: |
7fed4078 | 628 | -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E |
3b30df82 | 629 | |
0ef4728f | 630 | local-distclean: |
7fed4078 | 631 | -rm -f Makefile config.status |
7fcfdcf7 | 632 | |
0ef4728f ILT |
633 | clean: do-clean local-clean |
634 | mostlyclean: do-mostlyclean local-clean | |
635 | distclean: do-distclean local-clean local-distclean | |
636 | realclean: do-realclean local-clean local-distclean | |
637 | ||
65088029 ILT |
638 | # Check target. |
639 | ||
640 | .PHONY: check | |
641 | check: $(CHECK_MODULES) \ | |
642 | $(CHECK_TARGET_MODULES) \ | |
643 | $(CHECK_X11_MODULES) \ | |
644 | check-gcc | |
645 | ||
79337c85 | 646 | # Installation targets. |
4d714963 | 647 | |
275049c0 | 648 | .PHONY: install uninstall vault-install |
98a33b6d | 649 | install: $(INSTALL_TARGET) |
b26ff9d8 | 650 | |
79337c85 ILT |
651 | uninstall: |
652 | @echo "the uninstall target is not supported in this tree" | |
653 | ||
275049c0 JK |
654 | vault-install: |
655 | @if [ -f ./release/vault-install ] ; then \ | |
656 | ./release/vault-install $(host_alias) $(target_alias) ; \ | |
96bfa612 KR |
657 | else \ |
658 | true ; \ | |
275049c0 JK |
659 | fi |
660 | ||
79337c85 | 661 | .PHONY: install.all |
06a07944 RP |
662 | install.all: install-no-fixedincludes |
663 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 664 | r=`pwd` ; export r ; \ |
06a07944 RP |
665 | (cd ./gcc; \ |
666 | $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \ | |
667 | else \ | |
668 | true ; \ | |
669 | fi | |
5a63b336 | 670 | |
96bfa612 | 671 | # install-no-fixedincludes is used because Cygnus can not distribute |
79337c85 ILT |
672 | # the fixed header files. |
673 | .PHONY: install-no-fixedincludes | |
674 | install-no-fixedincludes: \ | |
675 | install-dirs \ | |
79337c85 ILT |
676 | $(INSTALL_MODULES) \ |
677 | $(INSTALL_TARGET_MODULES) \ | |
96bfa612 | 678 | $(INSTALL_X11_MODULES) \ |
f35c6160 | 679 | gcc-no-fixedincludes |
d1bea4c7 | 680 | |
5cc24596 | 681 | # Install the gcc headers files, but not the fixed include files, |
79337c85 ILT |
682 | # which Cygnus is not allowed to distribute. This rule is very |
683 | # dependent on the workings of the gcc Makefile.in. | |
684 | .PHONY: gcc-no-fixedincludes | |
06a07944 | 685 | gcc-no-fixedincludes: |
5cc24596 PB |
686 | @if [ -f ./gcc/Makefile ]; then \ |
687 | rm -rf gcc/tmp-include; \ | |
688 | mv gcc/include gcc/tmp-include 2>/dev/null; \ | |
689 | mkdir gcc/include; \ | |
7f9cb3b2 | 690 | cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \ |
753d5049 | 691 | touch gcc/stmp-fixinc gcc/include/fixed; \ |
a54e05f6 | 692 | rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \ |
5cc73086 | 693 | r=`pwd`; export r; \ |
5cc24596 PB |
694 | srcroot=`cd $(srcdir); pwd` ; export srcroot; \ |
695 | (cd ./gcc; \ | |
696 | $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ | |
697 | rm -rf gcc/include; \ | |
698 | mv gcc/tmp-include gcc/include 2>/dev/null; \ | |
699 | else true; fi | |
dcbfc14d | 700 | |
79337c85 ILT |
701 | # This rule is used to build the modules which use FLAGS_TO_PASS. To |
702 | # build a target all-X means to cd to X and make all. | |
703 | # all-glob is handled specially because it doesn't actually build. | |
3de70f1d | 704 | # |
055cca84 | 705 | # all-gui, and all-libproc are handled specially because |
4d802af9 MT |
706 | # they are still experimental, and if they fail to build, that |
707 | # shouldn't stop "make all". | |
055cca84 ILT |
708 | .PHONY: $(ALL_MODULES) all-glob all-gui all-libproc |
709 | $(ALL_MODULES) all-glob all-gui all-libproc: | |
79337c85 | 710 | @dir=`echo $@ | sed -e 's/all-//'`; \ |
472af17f ILT |
711 | if [ -f ./$${dir}/Makefile ] ; then \ |
712 | r=`pwd`; export r; \ | |
713 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ | |
714 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \ | |
07362bd9 | 715 | else \ |
79337c85 | 716 | true; \ |
07362bd9 DZ |
717 | fi |
718 | ||
80cbf870 ILT |
719 | # These rules are used to check the modules which use FLAGS_TO_PASS. |
720 | # To build a target check-X means to cd to X and make check. Some | |
721 | # modules are only tested in a native toolchain. | |
4f0b8f27 | 722 | |
d237841c BC |
723 | .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES) |
724 | $(NATIVE_CHECK_MODULES): | |
39cc6dae RS |
725 | @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \ |
726 | dir=`echo $@ | sed -e 's/check-//'`; \ | |
472af17f ILT |
727 | if [ -f ./$${dir}/Makefile ] ; then \ |
728 | r=`pwd`; export r; \ | |
729 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ | |
730 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ | |
731 | else \ | |
732 | true; \ | |
4f0b8f27 TL |
733 | fi; \ |
734 | fi | |
735 | ||
736 | $(CROSS_CHECK_MODULES): | |
6a42d184 DZ |
737 | @dir=`echo $@ | sed -e 's/check-//'`; \ |
738 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 739 | r=`pwd`; export r; \ |
6a42d184 DZ |
740 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
741 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \ | |
742 | else \ | |
743 | true; \ | |
744 | fi | |
745 | ||
79337c85 ILT |
746 | # This rule is used to install the modules which use FLAGS_TO_PASS. |
747 | # To build a target install-X means to cd to X and make install. | |
748 | .PHONY: $(INSTALL_MODULES) | |
749 | $(INSTALL_MODULES): install-dirs | |
750 | @dir=`echo $@ | sed -e 's/install-//'`; \ | |
751 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 752 | r=`pwd`; export r; \ |
79337c85 | 753 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
f35c6160 | 754 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ |
07362bd9 | 755 | else \ |
79337c85 | 756 | true; \ |
07362bd9 DZ |
757 | fi |
758 | ||
6a42d184 DZ |
759 | # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS. |
760 | # To build a target all-X means to cd to X and make all. | |
79337c85 ILT |
761 | .PHONY: $(ALL_TARGET_MODULES) |
762 | $(ALL_TARGET_MODULES): | |
763 | @dir=`echo $@ | sed -e 's/all-//'`; \ | |
764 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 765 | r=`pwd`; export r; \ |
79337c85 ILT |
766 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
767 | (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ | |
07362bd9 | 768 | else \ |
79337c85 | 769 | true; \ |
07362bd9 DZ |
770 | fi |
771 | ||
6a42d184 DZ |
772 | # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS. |
773 | # To build a target install-X means to cd to X and make install. | |
774 | .PHONY: $(CHECK_TARGET_MODULES) | |
775 | $(CHECK_TARGET_MODULES): | |
776 | @dir=`echo $@ | sed -e 's/check-//'`; \ | |
777 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 778 | r=`pwd`; export r; \ |
6a42d184 DZ |
779 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
780 | (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) check); \ | |
781 | else \ | |
782 | true; \ | |
783 | fi | |
784 | ||
79337c85 ILT |
785 | # This rule is used to install the modules which use |
786 | # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X | |
787 | # and make install. | |
788 | .PHONY: $(INSTALL_TARGET_MODULES) | |
789 | $(INSTALL_TARGET_MODULES): install-dirs | |
790 | @dir=`echo $@ | sed -e 's/install-//'`; \ | |
791 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 792 | r=`pwd`; export r; \ |
79337c85 ILT |
793 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
794 | (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \ | |
07362bd9 | 795 | else \ |
79337c85 | 796 | true; \ |
07362bd9 DZ |
797 | fi |
798 | ||
6a42d184 | 799 | # This rule is used to build the modules which use X11_FLAGS_TO_PASS. |
79337c85 ILT |
800 | # To build a target all-X means to cd to X and make all. |
801 | .PHONY: $(ALL_X11_MODULES) | |
802 | $(ALL_X11_MODULES): | |
803 | @dir=`echo $@ | sed -e 's/all-//'`; \ | |
804 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 805 | r=`pwd`; export r; \ |
79337c85 ILT |
806 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
807 | (cd $${dir}; \ | |
808 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \ | |
07362bd9 | 809 | else \ |
79337c85 | 810 | true; \ |
07362bd9 DZ |
811 | fi |
812 | ||
6a42d184 DZ |
813 | # This rule is used to check the modules which use X11_FLAGS_TO_PASS. |
814 | # To build a target check-X means to cd to X and make all. | |
815 | .PHONY: $(CHECK_X11_MODULES) | |
816 | $(CHECK_X11_MODULES): | |
817 | @dir=`echo $@ | sed -e 's/check-//'`; \ | |
818 | if [ -f ./$${dir}/Makefile ] ; then \ | |
5cc73086 | 819 | r=`pwd`; export r; \ |
6a42d184 DZ |
820 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
821 | (cd $${dir}; \ | |
822 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \ | |
823 | else \ | |
824 | true; \ | |
825 | fi | |
826 | ||
827 | # This rule is used to install the modules which use X11_FLAGS_TO_PASS. | |
79337c85 ILT |
828 | # To build a target install-X means to cd to X and make install. |
829 | .PHONY: $(INSTALL_X11_MODULES) | |
830 | $(INSTALL_X11_MODULES): | |
6a42d184 | 831 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
79337c85 | 832 | if [ -f ./$${dir}/Makefile ] ; then \ |
5cc73086 | 833 | r=`pwd`; export r; \ |
79337c85 ILT |
834 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
835 | (cd $${dir}; \ | |
836 | $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \ | |
07362bd9 | 837 | else \ |
79337c85 | 838 | true; \ |
07362bd9 DZ |
839 | fi |
840 | ||
79337c85 ILT |
841 | # gcc is the only module which uses GCC_FLAGS_TO_PASS. |
842 | .PHONY: all-gcc | |
843 | all-gcc: | |
844 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 845 | r=`pwd`; export r; \ |
79337c85 ILT |
846 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
847 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \ | |
07362bd9 | 848 | else \ |
79337c85 | 849 | true; \ |
07362bd9 DZ |
850 | fi |
851 | ||
65088029 ILT |
852 | .PHONY: check-gcc |
853 | check-gcc: | |
854 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 855 | r=`pwd`; export r; \ |
65088029 ILT |
856 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
857 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \ | |
858 | else \ | |
859 | true; \ | |
860 | fi | |
861 | ||
79337c85 ILT |
862 | .PHONY: install-gcc |
863 | install-gcc: | |
864 | @if [ -f ./gcc/Makefile ] ; then \ | |
5cc73086 | 865 | r=`pwd`; export r; \ |
79337c85 ILT |
866 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ |
867 | (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \ | |
07362bd9 | 868 | else \ |
79337c85 | 869 | true; \ |
07362bd9 DZ |
870 | fi |
871 | ||
753d5049 SC |
872 | |
873 | # EXPERIMENTAL STUFF | |
874 | # This rule is used to install the modules which use FLAGS_TO_PASS. | |
875 | # To build a target install-X means to cd to X and make install. | |
09985c96 SC |
876 | .PHONY: install-dosrel |
877 | install-dosrel: install-dirs info | |
753d5049 SC |
878 | @dir=`echo $@ | sed -e 's/install-//'`; \ |
879 | if [ -f ./$${dir}/Makefile ] ; then \ | |
880 | r=`pwd`; export r; \ | |
881 | srcroot=`cd $(srcdir); pwd`; export srcroot; \ | |
882 | (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \ | |
883 | else \ | |
884 | true; \ | |
885 | fi | |
886 | ||
09985c96 | 887 | install-dosrel-fake: |
a987271c | 888 | |
753d5049 | 889 | |
79337c85 | 890 | # This is a list of inter-dependencies among modules. |
65e21701 | 891 | all-autoconf: all-m4 |
79337c85 | 892 | all-bfd: |
dfe44004 | 893 | all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc |
79337c85 ILT |
894 | all-byacc: |
895 | # start-sanitize-chill | |
896 | all-chillrt: all-binutils all-gas all-gcc all-newlib | |
897 | # end-sanitize-chill | |
898 | all-cvs: | |
4d802af9 | 899 | all-dejagnu: all-tcl all-expect all-tk |
79337c85 ILT |
900 | all-diff: all-libiberty |
901 | all-emacs: | |
1d5fcc66 | 902 | all-emacs19: all-byacc |
79337c85 | 903 | all-etc: |
c6ba9ae0 | 904 | all-expect: all-tcl all-tk |
275049c0 | 905 | all-fileutils: all-libiberty |
79337c85 | 906 | all-find: |
7dcc0664 | 907 | all-flex: all-libiberty all-byacc |
79337c85 | 908 | all-gas: all-libiberty all-opcodes all-bfd |
65e21701 | 909 | all-gash: all-tcl |
79337c85 | 910 | all-gawk: |
65e21701 | 911 | all-gcc: all-libiberty all-byacc all-binutils all-gas all-pagas |
472af17f | 912 | all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-glob all-byacc all-sim all-gcc all-ld |
79337c85 ILT |
913 | all-glob: |
914 | all-gprof: all-libiberty all-bfd | |
6214eb23 | 915 | all-grep: all-libiberty |
4d802af9 | 916 | all-gui: all-gdb all-libproc all-librx |
79337c85 ILT |
917 | all-gzip: all-libiberty |
918 | all-hello: all-libiberty | |
919 | all-indent: | |
4d802af9 | 920 | all-ispell: all-emacs # all-emacs19 ??? is this needed? |
79337c85 | 921 | all-ld: all-libiberty all-bfd all-byacc all-flex |
1d5fcc66 PB |
922 | all-libg++: all-gas all-pagas all-ld all-gcc all-xiberty all-newlib \ |
923 | all-libio all-librx | |
65e21701 | 924 | all-libio: all-gas all-pagas all-ld all-gcc all-xiberty all-newlib |
79337c85 | 925 | all-libiberty: |
4be4b991 JM |
926 | all-libstdc++: all-gas all-pagas all-ld all-gcc all-xiberty all-newlib \ |
927 | all-libio | |
79337c85 ILT |
928 | all-m4: all-libiberty |
929 | all-make: all-libiberty | |
930 | all-mmalloc: | |
65e21701 | 931 | all-newlib: all-binutils all-gas all-pagas all-gcc |
275049c0 | 932 | all-opcodes: all-bfd |
79337c85 | 933 | all-patch: |
b255ccdb | 934 | all-prms: all-libiberty |
79337c85 ILT |
935 | all-rcs: |
936 | all-readline: | |
937 | all-recode: all-libiberty | |
ac259c28 JM |
938 | all-sed: all-libiberty |
939 | all-send-pr: all-prms | |
79337c85 ILT |
940 | all-shellutils: |
941 | all-sim: all-libiberty all-bfd | |
07362bd9 | 942 | all-tar: all-libiberty |
79337c85 ILT |
943 | all-tcl: |
944 | all-tclX: all-tcl all-tk | |
945 | all-tk: all-tcl | |
946 | all-texinfo: all-libiberty | |
947 | all-textutils: | |
948 | all-tgas: all-libiberty all-bfd | |
949 | all-time: | |
950 | all-wdiff: | |
951 | all-uudecode: all-libiberty | |
055cca84 | 952 | all-xiberty: all-gcc all-ld all-newlib |
07362bd9 | 953 | |
79337c85 | 954 | ### other supporting targets |
07362bd9 | 955 | |
79337c85 ILT |
956 | MAKEDIRS= \ |
957 | $(prefix) \ | |
958 | $(exec_prefix) \ | |
959 | $(tooldir) | |
fca4f908 | 960 | |
79337c85 ILT |
961 | .PHONY: install-dirs |
962 | install-dirs: | |
963 | @for i in $(MAKEDIRS) ; do \ | |
964 | echo Making $$i... ; \ | |
62cd4a20 | 965 | parent=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \ |
79337c85 ILT |
966 | if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \ |
967 | if [ ! -d $$i ] ; then \ | |
968 | if mkdir $$i ; then \ | |
969 | true ; \ | |
970 | else \ | |
971 | exit 1 ; \ | |
972 | fi ; \ | |
973 | else \ | |
974 | true ; \ | |
975 | fi ; \ | |
976 | done | |
23e3e7f9 | 977 | |
618f57a9 | 978 | |
79337c85 ILT |
979 | dir.info: do-install-info |
980 | if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \ | |
981 | $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \ | |
982 | mv -f dir.info.new dir.info ; \ | |
983 | else true ; \ | |
72c09fbc | 984 | fi |
6b7e5998 | 985 | |
b1cceba2 DZ |
986 | dist: |
987 | @echo "Building a full distribution of this tree isn't done" | |
988 | @echo "via 'make dist'. Check out the etc/ subdirectory" | |
989 | ||
eb02fd64 RP |
990 | etags tags: TAGS |
991 | ||
753d5049 SC |
992 | # Right now this just builds TAGS in each subdirectory. emacs19 has the |
993 | # ability to use several tags files at once, so there is probably no need | |
994 | # to combine them into one big TAGS file (like CVS 1.3 does). We could | |
995 | # (if we felt like it) have this Makefile write a piece of elisp which | |
996 | # the user could load to tell emacs19 where all the TAGS files we just | |
997 | # built are. | |
998 | TAGS: do-TAGS | |
eb02fd64 | 999 | |
eb02fd64 RP |
1000 | # with the gnu make, this is done automatically. |
1001 | ||
01ec9588 | 1002 | Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag) |
a26878d1 | 1003 | $(SHELL) ./config.status |
eb02fd64 | 1004 | |
11954bf1 | 1005 | # |
01ec9588 | 1006 | # Support for building net releases |
11954bf1 | 1007 | |
01ec9588 JK |
1008 | # Files in devo used in any net release. |
1009 | # ChangeLog omitted because it may refer to files which are not in this | |
1010 | # distribution (perhaps it would be better to include it anyway). | |
d94d255d | 1011 | DEVO_SUPPORT= README Makefile.in configure configure.in \ |
9823504d ILT |
1012 | config.guess config.sub config move-if-change \ |
1013 | COPYING COPYING.LIB install.sh | |
01ec9588 JK |
1014 | |
1015 | # Files in devo/etc used in any net release. | |
1016 | # ChangeLog omitted because it may refer to files which are not in this | |
1017 | # distribution (perhaps it would be better to include it anyway). | |
6d681784 | 1018 | ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \ |
275049c0 | 1019 | configure.texi standards.texi make-stds.texi |
01ec9588 | 1020 | |
40e16078 KR |
1021 | # When you use `make setup-dirs' or `make taz' you should always redefine |
1022 | # this macro. | |
1023 | SUPPORT_FILES = list-of-support-files-for-tool-in-question | |
7f9cb3b2 | 1024 | # Directories that might want `make diststuff' run. |
7166a308 | 1025 | DISTSTUFFDIRS= ld gprof gdb libg++ binutils gnats gas |
65e21701 KR |
1026 | # Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF). |
1027 | DISTBISONFILES= binutils/Makefile.in gas/Makefile.in gdb/Makefile.in | |
ea18081d | 1028 | # Directories where "info" should be built. |
a0bd8e18 | 1029 | DISTDOCDIRS= ld gprof binutils gas bfd libg++ libio gdb gnats send-pr |
40e16078 | 1030 | |
a54e05f6 KR |
1031 | .PHONY: taz |
1032 | ||
484fa12d JW |
1033 | taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \ |
1034 | texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo | |
1035 | # Make sure "diststuff" files get built properly. | |
65e21701 KR |
1036 | for f in $(DISTBISONFILES) ; do \ |
1037 | if [ -r $$f ]; then \ | |
7b636683 | 1038 | sed '/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp ; \ |
65e21701 KR |
1039 | mv -f tmp $$f ; \ |
1040 | else true; fi ; \ | |
1041 | done | |
484fa12d JW |
1042 | # Take out texinfo from a few places; make simple BISON=bison line. |
1043 | sed -e '/^all\.normal: /s/\all-texinfo //' \ | |
1044 | -e '/^ install-texinfo /d' \ | |
1045 | -e '/^BISON = /,/^$$/d' \ | |
1046 | -e '/^# BISON:/s/.*/BISON = bison -y/' \ | |
1047 | <Makefile.in >tmp | |
1048 | mv -f tmp Makefile.in | |
65e21701 | 1049 | # |
1d5fcc66 PB |
1050 | $(start-sanitize-Sanitize) |
1051 | @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ; | |
1052 | $(end-sanitize-Sanitize) | |
40e16078 | 1053 | ./configure sun4 |
484fa12d JW |
1054 | # Doc files don't change; include them in distribution. |
1055 | for f in $(DISTDOCDIRS) ; do \ | |
1056 | if [ -r $$f/Makefile ]; then \ | |
ea18081d | 1057 | (cd $$f ; $(MAKE) info) || exit 1 ; \ |
484fa12d JW |
1058 | else true ; fi ; \ |
1059 | done | |
7f9cb3b2 | 1060 | # Make links, and run "make diststuff" when needed. |
a54e05f6 KR |
1061 | # The `echo' for setting `p' is to convert all whitespace to spaces. |
1062 | # Then the `case' further below should tell whether $$d is in | |
7f9cb3b2 | 1063 | # DISTSTUFFDIRS. |
a54e05f6 | 1064 | rm -rf proto-toplev ; mkdir proto-toplev |
7f9cb3b2 KR |
1065 | set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \ |
1066 | p=" `echo $(DISTSTUFFDIRS)` " ; \ | |
a54e05f6 KR |
1067 | for d in $$dirs ; do \ |
1068 | if [ -d $$d ]; then \ | |
7f9cb3b2 KR |
1069 | case " $$p " in \ |
1070 | *" $$d "*) \ | |
1071 | echo making diststuff in $$d ; \ | |
484fa12d | 1072 | (cd $$d ; pwd ; $(MAKE) diststuff ) || exit 1 ;; \ |
a54e05f6 | 1073 | esac ; \ |
7f9cb3b2 KR |
1074 | if [ -d $$d/proto-$$d.dir ]; then \ |
1075 | ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ | |
1076 | else \ | |
1077 | ln -s ../$$d proto-toplev/$$d ; \ | |
1078 | fi ; \ | |
a54e05f6 | 1079 | else ln -s ../$$d proto-toplev/$$d ; fi ; \ |
40e16078 | 1080 | done |
5600fbd2 | 1081 | $(MAKE) distclean |
a54e05f6 | 1082 | # |
40e16078 KR |
1083 | mkdir proto-toplev/etc |
1084 | (cd proto-toplev/etc; for i in $(ETC_SUPPORT); do \ | |
1085 | ln -s ../../etc/$$i . ; \ | |
1086 | done) | |
a54e05f6 | 1087 | # |
40e16078 KR |
1088 | # Take out texinfo and glob from configurable dirs |
1089 | rm proto-toplev/configure.in | |
1090 | sed -e '/^host_tools=/s/texinfo //' \ | |
1091 | -e '/^host_libs=/s/glob //' \ | |
1092 | <configure.in >proto-toplev/configure.in | |
a54e05f6 | 1093 | # |
40e16078 KR |
1094 | mkdir proto-toplev/texinfo |
1095 | ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/ | |
7f9cb3b2 | 1096 | ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/ |
484fa12d | 1097 | ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/ |
40e16078 | 1098 | ln -s ../../texinfo/tex3patch proto-toplev/texinfo/ |
a561909f | 1099 | chmod og=u `find . -print` |
7f9cb3b2 | 1100 | (VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \ |
1d2bb445 | 1101 | echo "==> Making $(TOOL)-$$VER.tar.gz"; \ |
a59b94d2 | 1102 | rm -f $(TOOL)-$$VER; ln -s proto-toplev $(TOOL)-$$VER; \ |
40e16078 | 1103 | tar cfh - $(TOOL)-$$VER \ |
5cc73086 | 1104 | | $(GZIPPROG) -v -9 >$(TOOL)-$$VER.tar.gz ) |
40e16078 | 1105 | |
484fa12d | 1106 | TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo |
7f9cb3b2 | 1107 | DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT) |
40e16078 | 1108 | |
96bfa612 | 1109 | .PHONY: gas.tar.gz |
7f9cb3b2 | 1110 | GAS_SUPPORT_DIRS= bfd include libiberty opcodes |
96bfa612 | 1111 | gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas |
484fa12d JW |
1112 | $(MAKE) -f Makefile.in taz TOOL=gas \ |
1113 | SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" | |
40e16078 | 1114 | |
7f9cb3b2 | 1115 | # The FSF "binutils" release includes gprof and ld. |
96bfa612 | 1116 | .PHONY: binutils.tar.gz |
4be4b991 | 1117 | BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof |
96bfa612 | 1118 | binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils |
484fa12d JW |
1119 | $(MAKE) -f Makefile.in taz TOOL=binutils \ |
1120 | SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS)" | |
7f9cb3b2 | 1121 | |
96bfa612 | 1122 | .PHONY: gas+binutils.tar.gz |
a54e05f6 | 1123 | GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof |
96bfa612 | 1124 | gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas |
484fa12d JW |
1125 | $(MAKE) -f Makefile.in taz TOOL=gas \ |
1126 | SUPPORT_FILES="$(GASB_SUPPORT_DIRS)" | |
79337c85 | 1127 | |
5600fbd2 | 1128 | .PHONY: libg++.tar.gz |
1d5fcc66 | 1129 | LIBGXX_SUPPORT_DIRS=include libio librx libiberty xiberty |
5600fbd2 | 1130 | libg++.tar.gz: $(DIST_SUPPORT) libg++ |
484fa12d JW |
1131 | $(MAKE) -f Makefile.in taz TOOL=libg++ \ |
1132 | SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)" | |
5600fbd2 | 1133 | |
49dfa984 JM |
1134 | GNATS_SUPPORT_DIRS=include libiberty send-pr |
1135 | gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats | |
a0bd8e18 | 1136 | $(MAKE) -f Makefile.in taz TOOL=gnats \ |
49dfa984 JM |
1137 | SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)" |
1138 | ||
1d5fcc66 PB |
1139 | .PHONY: gdb.tar.gz |
1140 | GDB_SUPPORT_DIRS= bfd glob include libiberty mmalloc opcodes readline sim | |
1141 | gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb | |
1142 | $(MAKE) -f Makefile.in taz TOOL=gdb \ | |
1143 | SUPPORT_FILES="$(GDB_SUPPORT_DIRS)" | |
1144 | ||
7166a308 KR |
1145 | .PHONY: newlib.tar.gz |
1146 | NEWLIB_SUPPORT_DIRS= | |
1147 | newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib | |
1148 | $(MAKE) -f Makefile.in taz TOOL=newlib \ | |
1149 | SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \ | |
1150 | DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" \ | |
1151 | DISTDOCDIRS="$(DISTDOCDIRS) newlib" | |
1152 | ||
79337c85 ILT |
1153 | .NOEXPORT: |
1154 | MAKEOVERRIDES= | |
1155 | ||
1156 | # start-sanitize-chill | |
1157 | ## This is ugly, but I don't want GNU make to put these variables in | |
1158 | ## the environment. Older makes will see this as a set of targets | |
1159 | ## with no dependencies and no actions. | |
1160 | unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET : | |
1161 | # end-sanitize-chill | |
1162 | ||
eb02fd64 | 1163 | # end of Makefile.in |