2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
4 # Free Software Foundation
6 # This file is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 exec_prefix = $(prefix)
26 bindir=${exec_prefix}/bin
27 sbindir
=${exec_prefix}/sbin
28 libexecdir
=${exec_prefix}/libexec
29 datadir=${prefix}/share
30 sysconfdir
=${prefix}/etc
31 sharedstatedir
=${prefix}/com
32 localstatedir
=${prefix}/var
33 libdir=${exec_prefix}/lib
34 includedir=${prefix}/include
35 oldincludedir=/usr
/include
36 infodir=${prefix}/info
39 tooldir
= $(exec_prefix)/$(target
)
41 program_transform_name
=
43 man1dir = $(mandir)/man1
44 man2dir = $(mandir)/man2
45 man3dir = $(mandir)/man3
46 man4dir = $(mandir)/man4
47 man5dir = $(mandir)/man5
48 man6dir = $(mandir)/man6
49 man7dir = $(mandir)/man7
50 man8dir = $(mandir)/man8
51 man9dir = $(mandir)/man9
56 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
58 INSTALL_PROGRAM_ARGS
=
60 INSTALL
= $(SHELL
) $$s/install-sh
-c
61 INSTALL_PROGRAM
= $(INSTALL
) $(INSTALL_PROGRAM_ARGS
)
62 INSTALL_SCRIPT
= $(INSTALL
)
63 INSTALL_DATA
= $(INSTALL
) -m
644
65 INSTALL_DOSREL
= install-dosrel-fake
72 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
73 # here so that they can be overridden by Makefile fragments.
74 HOST_CC
= $(CC_FOR_BUILD
)
76 HOST_PREFIX_1
= loser-
78 # These flag values are normally overridden by the configure script.
83 CFLAGS_FOR_TARGET
= $(CFLAGS
)
85 LIBCFLAGS_FOR_TARGET
= $(CFLAGS_FOR_TARGET
)
89 # start-sanitize-chill
90 CHILLFLAGS
= $(CFLAGS
)
95 # Use -O2 to stress test the compiler.
96 LIBCXXFLAGS
= $(CXXFLAGS
) -fno-implicit-templates
97 CXXFLAGS_FOR_TARGET
= $(CXXFLAGS
)
98 LIBCXXFLAGS_FOR_TARGET
= $(CXXFLAGS_FOR_TARGET
) -fno-implicit-templates
109 # Not plain GZIP, since gzip looks there for extra command-line options.
112 # These values are substituted by configure.
116 BISON
= `if [ -f $$r/bison/bison ] ; then \
117 echo $$r/bison/bison -L $$s/bison/ ; \
122 YACC
= `if [ -f $$r/bison/bison ] ; then \
123 echo $$r/bison/bison -y -L $$s/bison/ ; \
124 elif [ -f $$r/byacc/byacc ] ; then \
125 echo $$r/byacc/byacc ; \
127 echo ${DEFAULT_YACC} ; \
130 LEX
= `if [ -f $$r/flex/flex ] ; \
131 then echo $$r/flex/flex ; \
132 else echo ${DEFAULT_LEX} ; fi`
134 M4
= `if [ -f $$r/m4/m4 ] ; \
135 then echo $$r/m4/m4 ; \
138 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
139 then echo $$r/texinfo/makeinfo/makeinfo ; \
140 else echo makeinfo ; fi`
142 # This just becomes part of the MAKEINFO definition passed down to
143 # sub-makes. It lets flags be given on the command line while still
144 # using the makeinfo from the object tree.
147 EXPECT
= `if [ -f $$r/expect/expect ] ; \
148 then echo $$r/expect/expect ; \
149 else echo expect ; fi`
151 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
152 then echo $$s/dejagnu/runtest ; \
153 else echo runtest ; fi`
156 # compilers to use to create programs which must be run in the build
159 CXX_FOR_BUILD
= $(CXX
)
161 SUBDIRS
= "this is set via configure, don't edit this"
164 # This is set by the configure script to the list of directories which
165 # should be built using the target tools.
168 SPECIAL_LIBS
= libdsp
171 TARGET_CONFIGDIRS
= libiberty libgloss
$(SPECIAL_LIBS
) newlib libio librx libstdc
++ libg
++ winsup opcodes libstub cygmon
173 # Target libraries are put under this directory:
174 # Changed by configure to $(target_alias) if cross.
177 # This is set by the configure script to the arguments passed to configure.
180 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
184 # This is the name of the environment variable used for the path to
185 # the libraries. This may be changed by configure.in.
186 RPATH_ENVVAR
= LD_LIBRARY_PATH
188 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
189 REALLY_SET_LIB_PATH
= \
190 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
:$$$(RPATH_ENVVAR
); \
191 export $(RPATH_ENVVAR
);
194 INSTALL_TARGET
= installdirs \
197 $(INSTALL_TARGET_MODULES
) \
198 $(INSTALL_X11_MODULES
) \
202 if [ -f $$r/gcc/xgcc ] ; then \
203 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
204 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
205 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/$(TARGET_SUBDIR)/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
207 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
210 echo $$r/gcc/xgcc -B$$r/gcc/; \
213 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
216 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
220 # If CC_FOR_TARGET is not overriden on the command line, then this
221 # variable is passed down to the gcc Makefile, where it is used to
222 # build libgcc2.a. We define it here so that it can itself be
223 # overridden on the command line.
224 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/
226 # start-sanitize-chill
227 CHILL_FOR_TARGET
= ` \
228 if [ -f $$r/gcc/xgcc ] ; then \
229 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
231 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
234 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
241 if [ -f $$r/gcc/xgcc ] ; then \
242 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
243 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
244 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/$(TARGET_SUBDIR)/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
246 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
249 echo $$r/gcc/xgcc -B$$r/gcc/; \
252 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
255 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
260 if [ -f $$r/gas/as-new ] ; then \
261 echo $$r/gas/as-new ; \
263 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
266 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
271 if [ -f $$r/ld/ld-new ] ; then \
272 echo $$r/ld/ld-new ; \
274 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
277 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
281 DLLTOOL_FOR_TARGET
= ` \
282 if [ -f $$r/binutils/dlltool ] ; then \
283 echo $$r/binutils/dlltool ; \
285 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
288 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
292 WINDRES_FOR_TARGET
= ` \
293 if [ -f $$r/binutils/windres ] ; then \
294 echo $$r/binutils/windres ; \
296 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
299 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
304 if [ -f $$r/binutils/ar ] ; then \
305 echo $$r/binutils/ar ; \
307 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
310 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
314 RANLIB_FOR_TARGET
= ` \
315 if [ -f $$r/binutils/ranlib ] ; then \
316 echo $$r/binutils/ranlib ; \
318 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
321 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
326 if [ -f $$r/binutils/nm-new ] ; then \
327 echo $$r/binutils/nm-new ; \
329 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
332 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
336 # The first rule in the file had better be this one. Don't put any above it.
337 # This lives here to allow makefile fragments to contain dependencies.
341 # These can be overridden by config/mt-*.
342 # The _TARGET_ is because they're specified in mt-foo.
343 # The _HOST_ is because they're programs that run on the host.
344 EXTRA_TARGET_HOST_ALL_MODULES
=
345 EXTRA_TARGET_HOST_INSTALL_MODULES
=
346 EXTRA_TARGET_HOST_CHECK_MODULES
=
348 #### host and target specific makefile fragments come in here.
351 # Flags to pass down to all sub-makes.
352 # Please keep these in alphabetical order.
353 BASE_FLAGS_TO_PASS
= \
354 "AR_FLAGS=$(AR_FLAGS)" \
355 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
356 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
358 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
359 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
361 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
362 $(start-sanitize-chill
)\
363 "CHILLFLAGS=$(CHILLFLAGS)" \
364 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
365 "CHILL_LIB=$(CHILL_LIB)" \
366 $(end-sanitize-chill
)\
367 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
368 "CXXFLAGS=$(CXXFLAGS)" \
369 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
370 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
371 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
372 "INSTALL=$(INSTALL)" \
373 "INSTALL_DATA=$(INSTALL_DATA)" \
374 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
375 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
376 "LDFLAGS=$(LDFLAGS)" \
378 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
379 "LIBCFLAGS=$(LIBCFLAGS)" \
380 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
381 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
382 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
385 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
386 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
387 "PICFLAG=$(PICFLAG)" \
388 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
389 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
390 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
393 "RUNTEST=$(RUNTEST)" \
394 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
395 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
398 "datadir=$(datadir)" \
399 "exec_prefix=$(exec_prefix)" \
400 "includedir=$(includedir)" \
401 "infodir=$(infodir)" \
403 "libexecdir=$(libexecdir)" \
404 "lispdir=$(lispdir)" \
405 "localstatedir=$(localstatedir)" \
407 "oldincludedir=$(oldincludedir)" \
409 "sbindir=$(sbindir)" \
410 "sharedstatedir=$(sharedstatedir)" \
411 "sysconfdir=$(sysconfdir)" \
414 # Flags to pass down to most sub-makes, in which we're building with
415 # the host environment.
416 # If any variables are added here, they must be added to do-*, below.
422 'DLLTOOL=$(DLLTOOL)' \
428 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
430 # Flags that are concerned with the location of the X11 include files
433 # NOTE: until the top-level is getting the values via autoconf, it only
434 # causes problems to have this top-level Makefile overriding the autoconf-set
435 # values in child directories. Only variables that don't conflict with
436 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
438 X11_FLAGS_TO_PASS
= \
439 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
440 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
442 # Flags to pass down to makes which are built with the target environment.
443 # The double $ decreases the length of the command line; the variables
444 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
445 # If any variables are added here, they must be added to do-*, below.
446 EXTRA_TARGET_FLAGS
= \
447 'AR=$$(AR_FOR_TARGET)' \
448 'AS=$$(AS_FOR_TARGET)' \
449 'CC=$$(CC_FOR_TARGET)' \
450 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
451 'CXX=$$(CXX_FOR_TARGET)' \
452 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
453 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
454 'LD=$$(LD_FOR_TARGET)' \
455 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
456 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
457 'NM=$$(NM_FOR_TARGET)' \
458 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
459 'RANLIB=$$(RANLIB_FOR_TARGET)' \
460 'WINDRES=$$(WINDRES_FOR_TARGET)'
462 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
464 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
465 # unfortunately needs the native compiler and the target ar and
467 # If any variables are added here, they must be added to do-*, below.
468 # The HOST_* variables are a special case, which are used for the gcc
469 # cross-building scheme.
471 'AR=$$(AR_FOR_TARGET)' \
475 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
476 'HOST_CC=$(CC_FOR_BUILD)' \
477 'HOST_PREFIX=$(HOST_PREFIX)' \
478 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
480 'RANLIB=$$(RANLIB_FOR_TARGET)' \
481 'WINDRES=$$(WINDRES_FOR_TARGET)' \
482 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
483 "`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s/.*=$$/XFOO=/`" \
484 "`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s/.*=$$/XFOO=/`" \
485 "`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s/.*=$$/XFOO=/`" \
486 "`echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)' | sed -e s/.*=$$/XFOO=/`" \
487 "`echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
488 "`echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)' | sed -e s/.*=$$/XFOO=/`" \
489 "`echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)' | sed -e s/.*=$$/XFOO=/`" \
490 "`echo 'ENQUIRE=$(ENQUIRE)' | sed -e s/.*=$$/XFOO=/`" \
491 "`echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)' | sed -e s/.*=$$/XFOO=/`"
493 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
495 # This is a list of the targets for all of the modules which are compiled
496 # using $(FLAGS_TO_PASS).
507 $(start-sanitize-cygnus
) \
509 $(end-sanitize-cygnus
) \
520 $(start-sanitize-cygnus
) \
522 $(end-sanitize-cygnus
) \
532 $(start-sanitize-ide
) \
534 $(end-sanitize-ide
) \
540 $(start-sanitize-ide
) \
542 $(end-sanitize-ide
) \
546 $(start-sanitize-ide
) \
549 $(end-sanitize-ide
) \
566 $(start-sanitize-cygnus
) \
568 $(end-sanitize-cygnus
) \
576 $(start-sanitize-ide
) \
578 $(end-sanitize-ide
) \
580 $(EXTRA_TARGET_HOST_ALL_MODULES
)
582 # This is a list of the check targets for all of the modules which are
583 # compiled using $(FLAGS_TO_PASS).
585 # The list is in two parts. The first lists those tools which
586 # are tested as part of the host's native tool-chain, and not
587 # tested in a cross configuration.
588 NATIVE_CHECK_MODULES
= \
593 CROSS_CHECK_MODULES
= \
609 $(start-sanitize-cygnus
) \
611 $(end-sanitize-cygnus
) \
620 $(start-sanitize-ide
) \
622 $(end-sanitize-ide
) \
628 $(start-sanitize-ide
) \
630 $(end-sanitize-ide
) \
634 $(start-sanitize-ide
) \
637 $(end-sanitize-ide
) \
652 $(start-sanitize-cygnus
) \
654 $(end-sanitize-cygnus
) \
663 $(start-sanitize-ide
) \
665 $(end-sanitize-ide
) \
667 $(EXTRA_TARGET_HOST_CHECK_MODULES
)
669 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
671 # This is a list of the install targets for all of the modules which are
672 # compiled using $(FLAGS_TO_PASS).
673 # We put install-opcodes before install-binutils because the installed
674 # binutils might be on PATH, and they might need the shared opcodes
676 # We put install-tcl before install-itcl because itcl wants to run a
677 # program on installation which uses the Tcl libraries.
699 $(start-sanitize-cygnus
) \
701 $(end-sanitize-cygnus
) \
711 $(start-sanitize-ide
) \
713 $(end-sanitize-ide
) \
720 $(start-sanitize-ide
) \
722 $(end-sanitize-ide
) \
726 $(start-sanitize-ide
) \
729 $(end-sanitize-ide
) \
744 $(start-sanitize-cygnus
) \
746 $(end-sanitize-cygnus
) \
753 $(start-sanitize-ide
) \
755 $(end-sanitize-ide
) \
757 $(EXTRA_TARGET_HOST_INSTALL_MODULES
)
759 # This is a list of the targets for all of the modules which are compiled
760 # using $(X11_FLAGS_TO_PASS).
772 # This is a list of the check targets for all of the modules which are
773 # compiled using $(X11_FLAGS_TO_PASS).
774 CHECK_X11_MODULES
= \
784 # This is a list of the install targets for all the modules which are
785 # compiled using $(X11_FLAGS_TO_PASS).
786 INSTALL_X11_MODULES
= \
797 # This is a list of the targets for all of the modules which are compiled
798 # using $(TARGET_FLAGS_TO_PASS).
799 ALL_TARGET_MODULES
= \
801 all-target-libstdc
++ \
806 $(start-sanitize-dsp
) \
808 $(end-sanitize-dsp
) \
809 all-target-libgloss \
810 all-target-libiberty \
812 all-target-examples \
814 $(start-sanitize-java
) \
816 all-target-boehm-gc \
817 all-target-qthreads \
818 $(end-sanitize-java
) \
821 # This is a list of the configure targets for all of the modules which
822 # are compiled using the target tools.
823 CONFIGURE_TARGET_MODULES
= \
824 $(start-sanitize-dsp
) \
825 configure-target-libdsp \
826 $(end-sanitize-dsp
) \
827 configure-target-libio \
828 configure-target-libstdc
++ \
829 configure-target-librx \
830 configure-target-libg
++ \
831 configure-target-newlib \
832 configure-target-winsup \
833 configure-target-libgloss \
834 configure-target-libiberty \
835 configure-target-gperf \
836 configure-target-examples \
837 configure-target-libstub \
838 $(start-sanitize-java
) \
839 configure-target-libjava \
840 configure-target-boehm-gc \
841 configure-target-qthreads \
842 $(end-sanitize-java
) \
843 configure-target-cygmon
845 # This is a list of the check targets for all of the modules which are
846 # compiled using $(TARGET_FLAGS_TO_PASS).
847 CHECK_TARGET_MODULES
= \
848 $(start-sanitize-dsp
) \
849 check-target-libdsp \
850 $(end-sanitize-dsp
) \
852 check-target-libstdc
++ \
853 check-target-libg
++ \
854 check-target-newlib \
855 check-target-winsup \
856 check-target-libiberty \
857 $(start-sanitize-java
) \
858 check-target-libjava \
859 check-target-boehm-gc \
860 check-target-qthreads \
861 $(end-sanitize-java
) \
864 # This is a list of the install targets for all of the modules which are
865 # compiled using $(TARGET_FLAGS_TO_PASS).
866 INSTALL_TARGET_MODULES
= \
867 $(start-sanitize-dsp
) \
868 install-target-libdsp \
869 $(end-sanitize-dsp
) \
870 install-target-libio \
871 install-target-libstdc
++ \
872 install-target-libg
++ \
873 install-target-newlib \
874 install-target-winsup \
875 install-target-libgloss \
876 install-target-libiberty \
877 $(start-sanitize-java
) \
878 install-target-libjava \
879 install-target-boehm-gc \
880 install-target-qthreads \
881 $(end-sanitize-java
) \
884 # This is a list of the targets for which we can do a clean-{target}.
895 $(start-sanitize-cygnus
) \
897 $(end-sanitize-cygnus
) \
908 $(start-sanitize-cygnus
) \
910 $(end-sanitize-cygnus
) \
920 $(start-sanitize-ide
) \
922 $(end-sanitize-ide
) \
928 $(start-sanitize-ide
) \
930 $(end-sanitize-ide
) \
934 $(start-sanitize-ide
) \
937 $(end-sanitize-ide
) \
954 $(start-sanitize-cygnus
) \
956 $(end-sanitize-cygnus
) \
964 $(start-sanitize-ide
) \
966 $(end-sanitize-ide
) \
969 # All of the target modules that can be cleaned
970 CLEAN_TARGET_MODULES
= \
971 $(start-sanitize-dsp
) \
972 clean-target-libdsp \
973 $(end-sanitize-dsp
) \
975 clean-target-libstdc
++ \
977 clean-target-libg
++ \
978 clean-target-newlib \
979 clean-target-winsup \
980 clean-target-libgloss \
981 clean-target-libiberty \
983 clean-target-examples \
984 clean-target-libstub \
985 $(start-sanitize-java
) \
986 clean-target-libjava \
987 clean-target-boehm-gc \
988 clean-target-qthreads \
989 $(end-sanitize-java
) \
992 # All of the x11 modules that can be cleaned
993 CLEAN_X11_MODULES
= \
1004 # The target built for a native build.
1008 $(ALL_X11_MODULES
) \
1009 $(ALL_TARGET_MODULES
) \
1012 # Do a target for all the subdirectories. A ``make do-X'' will do a
1013 # ``make X'' in all subdirectories (because, in general, there is a
1014 # dependency (below) of X upon do-X, a ``make X'' will also do this,
1015 # but it may do additional work as well).
1016 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
1017 # because it is so large that it can easily overflow the command line
1018 # length limit on some systems.
1027 do-maintainer-clean \
1031 @target
=`echo $@ | sed -e 's/^do-//'`; \
1032 r
=`pwd`; export r
; \
1033 s
=`cd $(srcdir); pwd`; export s
; \
1035 for i in
$(SUBDIRS
) -dummy-
; do \
1036 if
[ -f .
/$$i/Makefile
]; then \
1039 for flag in
$(EXTRA_GCC_FLAGS
); do \
1040 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
1044 for flag in
$(EXTRA_HOST_FLAGS
); do \
1045 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
1049 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
1051 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
1052 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1053 "RANLIB=$${RANLIB}" \
1054 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1056 then true
; else exit
1; fi
; \
1059 @target
=`echo $@ | sed -e 's/^do-//'`; \
1060 r
=`pwd`; export r
; \
1061 s
=`cd $(srcdir); pwd`; export s
; \
1063 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
1064 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
1065 for flag in
$(EXTRA_TARGET_FLAGS
); do \
1066 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
1068 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
1069 if
(cd
$(TARGET_SUBDIR
)/$$i; \
1070 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
1071 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
1072 "RANLIB=$${RANLIB}" \
1073 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
1075 then true
; else exit
1; fi
; \
1079 # Here are the targets which correspond to the do-X targets.
1081 .PHONY
: info installcheck dvi install-info
1082 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
1083 .PHONY
: local-clean local-distclean local-maintainer-clean
1085 installcheck: do-installcheck
1088 # Make sure makeinfo is built before we do a `make info'.
1089 do-info
: all-texinfo
1091 install-info
: do-install-info
dir.
info
1092 s
=`cd $(srcdir); pwd`; export s
; \
1093 if
[ -f
dir.
info ] ; then \
1094 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
1098 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
1101 -rm -f Makefile config.status config.cache
1102 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
1103 rm -rf
$(TARGET_SUBDIR
); \
1106 local-maintainer-clean
:
1107 @echo
"This command is intended for maintainers to use;"
1108 @echo
"it deletes files that may require special tools to rebuild."
1110 clean: do-clean local-clean
1111 mostlyclean: do-mostlyclean local-clean
1112 distclean: do-distclean local-clean local-distclean
1113 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
1114 maintainer-clean
: local-distclean
1115 realclean: maintainer-clean
1117 # This rule is used to clean specific modules.
1118 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
1119 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
1120 @
dir=`echo $@ | sed -e 's/clean-//'`; \
1121 if
[ -f .
/$${dir}/Makefile
] ; then \
1122 r
=`pwd`; export r
; \
1123 s
=`cd $(srcdir); pwd`; export s
; \
1125 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
1130 .PHONY
: $(CLEAN_TARGET_MODULES
)
1131 $(CLEAN_TARGET_MODULES
):
1132 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
1133 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1134 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1135 r
=`pwd`; export r
; \
1136 s
=`cd $(srcdir); pwd`; export s
; \
1138 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
1143 clean-target
: $(CLEAN_TARGET_MODULES
)
1148 check: $(CHECK_MODULES
) \
1149 $(CHECK_TARGET_MODULES
) \
1150 $(CHECK_X11_MODULES
) \
1153 # Installation targets.
1155 .PHONY
: install uninstall source-vault binary-vault vault-install
1156 install: $(INSTALL_TARGET
)
1159 @echo
"the uninstall target is not supported in this tree"
1162 $(MAKE
) -f .
/release
/Build-A-Release \
1163 host
=$(host_alias
) source-vault
1166 $(MAKE
) -f .
/release
/Build-A-Release \
1167 host
=$(host_alias
) target
=$(target_alias
)
1170 @if
[ -f .
/release
/vault-install
] ; then \
1171 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1177 install.
all: install-no-fixedincludes
1178 @if
[ -f .
/gcc
/Makefile
] ; then \
1179 r
=`pwd` ; export r
; \
1182 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1187 # inet-install is used because the I*Net wants DejaGNU installed but
1188 # not built. Similarly, gzip is built but not installed.
1190 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1192 # install-no-fixedincludes is used because Cygnus can not distribute
1193 # the fixed header files.
1194 .PHONY
: install-no-fixedincludes
1195 install-no-fixedincludes
: \
1197 $(INSTALL_MODULES
) \
1198 $(INSTALL_TARGET_MODULES
) \
1199 $(INSTALL_X11_MODULES
) \
1200 gcc-no-fixedincludes
1202 # Install the gcc headers files, but not the fixed include files,
1203 # which Cygnus is not allowed to distribute. This rule is very
1204 # dependent on the workings of the gcc Makefile.in.
1205 .PHONY
: gcc-no-fixedincludes
1206 gcc-no-fixedincludes
:
1207 @if
[ -f .
/gcc
/Makefile
]; then \
1208 rm -rf gcc
/tmp-include
; \
1209 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1210 mkdir gcc
/include; \
1211 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1212 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1213 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1214 r
=`pwd`; export r
; \
1215 s
=`cd $(srcdir); pwd` ; export s
; \
1218 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1219 rm -rf gcc
/include; \
1220 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1223 # start-sanitize-ide
1224 # Install Foundry. Avoid installing a bunch of stuff we don't need.
1226 mods
="$(INSTALL_MODULES)"; \
1227 x11_mods
="$(INSTALL_X11_MODULES)"; \
1228 for d in install-tcl install-tk install-itcl install-tix install-ilu
; do \
1229 mods
="`echo $${mods} | sed -e "s
/$$d//"`"; \
1230 x11_mods
="`echo $${x11_mods} | sed -e "s
/$$d//"`"; \
1232 $(MAKE
) INSTALL_MODULES
="$${mods}" INSTALL_X11_MODULES
="$${x11_mods}" install
1233 for d in tcl tk itcl tix ilu
; do \
1234 if
[ -f
$$d/Makefile
]; then \
1235 r
=`pwd`; export r
; \
1236 s
=`cd $(srcdir); pwd`; export s
; \
1238 (cd
$$d; $(MAKE
) $(FLAGS_TO_PASS
) install-minimal
); \
1242 date
'+%D %r' > builddate \
1243 $(INSTALL_DATA
) builddate
$(datadir)/builddate
; \
1247 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1248 # build a target all-X means to cd to X and make all.
1250 # all-gui, and all-libproc are handled specially because
1251 # they are still experimental, and if they fail to build, that
1252 # shouldn't stop "make all".
1253 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1254 $(ALL_MODULES
) all-gui all-libproc
:
1255 @
dir=`echo $@ | sed -e 's/all-//'`; \
1256 if
[ -f .
/$${dir}/Makefile
] ; then \
1257 r
=`pwd`; export r
; \
1258 s
=`cd $(srcdir); pwd`; export s
; \
1260 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1265 # These rules are used to check the modules which use FLAGS_TO_PASS.
1266 # To build a target check-X means to cd to X and make check. Some
1267 # modules are only tested in a native toolchain.
1269 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1270 $(NATIVE_CHECK_MODULES
):
1271 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1272 dir=`echo $@ | sed -e 's/check-//'`; \
1273 if
[ -f .
/$${dir}/Makefile
] ; then \
1274 r
=`pwd`; export r
; \
1275 s
=`cd $(srcdir); pwd`; export s
; \
1277 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1283 $(CROSS_CHECK_MODULES
):
1284 @
dir=`echo $@ | sed -e 's/check-//'`; \
1285 if
[ -f .
/$${dir}/Makefile
] ; then \
1286 r
=`pwd`; export r
; \
1287 s
=`cd $(srcdir); pwd`; export s
; \
1289 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1294 # This rule is used to install the modules which use FLAGS_TO_PASS.
1295 # To build a target install-X means to cd to X and make install.
1296 .PHONY
: $(INSTALL_MODULES
)
1297 $(INSTALL_MODULES
): installdirs
1298 @
dir=`echo $@ | sed -e 's/install-//'`; \
1299 if
[ -f .
/$${dir}/Makefile
] ; then \
1300 r
=`pwd`; export r
; \
1301 s
=`cd $(srcdir); pwd`; export s
; \
1303 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1308 # This rule is used to configure the modules which are built with the
1310 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1311 $(CONFIGURE_TARGET_MODULES
):
1312 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1313 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1314 r
=`pwd`; export r
; \
1315 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1316 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1317 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1318 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1319 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1321 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1322 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1323 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1326 if echo
'.;' | cmp
- $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
>/dev
/null
2>&1; then \
1329 rm -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1331 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1334 fi
; exit
0 # break command into two pieces
1335 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1336 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1338 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1340 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1341 if
[ -d
$(srcdir)/$${dir} ]; then \
1342 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1343 r
=`pwd`; export r
; \
1344 s
=`cd $(srcdir); pwd`; export s
; \
1346 AR
="$(AR_FOR_TARGET)"; export AR
; \
1347 AS
="$(AS_FOR_TARGET)"; export AS
; \
1348 CC
="$(CC_FOR_TARGET)"; export CC
; \
1349 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1350 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1351 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1352 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1353 LD
="$(LD_FOR_TARGET)"; export LD
; \
1354 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1355 NM
="$(NM_FOR_TARGET)"; export NM
; \
1356 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1357 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1358 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1359 cd
$(TARGET_SUBDIR
)/$${dir}; \
1362 topdir
=$(srcdir) ;; \
1364 case
"$(TARGET_SUBDIR)" in \
1365 .
) topdir
="../$(srcdir)" ;; \
1366 *) topdir
="../../$(srcdir)" ;; \
1369 if
[ "$(srcdir)" = "." ] ; then \
1370 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1371 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1372 if
[ -f Makefile
]; then \
1373 if
$(MAKE
) distclean; then \
1387 srcdiroption
="--srcdir=."; \
1390 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1391 libsrcdir
="$$s/$${dir}"; \
1393 if
[ -f
$${libsrcdir}/configure
] ; then \
1394 $(SHELL
) $${libsrcdir}/configure \
1395 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1396 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1398 $(SHELL
) $$s/configure \
1399 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1400 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1409 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1410 # To build a target all-X means to cd to X and make all.
1411 .PHONY
: $(ALL_TARGET_MODULES
)
1412 $(ALL_TARGET_MODULES
):
1413 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1414 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1415 r
=`pwd`; export r
; \
1416 s
=`cd $(srcdir); pwd`; export s
; \
1418 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1423 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1424 # To build a target install-X means to cd to X and make install.
1425 .PHONY
: $(CHECK_TARGET_MODULES
)
1426 $(CHECK_TARGET_MODULES
):
1427 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1428 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1429 r
=`pwd`; export r
; \
1430 s
=`cd $(srcdir); pwd`; export s
; \
1432 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1437 # This rule is used to install the modules which use
1438 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1440 .PHONY
: $(INSTALL_TARGET_MODULES
)
1441 $(INSTALL_TARGET_MODULES
): installdirs
1442 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1443 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1444 r
=`pwd`; export r
; \
1445 s
=`cd $(srcdir); pwd`; export s
; \
1447 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1448 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1453 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1454 # To build a target all-X means to cd to X and make all.
1455 .PHONY
: $(ALL_X11_MODULES
)
1457 @
dir=`echo $@ | sed -e 's/all-//'`; \
1458 if
[ -f .
/$${dir}/Makefile
] ; then \
1459 r
=`pwd`; export r
; \
1460 s
=`cd $(srcdir); pwd`; export s
; \
1463 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1468 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1469 # To build a target check-X means to cd to X and make all.
1470 .PHONY
: $(CHECK_X11_MODULES
)
1471 $(CHECK_X11_MODULES
):
1472 @
dir=`echo $@ | sed -e 's/check-//'`; \
1473 if
[ -f .
/$${dir}/Makefile
] ; then \
1474 r
=`pwd`; export r
; \
1475 s
=`cd $(srcdir); pwd`; export s
; \
1478 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1483 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1484 # To build a target install-X means to cd to X and make install.
1485 .PHONY
: $(INSTALL_X11_MODULES
)
1486 $(INSTALL_X11_MODULES
): installdirs
1487 @
dir=`echo $@ | sed -e 's/install-//'`; \
1488 if
[ -f .
/$${dir}/Makefile
] ; then \
1489 r
=`pwd`; export r
; \
1490 s
=`cd $(srcdir); pwd`; export s
; \
1493 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1498 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1501 @if
[ -f .
/gcc
/Makefile
] ; then \
1502 r
=`pwd`; export r
; \
1503 s
=`cd $(srcdir); pwd`; export s
; \
1505 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1510 .PHONY
: all-bootstrap
1512 @if
[ -f .
/gcc
/Makefile
] ; then \
1513 r
=`pwd`; export r
; \
1514 s
=`cd $(srcdir); pwd`; export s
; \
1516 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) bootstrap
); \
1523 @if
[ -f .
/gcc
/Makefile
] ; then \
1524 r
=`pwd`; export r
; \
1525 s
=`cd $(srcdir); pwd`; export s
; \
1527 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1534 @if
[ -f .
/gcc
/Makefile
] ; then \
1535 r
=`pwd`; export r
; \
1536 s
=`cd $(srcdir); pwd`; export s
; \
1538 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1544 # EXPERIMENTAL STUFF
1545 # This rule is used to install the modules which use FLAGS_TO_PASS.
1546 # To build a target install-X means to cd to X and make install.
1547 .PHONY
: install-dosrel
1548 install-dosrel
: installdirs info
1549 @
dir=`echo $@ | sed -e 's/install-//'`; \
1550 if
[ -f .
/$${dir}/Makefile
] ; then \
1551 r
=`pwd`; export r
; \
1552 s
=`cd $(srcdir); pwd`; export s
; \
1554 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1559 install-dosrel-fake
:
1562 # This is a list of inter-dependencies among modules.
1565 all-autoconf
: all-m4 all-texinfo
1566 all-automake
: all-m4 all-texinfo
1568 all-bfd
: all-libiberty all-intl
1569 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc all-intl
1570 all-bison
: all-texinfo
1571 # start-sanitize-java
1572 all-target-boehm-gc
: configure-target-boehm-gc
1575 # start-sanitize-cygnus
1577 # These two have dependencies on cgen, and while this section is alphabetically
1578 # sorted, I wish to keep these together until things settle.
1579 all-opcodes
: all-cgen
1581 # end-sanitize-cygnus
1583 configure-target-cygmon
: $(ALL_GCC
)
1584 all-target-cygmon
: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-libstub
1586 all-dejagnu
: all-tcl all-expect all-tk
1587 all-diff
: all-libiberty
1589 all-emacs19
: all-bison all-byacc
1591 configure-target-examples
: $(ALL_GCC
)
1592 all-target-examples
: configure-target-examples
1593 all-expect
: all-tcl all-tk
1594 all-fileutils
: all-libiberty
1597 all-flex
: all-libiberty all-bison all-byacc
1598 # start-sanitize-cygnus
1600 # end-sanitize-cygnus
1601 all-gas
: all-libiberty all-opcodes all-bfd all-intl
1605 all-gcc
: all-bison all-byacc all-binutils all-gas all-ld
1606 all-bootstrap
: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1607 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui
1608 # start-sanitize-ide
1609 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui all-libide all-libidetcl
1611 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1614 configure-target-gperf
: $(ALL_GCC
)
1615 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libstdc
++
1616 all-gprof
: all-libiberty all-bfd all-opcodes all-intl
1617 all-grez
: all-libiberty all-bfd all-opcodes
1618 all-gui
: all-gdb all-libproc all-target-librx
1620 all-gzip
: all-libiberty
1621 all-hello
: all-libiberty
1622 # start-sanitize-ide
1626 all-inet
: all-tcl all-send-pr all-perl
1628 all-ispell
: all-emacs19
1629 all-itcl
: all-tcl all-tk
1630 # start-sanitize-ide
1631 all-jstools
: all-tcl all-tk all-tix all-libgui all-libide all-libidetcl
1633 all-ld
: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex all-intl
1634 # start-sanitize-dsp
1635 all-target-libdsp
: configure-target-libdsp configure-target-newlib
1636 configure-target-libdsp
: $(ALL_GCC
)
1638 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1639 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
++
1640 configure-target-libgloss
: $(ALL_GCC
)
1641 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1642 configure-target-libio
: $(ALL_GCC
)
1643 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1644 check-target-libio
: all-target-libstdc
++
1645 all-libgui
: all-tcl all-tk all-itcl
1647 # start-sanitize-ide
1649 all-libidetcl
: all-tcl all-tk all-itcl all-ilu all-libgui all-libide
1651 # start-sanitize-java
1652 configure-target-libjava
: $(ALL_GCC
) configure-target-boehm-gc configure-target-qthreads
1653 all-target-libjava
: configure-target-libjava all-gcc all-target-newlib all-target-boehm-gc all-target-qthreads
1655 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1656 all-target-librx
: configure-target-librx
1657 configure-target-libstdc
++: $(ALL_GCC
)
1658 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1659 configure-target-libstub
: $(ALL_GCC
)
1660 all-target-libstub
: configure-target-libstub
1662 all-m4
: all-libiberty
1663 all-make
: all-libiberty
1665 configure-target-newlib
: $(ALL_GCC
)
1666 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1667 all-opcodes
: all-bfd all-libiberty
1668 all-patch
: all-libiberty
1670 all-prms
: all-libiberty
1671 # start-sanitize-java
1672 all-target-qthreads
: configure-target-qthreads
1676 all-recode
: all-libiberty
1677 all-sed
: all-libiberty
1678 all-send-pr
: all-prms
1680 all-sim
: all-libiberty all-bfd all-opcodes all-readline
1681 # start-sanitize-cygnus
1682 all-snavigator
: all-tcl all-tk all-tix all-itcl all-db all-grep all-flexlm all-libgui
1683 # end-sanitize-cygnus
1684 all-tar
: all-libiberty
1686 all-tclX
: all-tcl all-tk
1688 all-texinfo
: all-libiberty
1690 all-tgas
: all-libiberty all-bfd all-opcodes
1692 all-tix
: all-tcl all-tk
1693 # start-sanitize-ide
1694 all-vmake
: all-tcl all-tk all-itcl all-tix all-libgui all-libide all-libidetcl
1697 all-target-winsup
: all-target-newlib all-target-libiberty all-target-libio configure-target-winsup
1698 configure-target-winsup
: configure-target-newlib
1699 all-uudecode
: all-libiberty
1700 configure-target-libiberty
: $(ALL_GCC
)
1701 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1702 all-target
: $(ALL_TARGET_MODULES
)
1703 install-target
: $(INSTALL_TARGET_MODULES
)
1704 # start-sanitize-gdbtk
1705 install-gdb
: install-tcl install-tk install-itcl install-tix install-libgui
1707 ### other supporting targets
1713 installdirs: mkinstalldirs
1714 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1716 dir.
info: do-install-info
1717 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1718 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1719 mv
-f
dir.
info.new
dir.
info ; \
1724 @echo
"Building a full distribution of this tree isn't done"
1725 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1729 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1730 # ability to use several tags files at once, so there is probably no need
1731 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1732 # (if we felt like it) have this Makefile write a piece of elisp which
1733 # the user could load to tell emacs19 where all the TAGS files we just
1737 # with the gnu make, this is done automatically.
1739 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
1740 $(SHELL
) .
/config.status
1743 # Support for building net releases
1745 # Files in devo used in any net release.
1746 # ChangeLog omitted because it may refer to files which are not in this
1747 # distribution (perhaps it would be better to include it anyway).
1748 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1749 config.guess config.sub config move-if-change \
1750 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1751 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1752 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1754 # Files in devo/etc used in any net release.
1755 # ChangeLog omitted because it may refer to files which are not in this
1756 # distribution (perhaps it would be better to include it anyway).
1757 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1758 make-stds.texi standards.
info*
1760 # When you use `make setup-dirs' or `make taz' you should always redefine
1762 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1766 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1767 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1768 # Take out texinfo from a few places.
1769 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1770 -e
'/^ install-texinfo /d' \
1772 mv
-f tmp Makefile.in
1774 $(start-sanitize-Sanitize
)
1775 @if
[ -f .Sanitize
] ; then echo
"RUN Sanitize FIRST!" ; false
; fi
;
1776 $(end-sanitize-Sanitize
)
1778 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1779 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1780 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1781 # Make links, and run "make diststuff" or "make info" when needed.
1782 rm -rf proto-toplev
; mkdir proto-toplev
1783 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1784 for d in
$$dirs ; do \
1785 if
[ -d
$$d ]; then \
1786 if
[ ! -f
$$d/Makefile
] ; then true
; \
1787 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1788 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1789 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1790 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1792 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1793 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1795 ln
-s ..
/$$d proto-toplev
/$$d ; \
1797 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1799 cd etc
; $(MAKE
) info
1802 mkdir proto-toplev
/etc
1803 (cd proto-toplev
/etc
; \
1804 for i in
$(ETC_SUPPORT
); do \
1805 ln
-s ..
/..
/etc
/$$i .
; \
1808 # Take out texinfo from configurable dirs
1809 rm proto-toplev
/configure.in
1810 sed
-e
'/^host_tools=/s/texinfo //' \
1811 <configure.in
>proto-toplev
/configure.in
1813 mkdir proto-toplev
/texinfo
1814 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1815 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1816 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1817 if
test -r texinfo
/util
/tex3patch
; then \
1818 mkdir proto-toplev
/texinfo
/util
&& \
1819 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1821 chmod
-R og
=u . || chmod og
=u
`find . -print`
1822 if grep AM_INIT_AUTOMAKE
$(TOOL
)/configure.in
>/dev
/null
2>&1; then \
1823 ver
=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1825 ver
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1827 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) VER
=$$ver
1830 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1831 -rm -f
$(TOOL
)-$(VER
)
1832 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1833 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1834 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1836 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1837 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1840 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes intl setup.com makefile.vms
1841 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1842 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1843 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1845 # The FSF "binutils" release includes gprof and ld.
1846 .PHONY
: binutils.
tar.gz
1847 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof intl setup.com makefile.vms
1848 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1849 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1850 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1852 .PHONY
: gas
+binutils.
tar.gz
1853 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1854 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1855 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1856 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1858 .PHONY
: libg
++.
tar.gz
1859 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1860 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1861 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1862 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1864 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1865 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1866 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1867 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1870 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils intl
1871 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1872 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1873 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1874 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1876 .PHONY
: newlib.
tar.gz
1877 NEWLIB_SUPPORT_DIRS
=libgloss
1878 # taz configures for the sun4 target which won't configure newlib.
1879 # We need newlib configured so that the .info files are made.
1880 # Unfortunately, it is not enough to just configure newlib separately:
1881 # taz will build the .info files but since SUBDIRS won't contain newlib,
1882 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1883 # used in building the .info files, eg: *.def, *.ref).
1884 # The problem isn't solvable however without a lot of extra work because
1885 # target libraries are built in subdir $(target_alias) which gets nuked during
1886 # the make distclean. For now punt on the issue of shipping newlib info files
1887 # with newlib net releases and wait for a day when some native target (sun4?)
1888 # supports newlib (if only minimally).
1889 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1890 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1891 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1892 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1897 # start-sanitize-chill
1898 ## This is ugly, but I don't want GNU make to put these variables in
1899 ## the environment. Older makes will see this as a set of targets
1900 ## with no dependencies and no actions.
1901 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1902 # end-sanitize-chill
1904 # end of Makefile.in