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