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