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