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