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