* configure.in, Makefile.in: Treat tix like itcl.
[deliverable/binutils-gdb.git] / Makefile.in
1 #
2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation
4 #
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 #
19
20 srcdir = .
21
22 prefix = /usr/local
23
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
27 tooldir = $(exec_prefix)/$(target)
28
29 program_transform_name =
30
31 datadir = $(prefix)/share
32 mandir = $(prefix)/man
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
42 infodir = $(prefix)/info
43 includedir = $(prefix)/include
44 GDB_NLM_DEPS =
45
46 SHELL = /bin/sh
47
48 INSTALL = $(SHELL) $$s/install-sh -c
49 INSTALL_PROGRAM = $(INSTALL)
50 INSTALL_DATA = $(INSTALL) -m 644
51
52 INSTALL_DOSREL = install-dosrel-fake
53
54 AS = as
55 AR = ar
56 AR_FLAGS = rc
57 CC = cc
58
59 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
60 # here so that they can be overridden by Makefile fragments.
61 HOST_CC = $(CC_FOR_BUILD)
62 HOST_PREFIX =
63 HOST_PREFIX_1 = loser-
64
65 # These flag values are normally overridden by the configure script.
66 CFLAGS = -g
67 CXXFLAGS = -g -O2
68
69 LIBCFLAGS = $(CFLAGS)
70 CFLAGS_FOR_TARGET = $(CFLAGS)
71 LDFLAGS_FOR_TARGET =
72 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
73 PICFLAG =
74 PICFLAG_FOR_TARGET =
75
76 # start-sanitize-chill
77 CHILLFLAGS = $(CFLAGS)
78 CHILL_LIB = -lchill
79 # end-sanitize-chill
80 CXX = c++
81
82 # Use -O2 to stress test the compiler.
83 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
84 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
85 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
86
87 RANLIB = ranlib
88
89 DLLTOOL = dlltool
90 WINDRES = windres
91
92 NM = nm
93
94 LD = ld
95
96 # Not plain GZIP, since gzip looks there for extra command-line options.
97 GZIPPROG = gzip
98
99 # These values are substituted by configure.
100 DEFAULT_YACC = yacc
101 DEFAULT_LEX = lex
102
103 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
104 BISON = `if [ -f $$r/byacc/byacc ] ; \
105 then echo $$r/byacc/byacc ; \
106 else echo ${DEFAULT_YACC} ; \
107 fi`
108
109 LEX = `if [ -f $$r/flex/flex ] ; \
110 then echo $$r/flex/flex ; \
111 else echo ${DEFAULT_LEX} ; fi`
112
113 M4 = `if [ -f $$r/m4/m4 ] ; \
114 then echo $$r/m4/m4 ; \
115 else echo m4 ; fi`
116
117 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
118 then echo $$r/texinfo/makeinfo/makeinfo ; \
119 else echo makeinfo ; fi`
120
121 # This just becomes part of the MAKEINFO definition passed down to
122 # sub-makes. It lets flags be given on the command line while still
123 # using the makeinfo from the object tree.
124 MAKEINFOFLAGS =
125
126 EXPECT = `if [ -f $$r/expect/expect ] ; \
127 then echo $$r/expect/expect ; \
128 else echo expect ; fi`
129
130 RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
131 then echo $$s/dejagnu/runtest ; \
132 else echo runtest ; fi`
133
134
135 # compilers to use to create programs which must be run in the build
136 # environment.
137 CC_FOR_BUILD = $(CC)
138 CXX_FOR_BUILD = $(CXX)
139
140 SUBDIRS = "this is set via configure, don't edit this"
141 OTHERS =
142
143 # This is set by the configure script to the list of directories which
144 # should be built using the target tools.
145 TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
146
147 # Target libraries are put under this directory:
148 # Changed by configure to $(target_alias) if cross.
149 TARGET_SUBDIR = .
150
151 # This is set by the configure script to the arguments passed to configure.
152 CONFIG_ARGUMENTS =
153
154 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
155 # was used.
156 SET_LIB_PATH =
157
158 # This is the name of the environment variable used for the path to
159 # the libraries. This may be changed by configure.in.
160 RPATH_ENVVAR = LD_LIBRARY_PATH
161
162 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
163 REALLY_SET_LIB_PATH = \
164 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
165 export $(RPATH_ENVVAR);
166
167 ALL = all.normal
168 INSTALL_TARGET = installdirs \
169 $(INSTALL_MODULES) \
170 $(INSTALL_TARGET_MODULES) \
171 $(INSTALL_X11_MODULES) \
172 install-gcc \
173 $(INSTALL_DOSREL)
174
175
176 CC_FOR_TARGET = ` \
177 if [ -f $$r/gcc/xgcc ] ; then \
178 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
179 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
180 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
181 else \
182 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
183 fi; \
184 else \
185 echo $$r/gcc/xgcc -B$$r/gcc/; \
186 fi; \
187 else \
188 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
189 echo $(CC); \
190 else \
191 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
192 fi; \
193 fi`
194
195 # If CC_FOR_TARGET is not overriden on the command line, then this
196 # variable is passed down to the gcc Makefile, where it is used to
197 # build libgcc2.a. We define it here so that it can itself be
198 # overridden on the command line.
199 GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/
200
201 # start-sanitize-chill
202 CHILL_FOR_TARGET = ` \
203 if [ -f $$r/gcc/xgcc ] ; then \
204 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
205 else \
206 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
207 echo $(CC); \
208 else \
209 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
210 fi; \
211 fi`
212
213 # end-sanitize-chill
214
215 CXX_FOR_TARGET = ` \
216 if [ -f $$r/gcc/xgcc ] ; then \
217 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
218 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
219 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
220 else \
221 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
222 fi; \
223 else \
224 echo $$r/gcc/xgcc -B$$r/gcc/; \
225 fi; \
226 else \
227 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
228 echo $(CXX); \
229 else \
230 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
231 fi; \
232 fi`
233
234 AS_FOR_TARGET = ` \
235 if [ -f $$r/gas/as.new ] ; then \
236 echo $$r/gas/as.new ; \
237 else \
238 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
239 echo $(AS); \
240 else \
241 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
242 fi; \
243 fi`
244
245 LD_FOR_TARGET = ` \
246 if [ -f $$r/ld/ld.new ] ; then \
247 echo $$r/ld/ld.new ; \
248 else \
249 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
250 echo $(LD); \
251 else \
252 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
253 fi; \
254 fi`
255
256 DLLTOOL_FOR_TARGET = ` \
257 if [ -f $$r/binutils/dlltool ] ; then \
258 echo $$r/binutils/dlltool ; \
259 else \
260 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
261 echo $(DLLTOOL); \
262 else \
263 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
264 fi; \
265 fi`
266
267 WINDRES_FOR_TARGET = ` \
268 if [ -f $$r/binutils/windres ] ; then \
269 echo $$r/binutils/windres ; \
270 else \
271 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
272 echo $(WINDRES); \
273 else \
274 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
275 fi; \
276 fi`
277
278 AR_FOR_TARGET = ` \
279 if [ -f $$r/binutils/ar ] ; then \
280 echo $$r/binutils/ar ; \
281 else \
282 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
283 echo $(AR); \
284 else \
285 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
286 fi; \
287 fi`
288
289 RANLIB_FOR_TARGET = ` \
290 if [ -f $$r/binutils/ranlib ] ; then \
291 echo $$r/binutils/ranlib ; \
292 else \
293 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
294 echo $(RANLIB); \
295 else \
296 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
297 fi; \
298 fi`
299
300 NM_FOR_TARGET = ` \
301 if [ -f $$r/binutils/nm.new ] ; then \
302 echo $$r/binutils/nm.new ; \
303 else \
304 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
305 echo $(NM); \
306 else \
307 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
308 fi; \
309 fi`
310
311 #### host and target specific makefile fragments come in here.
312 ###
313
314 # Flags to pass down to all sub-makes.
315 # Please keep these in alphabetical order.
316 BASE_FLAGS_TO_PASS = \
317 "AR_FLAGS=$(AR_FLAGS)" \
318 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
319 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
320 "BISON=$(BISON)" \
321 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
322 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
323 "CFLAGS=$(CFLAGS)" \
324 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
325 $(start-sanitize-chill)\
326 "CHILLFLAGS=$(CHILLFLAGS)" \
327 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
328 "CHILL_LIB=$(CHILL_LIB)" \
329 $(end-sanitize-chill)\
330 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
331 "CXXFLAGS=$(CXXFLAGS)" \
332 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
333 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
334 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
335 "INSTALL=$(INSTALL)" \
336 "INSTALL_DATA=$(INSTALL_DATA)" \
337 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
338 "LDFLAGS=$(LDFLAGS)" \
339 "LEX=$(LEX)" \
340 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
341 "LIBCFLAGS=$(LIBCFLAGS)" \
342 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
343 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
344 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
345 "M4=$(M4)" \
346 "MAKE=$(MAKE)" \
347 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
348 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
349 "PICFLAG=$(PICFLAG)" \
350 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
351 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
352 "SHELL=$(SHELL)" \
353 "EXPECT=$(EXPECT)" \
354 "RUNTEST=$(RUNTEST)" \
355 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
356 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
357 "YACC=$(BISON)" \
358 "exec_prefix=$(exec_prefix)" \
359 "prefix=$(prefix)" \
360 "tooldir=$(tooldir)"
361
362 # Flags to pass down to most sub-makes, in which we're building with
363 # the host environment.
364 # If any variables are added here, they must be added to do-*, below.
365 EXTRA_HOST_FLAGS = \
366 'AR=$(AR)' \
367 'AS=$(AS)' \
368 'CC=$(CC)' \
369 'CXX=$(CXX)' \
370 'DLLTOOL=$(DLLTOOL)' \
371 'LD=$(LD)' \
372 'NM=$(NM)' \
373 'RANLIB=$(RANLIB)' \
374 'WINDRES=$(WINDRES)'
375
376 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
377
378 # Flags that are concerned with the location of the X11 include files
379 # and library files
380 #
381 # NOTE: until the top-level is getting the values via autoconf, it only
382 # causes problems to have this top-level Makefile overriding the autoconf-set
383 # values in child directories. Only variables that don't conflict with
384 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
385 #
386 X11_FLAGS_TO_PASS = \
387 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
388 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
389
390 # Flags to pass down to makes which are built with the target environment.
391 # The double $ decreases the length of the command line; the variables
392 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
393 # If any variables are added here, they must be added to do-*, below.
394 EXTRA_TARGET_FLAGS = \
395 'AR=$$(AR_FOR_TARGET)' \
396 'AS=$$(AS_FOR_TARGET)' \
397 'CC=$$(CC_FOR_TARGET)' \
398 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
399 'CXX=$$(CXX_FOR_TARGET)' \
400 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
401 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
402 'LD=$$(LD_FOR_TARGET)' \
403 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
404 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
405 'NM=$$(NM_FOR_TARGET)' \
406 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
407 'RANLIB=$$(RANLIB_FOR_TARGET)' \
408 'WINDRES=$$(WINDRES_FOR_TARGET)'
409
410 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
411
412 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
413 # unfortunately needs the native compiler and the target ar and
414 # ranlib.
415 # If any variables are added here, they must be added to do-*, below.
416 # The HOST_* variables are a special case, which are used for the gcc
417 # cross-building scheme.
418 EXTRA_GCC_FLAGS = \
419 'AR=$$(AR_FOR_TARGET)' \
420 'AS=$(AS)' \
421 'CC=$(CC)' \
422 'CXX=$(CXX)' \
423 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
424 'HOST_CC=$(CC_FOR_BUILD)' \
425 'HOST_PREFIX=$(HOST_PREFIX)' \
426 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
427 'NM=$(NM)' \
428 'RANLIB=$$(RANLIB_FOR_TARGET)' \
429 'WINDRES=$$(WINDRES_FOR_TARGET)' \
430 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
431 `if test x"$(LANGUAGES)" != x; then echo "LANGUAGES=$(LANGUAGES)"; fi` \
432 `if test x"$(STMP_FIXPROTO)" != x; then echo "STMP_FIXPROTO=$(STMP_FIXPROTO)"; fi` \
433 `if test x"$(LIMITS_H_TEST)" != x; then echo "LIMITS_H_TEST=$(LIMITS_H_TEST)"; fi` \
434 `if test x"$(LIBGCC1_TEST)" != x; then echo "LIBGCC1_TEST=$(LIBGCC1_TEST)"; fi` \
435 `if test x"$(LIBGCC2_CFLAGS)" != x; then echo "LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)"; fi` \
436 `if test x"$(LIBGCC2_DEBUG_CFLAGS)" != x; then echo "LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)"; fi` \
437 `if test x"$(LIBGCC2_INCLUDES)" != x; then echo "LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)"; fi` \
438 `if test x"$(ENQUIRE)" != x; then echo "ENQUIRE=$(ENQUIRE)"; fi` \
439 `if test x"$(BOOT_CFLAGS)" != x; then echo "BOOT_CFLAGS=$(BOOT_CFLAGS)"; fi`
440
441 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
442
443 # This is a list of the targets for all of the modules which are compiled
444 # using $(FLAGS_TO_PASS).
445 ALL_MODULES = \
446 all-apache \
447 all-autoconf \
448 all-automake \
449 all-bash \
450 all-bfd \
451 all-binutils \
452 all-byacc \
453 all-cvs \
454 all-db \
455 all-dejagnu \
456 all-diff \
457 all-dosutils \
458 all-etc \
459 all-fileutils \
460 all-findutils \
461 all-find \
462 all-flex \
463 all-gas \
464 all-gawk \
465 all-gnuserv \
466 all-gprof \
467 all-grep \
468 all-grez \
469 all-gzip \
470 all-hello \
471 $(start-sanitize-ide) \
472 all-ilu \
473 $(end-sanitize-ide) \
474 all-indent \
475 all-inet \
476 all-ispell \
477 all-itcl \
478 all-ld \
479 all-libiberty \
480 $(start-sanitize-ide) \
481 all-libide \
482 $(end-sanitize-ide) \
483 all-m4 \
484 all-make \
485 all-mmalloc \
486 all-opcodes \
487 all-patch \
488 all-perl \
489 all-prms \
490 all-rcs \
491 all-readline \
492 all-release \
493 all-recode \
494 all-sed \
495 all-send-pr \
496 all-shellutils \
497 all-sim \
498 all-sn \
499 all-tar \
500 all-tcl \
501 all-texinfo \
502 all-textutils \
503 all-tgas \
504 all-time \
505 all-tix \
506 all-uudecode \
507 $(start-sanitize-ide) \
508 all-vmake \
509 $(end-sanitize-ide) \
510 all-wdiff
511
512 # This is a list of the check targets for all of the modules which are
513 # compiled using $(FLAGS_TO_PASS).
514 #
515 # The list is in two parts. The first lists those tools which
516 # are tested as part of the host's native tool-chain, and not
517 # tested in a cross configuration.
518 NATIVE_CHECK_MODULES = \
519 check-byacc \
520 check-flex
521
522 CROSS_CHECK_MODULES = \
523 check-apache \
524 check-autoconf \
525 check-automake \
526 check-bash \
527 check-bfd \
528 check-binutils \
529 check-cvs \
530 check-db \
531 check-dejagnu \
532 check-diff \
533 check-etc \
534 check-fileutils \
535 check-findutils \
536 check-find \
537 check-gas \
538 check-gawk \
539 check-gnuserv \
540 check-gprof \
541 check-grep \
542 check-gzip \
543 check-hello \
544 $(start-sanitize-ide) \
545 check-ilu \
546 $(end-sanitize-ide) \
547 check-indent \
548 check-inet \
549 check-ispell \
550 check-itcl \
551 check-ld \
552 check-libiberty \
553 $(start-sanitize-ide) \
554 check-libide \
555 $(end-sanitize-ide) \
556 check-m4 \
557 check-make \
558 check-mmcheckoc \
559 check-opcodes \
560 check-patch \
561 check-perl \
562 check-prms \
563 check-rcs \
564 check-readline \
565 check-recode \
566 check-sed \
567 check-send-pr \
568 check-shellutils \
569 check-sn \
570 check-sim \
571 check-tar \
572 check-tcl \
573 check-texinfo \
574 check-textutils \
575 check-tgas \
576 check-time \
577 check-tix \
578 check-uudecode \
579 $(start-sanitize-ide) \
580 check-vmake \
581 $(end-sanitize-ide) \
582 check-wdiff
583
584 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
585
586 # This is a list of the install targets for all of the modules which are
587 # compiled using $(FLAGS_TO_PASS).
588 # We put install-opcodes before install-binutils because the installed
589 # binutils might be on PATH, and they might need the shared opcodes
590 # library.
591 INSTALL_MODULES = \
592 install-apache \
593 install-autoconf \
594 install-automake \
595 install-bash \
596 install-bfd \
597 install-opcodes \
598 install-binutils \
599 install-byacc \
600 install-cvs \
601 install-db \
602 install-dejagnu \
603 install-diff \
604 install-dosutils \
605 install-etc \
606 install-fileutils \
607 install-findutils \
608 install-find \
609 install-flex \
610 install-gas \
611 install-gawk \
612 install-gnuserv \
613 install-gprof \
614 install-grep \
615 install-grez \
616 install-gzip \
617 install-hello \
618 $(start-sanitize-ide) \
619 install-ilu \
620 $(end-sanitize-ide) \
621 install-indent \
622 install-inet \
623 install-ispell \
624 install-itcl \
625 install-ld \
626 install-libiberty \
627 $(start-sanitize-ide) \
628 install-libide \
629 $(end-sanitize-ide) \
630 install-m4 \
631 install-make \
632 install-mmalloc \
633 install-patch \
634 install-perl \
635 install-prms \
636 install-rcs \
637 install-readline \
638 install-recode \
639 install-sed \
640 install-send-pr \
641 install-shellutils \
642 install-sim \
643 install-sn \
644 install-tar \
645 install-tcl \
646 install-texinfo \
647 install-textutils \
648 install-tgas \
649 install-time \
650 install-tix \
651 install-uudecode \
652 $(start-sanitize-ide) \
653 install-vmake \
654 $(end-sanitize-ide) \
655 install-wdiff
656
657 # This is a list of the targets for all of the modules which are compiled
658 # using $(X11_FLAGS_TO_PASS).
659 ALL_X11_MODULES = \
660 all-emacs \
661 all-emacs19 \
662 all-gdb \
663 all-expect \
664 all-gash \
665 all-guile \
666 all-tclX \
667 all-tk
668
669 # This is a list of the check targets for all of the modules which are
670 # compiled using $(X11_FLAGS_TO_PASS).
671 CHECK_X11_MODULES = \
672 check-emacs \
673 check-gdb \
674 check-guile \
675 check-expect \
676 check-gash \
677 check-tclX
678
679 # This is a list of the install targets for all the modules which are
680 # compiled using $(X11_FLAGS_TO_PASS).
681 INSTALL_X11_MODULES = \
682 install-emacs \
683 install-emacs19 \
684 install-gdb \
685 install-guile \
686 install-expect \
687 install-gash \
688 install-tclX \
689 install-tk
690
691 # This is a list of the targets for all of the modules which are compiled
692 # using $(TARGET_FLAGS_TO_PASS).
693 ALL_TARGET_MODULES = \
694 all-target-libio \
695 all-target-libstdc++ \
696 all-target-librx \
697 all-target-libg++ \
698 all-target-newlib \
699 all-target-winsup \
700 all-target-libgloss \
701 all-target-libiberty \
702 all-target-gperf \
703 all-target-examples
704
705 # This is a list of the configure targets for all of the modules which
706 # are compiled using the target tools.
707 CONFIGURE_TARGET_MODULES = \
708 configure-target-libio \
709 configure-target-libstdc++ \
710 configure-target-librx \
711 configure-target-libg++ \
712 configure-target-newlib \
713 configure-target-winsup \
714 configure-target-libgloss \
715 configure-target-libiberty \
716 configure-target-gperf \
717 configure-target-examples
718
719 # This is a list of the check targets for all of the modules which are
720 # compiled using $(TARGET_FLAGS_TO_PASS).
721 CHECK_TARGET_MODULES = \
722 check-target-libio \
723 check-target-libstdc++ \
724 check-target-libg++ \
725 check-target-newlib \
726 check-target-winsup \
727 check-target-libiberty \
728 check-target-gperf
729
730 # This is a list of the install targets for all of the modules which are
731 # compiled using $(TARGET_FLAGS_TO_PASS).
732 INSTALL_TARGET_MODULES = \
733 install-target-libio \
734 install-target-libstdc++ \
735 install-target-libg++ \
736 install-target-newlib \
737 install-target-winsup \
738 install-target-libgloss \
739 install-target-libiberty \
740 install-target-gperf
741
742 # This is a list of the targets for which we can do a clean-{target}.
743 CLEAN_MODULES = \
744 clean-apache \
745 clean-autoconf \
746 clean-automake \
747 clean-bash \
748 clean-bfd \
749 clean-binutils \
750 clean-byacc \
751 clean-cvs \
752 clean-db \
753 clean-dejagnu \
754 clean-diff \
755 clean-dosutils \
756 clean-etc \
757 clean-fileutils \
758 clean-findutils \
759 clean-find \
760 clean-flex \
761 clean-gas \
762 clean-gawk \
763 clean-gnuserv \
764 clean-gprof \
765 clean-grep \
766 clean-grez \
767 clean-gzip \
768 clean-hello \
769 $(start-sanitize-ide) \
770 clean-ilu \
771 $(end-sanitize-ide) \
772 clean-indent \
773 clean-inet \
774 clean-ispell \
775 clean-itcl \
776 clean-ld \
777 clean-libiberty \
778 $(start-sanitize-ide) \
779 clean-libide \
780 $(end-sanitize-ide) \
781 clean-m4 \
782 clean-make \
783 clean-mmalloc \
784 clean-opcodes \
785 clean-patch \
786 clean-perl \
787 clean-prms \
788 clean-rcs \
789 clean-readline \
790 clean-release \
791 clean-recode \
792 clean-sed \
793 clean-send-pr \
794 clean-shellutils \
795 clean-sim \
796 clean-sn \
797 clean-tar \
798 clean-tcl \
799 clean-texinfo \
800 clean-textutils \
801 clean-tgas \
802 clean-time \
803 clean-tix \
804 clean-uudecode \
805 $(start-sanitize-ide) \
806 clean-vmake \
807 $(end-sanitize-ide) \
808 clean-wdiff
809
810 # All of the target modules that can be cleaned
811 CLEAN_TARGET_MODULES = \
812 clean-target-libio \
813 clean-target-libstdc++ \
814 clean-target-librx \
815 clean-target-libg++ \
816 clean-target-newlib \
817 clean-target-winsup \
818 clean-target-libgloss \
819 clean-target-libiberty \
820 clean-target-gperf \
821 clean-target-examples
822
823 # All of the x11 modules that can be cleaned
824 CLEAN_X11_MODULES = \
825 clean-emacs \
826 clean-emacs19 \
827 clean-gdb \
828 clean-expect \
829 clean-gash \
830 clean-guile \
831 clean-tclX \
832 clean-tk
833
834 # The first rule in the file had better be this one. Don't put any above it.
835 all: all.normal
836 .PHONY: all
837
838 # The target built for a native build.
839 .PHONY: all.normal
840 all.normal: \
841 $(ALL_MODULES) \
842 $(ALL_X11_MODULES) \
843 $(ALL_TARGET_MODULES) \
844 all-gcc
845
846 # Do a target for all the subdirectories. A ``make do-X'' will do a
847 # ``make X'' in all subdirectories (because, in general, there is a
848 # dependency (below) of X upon do-X, a ``make X'' will also do this,
849 # but it may do additional work as well).
850 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
851 # because it is so large that it can easily overflow the command line
852 # length limit on some systems.
853 DO_X = \
854 do-clean \
855 do-distclean \
856 do-dvi \
857 do-info \
858 do-install-info \
859 do-installcheck \
860 do-mostlyclean \
861 do-maintainer-clean \
862 do-TAGS
863 .PHONY: $(DO_X)
864 $(DO_X):
865 @target=`echo $@ | sed -e 's/^do-//'`; \
866 r=`pwd`; export r; \
867 s=`cd $(srcdir); pwd`; export s; \
868 $(SET_LIB_PATH) \
869 for i in $(SUBDIRS) -dummy-; do \
870 if [ -f ./$$i/Makefile ]; then \
871 case $$i in \
872 gcc) \
873 for flag in $(EXTRA_GCC_FLAGS); do \
874 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
875 done; \
876 ;; \
877 *) \
878 for flag in $(EXTRA_HOST_FLAGS); do \
879 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
880 done; \
881 ;; \
882 esac ; \
883 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
884 if (cd ./$$i; \
885 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
886 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
887 "RANLIB=$${RANLIB}" \
888 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
889 $${target}); \
890 then true; else exit 1; fi; \
891 else true; fi; \
892 done
893 @target=`echo $@ | sed -e 's/^do-//'`; \
894 r=`pwd`; export r; \
895 s=`cd $(srcdir); pwd`; export s; \
896 $(SET_LIB_PATH) \
897 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
898 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
899 for flag in $(EXTRA_TARGET_FLAGS); do \
900 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
901 done; \
902 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
903 if (cd $(TARGET_SUBDIR)/$$i; \
904 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
905 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
906 "RANLIB=$${RANLIB}" \
907 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
908 $${target}); \
909 then true; else exit 1; fi; \
910 else true; fi; \
911 done
912
913 # Here are the targets which correspond to the do-X targets.
914
915 .PHONY: info installcheck dvi install-info
916 .PHONY: clean distclean mostlyclean maintainer-clean realclean
917 .PHONY: local-clean local-distclean local-maintainer-clean
918 info: do-info
919 installcheck: do-installcheck
920 dvi: do-dvi
921
922 # Make sure makeinfo is built before we do a `make info'.
923 do-info: all-texinfo
924
925 install-info: do-install-info dir.info
926 s=`cd $(srcdir); pwd`; export s; \
927 if [ -f dir.info ] ; then \
928 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
929 else true ; fi
930
931 local-clean:
932 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
933
934 local-distclean:
935 -rm -f Makefile config.status config.cache
936 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
937 rm -rf $(TARGET_SUBDIR); \
938 else true; fi
939
940 local-maintainer-clean:
941 @echo "This command is intended for maintainers to use;"
942 @echo "it deletes files that may require special tools to rebuild."
943
944 clean: do-clean local-clean
945 mostlyclean: do-mostlyclean local-clean
946 distclean: do-distclean local-clean local-distclean
947 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
948 maintainer-clean: local-distclean
949 realclean: maintainer-clean
950
951 # This rule is used to clean specific modules.
952 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
953 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
954 @dir=`echo $@ | sed -e 's/clean-//'`; \
955 if [ -f ./$${dir}/Makefile ] ; then \
956 r=`pwd`; export r; \
957 s=`cd $(srcdir); pwd`; export s; \
958 $(SET_LIB_PATH) \
959 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
960 else \
961 true; \
962 fi
963
964 .PHONY: $(CLEAN_TARGET_MODULES)
965 $(CLEAN_TARGET_MODULES):
966 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
967 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
968 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
969 r=`pwd`; export r; \
970 s=`cd $(srcdir); pwd`; export s; \
971 $(SET_LIB_PATH) \
972 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
973 else \
974 true; \
975 fi
976
977 clean-target: $(CLEAN_TARGET_MODULES)
978
979 # Check target.
980
981 .PHONY: check
982 check: $(CHECK_MODULES) \
983 $(CHECK_TARGET_MODULES) \
984 $(CHECK_X11_MODULES) \
985 check-gcc
986
987 # Installation targets.
988
989 .PHONY: install uninstall source-vault binary-vault vault-install
990 install: $(INSTALL_TARGET)
991
992 uninstall:
993 @echo "the uninstall target is not supported in this tree"
994
995 source-vault:
996 $(MAKE) -f ./release/Build-A-Release \
997 host=$(host_alias) source-vault
998
999 binary-vault:
1000 $(MAKE) -f ./release/Build-A-Release \
1001 host=$(host_alias) target=$(target_alias)
1002
1003 vault-install:
1004 @if [ -f ./release/vault-install ] ; then \
1005 ./release/vault-install $(host_alias) $(target_alias) ; \
1006 else \
1007 true ; \
1008 fi
1009
1010 .PHONY: install.all
1011 install.all: install-no-fixedincludes
1012 @if [ -f ./gcc/Makefile ] ; then \
1013 r=`pwd` ; export r ; \
1014 $(SET_LIB_PATH) \
1015 (cd ./gcc; \
1016 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1017 else \
1018 true ; \
1019 fi
1020
1021 # inet-install is used because the I*Net wants DejaGNU installed but
1022 # not built. Similarly, gzip is built but not installed.
1023 inet-install:
1024 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1025
1026 # install-no-fixedincludes is used because Cygnus can not distribute
1027 # the fixed header files.
1028 .PHONY: install-no-fixedincludes
1029 install-no-fixedincludes: \
1030 installdirs \
1031 $(INSTALL_MODULES) \
1032 $(INSTALL_TARGET_MODULES) \
1033 $(INSTALL_X11_MODULES) \
1034 gcc-no-fixedincludes
1035
1036 # Install the gcc headers files, but not the fixed include files,
1037 # which Cygnus is not allowed to distribute. This rule is very
1038 # dependent on the workings of the gcc Makefile.in.
1039 .PHONY: gcc-no-fixedincludes
1040 gcc-no-fixedincludes:
1041 @if [ -f ./gcc/Makefile ]; then \
1042 rm -rf gcc/tmp-include; \
1043 mv gcc/include gcc/tmp-include 2>/dev/null; \
1044 mkdir gcc/include; \
1045 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1046 touch gcc/stmp-fixinc gcc/include/fixed; \
1047 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1048 r=`pwd`; export r; \
1049 s=`cd $(srcdir); pwd` ; export s; \
1050 $(SET_LIB_PATH) \
1051 (cd ./gcc; \
1052 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1053 rm -rf gcc/include; \
1054 mv gcc/tmp-include gcc/include 2>/dev/null; \
1055 else true; fi
1056
1057 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1058 # build a target all-X means to cd to X and make all.
1059 #
1060 # all-gui, and all-libproc are handled specially because
1061 # they are still experimental, and if they fail to build, that
1062 # shouldn't stop "make all".
1063 .PHONY: $(ALL_MODULES) all-gui all-libproc
1064 $(ALL_MODULES) all-gui all-libproc:
1065 @dir=`echo $@ | sed -e 's/all-//'`; \
1066 if [ -f ./$${dir}/Makefile ] ; then \
1067 r=`pwd`; export r; \
1068 s=`cd $(srcdir); pwd`; export s; \
1069 $(SET_LIB_PATH) \
1070 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1071 else \
1072 true; \
1073 fi
1074
1075 # These rules are used to check the modules which use FLAGS_TO_PASS.
1076 # To build a target check-X means to cd to X and make check. Some
1077 # modules are only tested in a native toolchain.
1078
1079 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1080 $(NATIVE_CHECK_MODULES):
1081 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1082 dir=`echo $@ | sed -e 's/check-//'`; \
1083 if [ -f ./$${dir}/Makefile ] ; then \
1084 r=`pwd`; export r; \
1085 s=`cd $(srcdir); pwd`; export s; \
1086 $(SET_LIB_PATH) \
1087 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1088 else \
1089 true; \
1090 fi; \
1091 fi
1092
1093 $(CROSS_CHECK_MODULES):
1094 @dir=`echo $@ | sed -e 's/check-//'`; \
1095 if [ -f ./$${dir}/Makefile ] ; then \
1096 r=`pwd`; export r; \
1097 s=`cd $(srcdir); pwd`; export s; \
1098 $(SET_LIB_PATH) \
1099 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1100 else \
1101 true; \
1102 fi
1103
1104 # This rule is used to install the modules which use FLAGS_TO_PASS.
1105 # To build a target install-X means to cd to X and make install.
1106 .PHONY: $(INSTALL_MODULES)
1107 $(INSTALL_MODULES): installdirs
1108 @dir=`echo $@ | sed -e 's/install-//'`; \
1109 if [ -f ./$${dir}/Makefile ] ; then \
1110 r=`pwd`; export r; \
1111 s=`cd $(srcdir); pwd`; export s; \
1112 $(SET_LIB_PATH) \
1113 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1114 else \
1115 true; \
1116 fi
1117
1118 # This rule is used to configure the modules which are built with the
1119 # target tools.
1120 .PHONY: $(CONFIGURE_TARGET_MODULES)
1121 $(CONFIGURE_TARGET_MODULES):
1122 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1123 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1124 r=`pwd`; export r; \
1125 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1126 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1127 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1128 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1129 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1130 else \
1131 echo "Multilibs changed for $${dir}, reconfiguring"; \
1132 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1133 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1134 fi; \
1135 else \
1136 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1137 fi; \
1138 fi; \
1139 fi; exit 0 # break command into two pieces
1140 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1141 if [ ! -d $(TARGET_SUBDIR) ]; then \
1142 true; \
1143 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1144 true; \
1145 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1146 if [ -d $(srcdir)/$${dir} ]; then \
1147 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1148 r=`pwd`; export r; \
1149 s=`cd $(srcdir); pwd`; export s; \
1150 $(SET_LIB_PATH) \
1151 AR="$(AR_FOR_TARGET)"; export AR; \
1152 AS="$(AS_FOR_TARGET)"; export AS; \
1153 CC="$(CC_FOR_TARGET)"; export CC; \
1154 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1155 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1156 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1157 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1158 LD="$(LD_FOR_TARGET)"; export LD; \
1159 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1160 NM="$(NM_FOR_TARGET)"; export NM; \
1161 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1162 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1163 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1164 cd $(TARGET_SUBDIR)/$${dir}; \
1165 case $(srcdir) in \
1166 /*) \
1167 topdir=$(srcdir) ;; \
1168 *) \
1169 case "$(TARGET_SUBDIR)" in \
1170 .) topdir="../$(srcdir)" ;; \
1171 *) topdir="../../$(srcdir)" ;; \
1172 esac ;; \
1173 esac; \
1174 if [ "$(srcdir)" = "." ] ; then \
1175 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1176 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1177 if [ -f Makefile ]; then \
1178 if $(MAKE) distclean; then \
1179 true; \
1180 else \
1181 exit 1; \
1182 fi; \
1183 else \
1184 true; \
1185 fi; \
1186 else \
1187 exit 1; \
1188 fi; \
1189 else \
1190 true; \
1191 fi; \
1192 srcdiroption="--srcdir=."; \
1193 libsrcdir="."; \
1194 else \
1195 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1196 libsrcdir="$$s/$${dir}"; \
1197 fi; \
1198 if [ -f $${libsrcdir}/configure ] ; then \
1199 $(SHELL) $${libsrcdir}/configure \
1200 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1201 --with-target-subdir="$(TARGET_SUBDIR)"; \
1202 else \
1203 $(SHELL) $$s/configure \
1204 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1205 --with-target-subdir="$(TARGET_SUBDIR)"; \
1206 fi; \
1207 else \
1208 true; \
1209 fi; \
1210 else \
1211 true; \
1212 fi
1213
1214 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1215 # To build a target all-X means to cd to X and make all.
1216 .PHONY: $(ALL_TARGET_MODULES)
1217 $(ALL_TARGET_MODULES):
1218 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1219 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1220 r=`pwd`; export r; \
1221 s=`cd $(srcdir); pwd`; export s; \
1222 $(SET_LIB_PATH) \
1223 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1224 else \
1225 true; \
1226 fi
1227
1228 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1229 # To build a target install-X means to cd to X and make install.
1230 .PHONY: $(CHECK_TARGET_MODULES)
1231 $(CHECK_TARGET_MODULES):
1232 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1233 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1234 r=`pwd`; export r; \
1235 s=`cd $(srcdir); pwd`; export s; \
1236 $(SET_LIB_PATH) \
1237 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1238 else \
1239 true; \
1240 fi
1241
1242 # This rule is used to install the modules which use
1243 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1244 # and make install.
1245 .PHONY: $(INSTALL_TARGET_MODULES)
1246 $(INSTALL_TARGET_MODULES): installdirs
1247 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1248 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1249 r=`pwd`; export r; \
1250 s=`cd $(srcdir); pwd`; export s; \
1251 $(SET_LIB_PATH) \
1252 (cd $(TARGET_SUBDIR)/$${dir}; \
1253 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1254 else \
1255 true; \
1256 fi
1257
1258 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1259 # To build a target all-X means to cd to X and make all.
1260 .PHONY: $(ALL_X11_MODULES)
1261 $(ALL_X11_MODULES):
1262 @dir=`echo $@ | sed -e 's/all-//'`; \
1263 if [ -f ./$${dir}/Makefile ] ; then \
1264 r=`pwd`; export r; \
1265 s=`cd $(srcdir); pwd`; export s; \
1266 $(SET_LIB_PATH) \
1267 (cd $${dir}; \
1268 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1269 else \
1270 true; \
1271 fi
1272
1273 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1274 # To build a target check-X means to cd to X and make all.
1275 .PHONY: $(CHECK_X11_MODULES)
1276 $(CHECK_X11_MODULES):
1277 @dir=`echo $@ | sed -e 's/check-//'`; \
1278 if [ -f ./$${dir}/Makefile ] ; then \
1279 r=`pwd`; export r; \
1280 s=`cd $(srcdir); pwd`; export s; \
1281 $(SET_LIB_PATH) \
1282 (cd $${dir}; \
1283 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1284 else \
1285 true; \
1286 fi
1287
1288 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1289 # To build a target install-X means to cd to X and make install.
1290 .PHONY: $(INSTALL_X11_MODULES)
1291 $(INSTALL_X11_MODULES):
1292 @dir=`echo $@ | sed -e 's/install-//'`; \
1293 if [ -f ./$${dir}/Makefile ] ; then \
1294 r=`pwd`; export r; \
1295 s=`cd $(srcdir); pwd`; export s; \
1296 $(SET_LIB_PATH) \
1297 (cd $${dir}; \
1298 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1299 else \
1300 true; \
1301 fi
1302
1303 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1304 .PHONY: all-gcc
1305 all-gcc:
1306 @if [ -f ./gcc/Makefile ] ; then \
1307 r=`pwd`; export r; \
1308 s=`cd $(srcdir); pwd`; export s; \
1309 $(SET_LIB_PATH) \
1310 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1311 else \
1312 true; \
1313 fi
1314
1315 .PHONY: all-bootstrap
1316 all-bootstrap:
1317 @if [ -f ./gcc/Makefile ] ; then \
1318 r=`pwd`; export r; \
1319 s=`cd $(srcdir); pwd`; export s; \
1320 $(SET_LIB_PATH) \
1321 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
1322 else \
1323 true; \
1324 fi
1325
1326 .PHONY: check-gcc
1327 check-gcc:
1328 @if [ -f ./gcc/Makefile ] ; then \
1329 r=`pwd`; export r; \
1330 s=`cd $(srcdir); pwd`; export s; \
1331 $(SET_LIB_PATH) \
1332 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1333 else \
1334 true; \
1335 fi
1336
1337 .PHONY: install-gcc
1338 install-gcc:
1339 @if [ -f ./gcc/Makefile ] ; then \
1340 r=`pwd`; export r; \
1341 s=`cd $(srcdir); pwd`; export s; \
1342 $(SET_LIB_PATH) \
1343 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1344 else \
1345 true; \
1346 fi
1347
1348
1349 # EXPERIMENTAL STUFF
1350 # This rule is used to install the modules which use FLAGS_TO_PASS.
1351 # To build a target install-X means to cd to X and make install.
1352 .PHONY: install-dosrel
1353 install-dosrel: installdirs info
1354 @dir=`echo $@ | sed -e 's/install-//'`; \
1355 if [ -f ./$${dir}/Makefile ] ; then \
1356 r=`pwd`; export r; \
1357 s=`cd $(srcdir); pwd`; export s; \
1358 $(SET_LIB_PATH) \
1359 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1360 else \
1361 true; \
1362 fi
1363
1364 install-dosrel-fake:
1365
1366
1367 # This is a list of inter-dependencies among modules.
1368 all-apache:
1369 all-autoconf: all-m4
1370 all-automake:
1371 all-bash:
1372 all-bfd:
1373 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
1374 all-byacc:
1375 all-cvs:
1376 all-db:
1377 all-dejagnu: all-tcl all-expect all-tk
1378 all-diff: all-libiberty
1379 all-emacs:
1380 all-emacs19: all-byacc
1381 all-etc:
1382 configure-target-examples: $(ALL_GCC)
1383 all-target-examples: configure-target-examples
1384 all-expect: all-tcl all-tk
1385 all-fileutils: all-libiberty
1386 all-findutils:
1387 all-find:
1388 all-flex: all-libiberty all-byacc
1389 all-gas: all-libiberty all-opcodes all-bfd
1390 all-gash: all-tcl
1391 all-gawk:
1392 ALL_GCC = all-gcc
1393 all-gcc: all-byacc all-binutils all-gas all-ld
1394 all-bootstrap: all-libiberty all-byacc all-binutils all-gas all-ld
1395 GDB_TK = all-tk all-tcl
1396 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1397 all-gnuserv:
1398 configure-target-gperf: $(ALL_GCC)
1399 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libg++
1400 all-gprof: all-libiberty all-bfd all-opcodes
1401 all-grep: all-libiberty
1402 all-grez: all-libiberty all-bfd all-opcodes
1403 all-gui: all-gdb all-libproc all-target-librx
1404 all-guile:
1405 all-gzip: all-libiberty
1406 all-hello: all-libiberty
1407 # start-sanitize-ide
1408 all-ilu:
1409 # end-sanitize-ide
1410 all-indent:
1411 all-inet: all-tcl all-send-pr all-perl
1412 all-ispell: all-emacs19
1413 all-itcl: all-tcl all-tk
1414 all-ld: all-libiberty all-bfd all-opcodes all-byacc all-flex
1415 configure-target-libg++: $(ALL_GCC) configure-target-librx
1416 all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++
1417 configure-target-libgloss: $(ALL_GCC)
1418 all-target-libgloss: configure-target-libgloss configure-target-newlib
1419 configure-target-libio: $(ALL_GCC)
1420 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1421 all-libiberty:
1422 # start-sanitize-ide
1423 all-libide: all-tcl all-tk all-itcl all-ilu
1424 # end-sanitize-ide
1425 configure-target-librx: $(ALL_GCC) configure-target-newlib
1426 all-target-librx: configure-target-librx
1427 configure-target-libstdc++: $(ALL_GCC)
1428 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1429 all-m4: all-libiberty
1430 all-make: all-libiberty
1431 all-mmalloc:
1432 configure-target-newlib: $(ALL_GCC)
1433 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1434 all-opcodes: all-bfd all-libiberty
1435 all-patch: all-libiberty
1436 all-perl:
1437 all-prms: all-libiberty
1438 all-rcs:
1439 all-readline:
1440 all-recode: all-libiberty
1441 all-sed: all-libiberty
1442 all-send-pr: all-prms
1443 all-shellutils:
1444 all-sim: all-libiberty all-bfd all-opcodes
1445 all-sn: all-tcl all-tk all-itcl all-db all-grep
1446 all-tar: all-libiberty
1447 all-tcl:
1448 all-tclX: all-tcl all-tk
1449 all-tk: all-tcl
1450 all-texinfo: all-libiberty
1451 all-textutils:
1452 all-tgas: all-libiberty all-bfd all-opcodes
1453 all-time:
1454 all-tix: all-tcl all-tk
1455 # start-sanitize-ide
1456 all-vmake: all-tcl all-tk all-itcl all-libide
1457 # end-sanitize-ide
1458 all-wdiff:
1459 all-target-winsup: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
1460 configure-target-winsup: configure-target-newlib
1461 all-uudecode: all-libiberty
1462 configure-target-libiberty: $(ALL_GCC)
1463 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1464 all-target: $(ALL_TARGET_MODULES)
1465 install-target: $(INSTALL_TARGET_MODULES)
1466
1467 ### other supporting targets
1468
1469 MAKEDIRS= \
1470 $(prefix) \
1471 $(exec_prefix)
1472 .PHONY: installdirs
1473 installdirs: mkinstalldirs
1474 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1475
1476 dir.info: do-install-info
1477 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1478 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1479 mv -f dir.info.new dir.info ; \
1480 else true ; \
1481 fi
1482
1483 dist:
1484 @echo "Building a full distribution of this tree isn't done"
1485 @echo "via 'make dist'. Check out the etc/ subdirectory"
1486
1487 etags tags: TAGS
1488
1489 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1490 # ability to use several tags files at once, so there is probably no need
1491 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1492 # (if we felt like it) have this Makefile write a piece of elisp which
1493 # the user could load to tell emacs19 where all the TAGS files we just
1494 # built are.
1495 TAGS: do-TAGS
1496
1497 # with the gnu make, this is done automatically.
1498
1499 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
1500 $(SHELL) ./config.status
1501
1502 #
1503 # Support for building net releases
1504
1505 # Files in devo used in any net release.
1506 # ChangeLog omitted because it may refer to files which are not in this
1507 # distribution (perhaps it would be better to include it anyway).
1508 DEVO_SUPPORT= README Makefile.in configure configure.in \
1509 config.guess config.sub config move-if-change \
1510 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1511 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1512 mkinstalldirs
1513
1514 # Files in devo/etc used in any net release.
1515 # ChangeLog omitted because it may refer to files which are not in this
1516 # distribution (perhaps it would be better to include it anyway).
1517 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1518 make-stds.texi standards.info*
1519
1520 # When you use `make setup-dirs' or `make taz' you should always redefine
1521 # this macro.
1522 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1523
1524 .PHONY: taz
1525
1526 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1527 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1528 # Take out texinfo from a few places; make simple BISON=bison line.
1529 sed -e '/^all\.normal: /s/\all-texinfo //' \
1530 -e '/^ install-texinfo /d' \
1531 -e '/^BISON = `if/,/^$$/d' \
1532 -e '/^# BISON:/s/.*/BISON = $(DEFAULT_YACC)/' \
1533 <Makefile.in >tmp
1534 mv -f tmp Makefile.in
1535 #
1536 $(start-sanitize-Sanitize)
1537 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1538 $(end-sanitize-Sanitize)
1539 ./configure sun4
1540 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1541 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1542 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1543 # Make links, and run "make diststuff" or "make info" when needed.
1544 rm -rf proto-toplev ; mkdir proto-toplev
1545 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1546 for d in $$dirs ; do \
1547 if [ -d $$d ]; then \
1548 if [ ! -f $$d/Makefile ] ; then true ; \
1549 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1550 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1551 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1552 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1553 fi ; \
1554 if [ -d $$d/proto-$$d.dir ]; then \
1555 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1556 else \
1557 ln -s ../$$d proto-toplev/$$d ; \
1558 fi ; \
1559 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1560 done
1561 cd etc ; $(MAKE) info
1562 $(MAKE) distclean
1563 #
1564 mkdir proto-toplev/etc
1565 (cd proto-toplev/etc; \
1566 for i in $(ETC_SUPPORT); do \
1567 ln -s ../../etc/$$i . ; \
1568 done)
1569 #
1570 # Take out texinfo from configurable dirs
1571 rm proto-toplev/configure.in
1572 sed -e '/^host_tools=/s/texinfo //' \
1573 <configure.in >proto-toplev/configure.in
1574 #
1575 mkdir proto-toplev/texinfo
1576 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1577 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1578 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1579 if test -r texinfo/util/tex3patch ; then \
1580 mkdir proto-toplev/texinfo/util && \
1581 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1582 else true; fi
1583 chmod og=u `find . -print`
1584 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) \
1585 VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`
1586
1587 do-tar-gz:
1588 echo "==> Making $(TOOL)-$(VER).tar.gz"
1589 -rm -f $(TOOL)-$(VER)
1590 ln -s proto-toplev $(TOOL)-$(VER)
1591 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1592 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
1593
1594 TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1595 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1596
1597 .PHONY: gas.tar.gz
1598 GAS_SUPPORT_DIRS= bfd include libiberty opcodes setup.com makefile.vms
1599 gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1600 $(MAKE) -f Makefile.in taz TOOL=gas \
1601 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1602
1603 # The FSF "binutils" release includes gprof and ld.
1604 .PHONY: binutils.tar.gz
1605 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof setup.com makefile.vms
1606 binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1607 $(MAKE) -f Makefile.in taz TOOL=binutils \
1608 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1609
1610 .PHONY: gas+binutils.tar.gz
1611 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1612 gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1613 $(MAKE) -f Makefile.in taz TOOL=gas \
1614 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1615
1616 .PHONY: libg++.tar.gz
1617 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1618 libg++.tar.gz: $(DIST_SUPPORT) libg++
1619 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1620 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1621
1622 GNATS_SUPPORT_DIRS=include libiberty send-pr
1623 gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1624 $(MAKE) -f Makefile.in taz TOOL=gnats \
1625 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1626
1627 .PHONY: gdb.tar.gz
1628 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
1629 GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1630 gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1631 $(MAKE) -f Makefile.in taz TOOL=gdb \
1632 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1633
1634 .PHONY: newlib.tar.gz
1635 NEWLIB_SUPPORT_DIRS=libgloss
1636 # taz configures for the sun4 target which won't configure newlib.
1637 # We need newlib configured so that the .info files are made.
1638 # Unfortunately, it is not enough to just configure newlib separately:
1639 # taz will build the .info files but since SUBDIRS won't contain newlib,
1640 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1641 # used in building the .info files, eg: *.def, *.ref).
1642 # The problem isn't solvable however without a lot of extra work because
1643 # target libraries are built in subdir $(target_alias) which gets nuked during
1644 # the make distclean. For now punt on the issue of shipping newlib info files
1645 # with newlib net releases and wait for a day when some native target (sun4?)
1646 # supports newlib (if only minimally).
1647 newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1648 $(MAKE) -f Makefile.in taz TOOL=newlib \
1649 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1650 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1651
1652 .NOEXPORT:
1653 MAKEOVERRIDES=
1654
1655 # start-sanitize-chill
1656 ## This is ugly, but I don't want GNU make to put these variables in
1657 ## the environment. Older makes will see this as a set of targets
1658 ## with no dependencies and no actions.
1659 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1660 # end-sanitize-chill
1661
1662 # end of Makefile.in
This page took 0.087892 seconds and 5 git commands to generate.