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