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