2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation
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.
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.
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.
23 exec_prefix = $(prefix)
25 bindir=${exec_prefix}/bin
26 sbindir
=${exec_prefix}/sbin
27 libexecdir
=${exec_prefix}/libexec
28 datadir=${prefix}/share
29 sysconfdir
=${prefix}/etc
30 sharedstatedir
=${prefix}/com
31 localstatedir
=${prefix}/var
32 libdir=${exec_prefix}/lib
33 includedir=${prefix}/include
34 oldincludedir=/usr
/include
35 infodir=${prefix}/info
38 tooldir
= $(exec_prefix)/$(target
)
40 program_transform_name
=
42 man1dir = $(mandir)/man1
43 man2dir = $(mandir)/man2
44 man3dir = $(mandir)/man3
45 man4dir = $(mandir)/man4
46 man5dir = $(mandir)/man5
47 man6dir = $(mandir)/man6
48 man7dir = $(mandir)/man7
49 man8dir = $(mandir)/man8
50 man9dir = $(mandir)/man9
55 # INSTALL_PROGRAM_ARGS is changed by configure.in to use -x for a
57 INSTALL_PROGRAM_ARGS
=
59 INSTALL
= $(SHELL
) $$s/install-sh
-c
60 INSTALL_PROGRAM
= $(INSTALL
) $(INSTALL_PROGRAM_ARGS
)
61 INSTALL_SCRIPT
= $(INSTALL
)
62 INSTALL_DATA
= $(INSTALL
) -m
644
64 INSTALL_DOSREL
= install-dosrel-fake
71 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
72 # here so that they can be overridden by Makefile fragments.
73 HOST_CC
= $(CC_FOR_BUILD
)
75 HOST_PREFIX_1
= loser-
77 # These flag values are normally overridden by the configure script.
82 CFLAGS_FOR_TARGET
= $(CFLAGS
)
84 LIBCFLAGS_FOR_TARGET
= $(CFLAGS_FOR_TARGET
)
88 # start-sanitize-chill
89 CHILLFLAGS
= $(CFLAGS
)
94 # Use -O2 to stress test the compiler.
95 LIBCXXFLAGS
= $(CXXFLAGS
) -fno-implicit-templates
96 CXXFLAGS_FOR_TARGET
= $(CXXFLAGS
)
97 LIBCXXFLAGS_FOR_TARGET
= $(CXXFLAGS_FOR_TARGET
) -fno-implicit-templates
108 # Not plain GZIP, since gzip looks there for extra command-line options.
111 # These values are substituted by configure.
115 BISON
= `if [ -f $$r/bison/bison ] ; then \
116 echo $$r/bison/bison -L $$s/bison/ ; \
121 YACC
= `if [ -f $$r/bison/bison ] ; then \
122 echo $$r/bison/bison -y -L $$s/bison/ ; \
123 elif [ -f $$r/byacc/byacc ] ; then \
124 echo $$r/byacc/byacc ; \
126 echo ${DEFAULT_YACC} ; \
129 LEX
= `if [ -f $$r/flex/flex ] ; \
130 then echo $$r/flex/flex ; \
131 else echo ${DEFAULT_LEX} ; fi`
133 M4
= `if [ -f $$r/m4/m4 ] ; \
134 then echo $$r/m4/m4 ; \
137 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
138 then echo $$r/texinfo/makeinfo/makeinfo ; \
139 else echo makeinfo ; fi`
141 # This just becomes part of the MAKEINFO definition passed down to
142 # sub-makes. It lets flags be given on the command line while still
143 # using the makeinfo from the object tree.
146 EXPECT
= `if [ -f $$r/expect/expect ] ; \
147 then echo $$r/expect/expect ; \
148 else echo expect ; fi`
150 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
151 then echo $$s/dejagnu/runtest ; \
152 else echo runtest ; fi`
155 # compilers to use to create programs which must be run in the build
158 CXX_FOR_BUILD
= $(CXX
)
160 SUBDIRS
= "this is set via configure, don't edit this"
163 # This is set by the configure script to the list of directories which
164 # should be built using the target tools.
165 TARGET_CONFIGDIRS
= libiberty libgloss newlib libio librx libstdc
++ libg
++ winsup opcodes cygmon
167 # Target libraries are put under this directory:
168 # Changed by configure to $(target_alias) if cross.
171 # This is set by the configure script to the arguments passed to configure.
174 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
178 # This is the name of the environment variable used for the path to
179 # the libraries. This may be changed by configure.in.
180 RPATH_ENVVAR
= LD_LIBRARY_PATH
182 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
183 REALLY_SET_LIB_PATH
= \
184 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
:$$$(RPATH_ENVVAR
); \
185 export $(RPATH_ENVVAR
);
188 INSTALL_TARGET
= installdirs \
191 $(INSTALL_TARGET_MODULES
) \
192 $(INSTALL_X11_MODULES
) \
197 if [ -f $$r/gcc/xgcc ] ; then \
198 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
199 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
200 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; \
202 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
205 echo $$r/gcc/xgcc -B$$r/gcc/; \
208 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
211 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
215 # If CC_FOR_TARGET is not overriden on the command line, then this
216 # variable is passed down to the gcc Makefile, where it is used to
217 # build libgcc2.a. We define it here so that it can itself be
218 # overridden on the command line.
219 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/
221 # start-sanitize-chill
222 CHILL_FOR_TARGET
= ` \
223 if [ -f $$r/gcc/xgcc ] ; then \
224 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
226 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
229 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
236 if [ -f $$r/gcc/xgcc ] ; then \
237 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
238 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
239 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; \
241 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
244 echo $$r/gcc/xgcc -B$$r/gcc/; \
247 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
250 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
255 if [ -f $$r/gas/as-new ] ; then \
256 echo $$r/gas/as-new ; \
258 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
261 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
266 if [ -f $$r/ld/ld-new ] ; then \
267 echo $$r/ld/ld-new ; \
269 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
272 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
276 DLLTOOL_FOR_TARGET
= ` \
277 if [ -f $$r/binutils/dlltool ] ; then \
278 echo $$r/binutils/dlltool ; \
280 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
283 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
287 WINDRES_FOR_TARGET
= ` \
288 if [ -f $$r/binutils/windres ] ; then \
289 echo $$r/binutils/windres ; \
291 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
294 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
299 if [ -f $$r/binutils/ar ] ; then \
300 echo $$r/binutils/ar ; \
302 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
305 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
309 RANLIB_FOR_TARGET
= ` \
310 if [ -f $$r/binutils/ranlib ] ; then \
311 echo $$r/binutils/ranlib ; \
313 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
316 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
321 if [ -f $$r/binutils/nm-new ] ; then \
322 echo $$r/binutils/nm-new ; \
324 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
327 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
331 #### host and target specific makefile fragments come in here.
334 # Flags to pass down to all sub-makes.
335 # Please keep these in alphabetical order.
336 BASE_FLAGS_TO_PASS
= \
337 "AR_FLAGS=$(AR_FLAGS)" \
338 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
339 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
341 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
342 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
344 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
345 $(start-sanitize-chill
)\
346 "CHILLFLAGS=$(CHILLFLAGS)" \
347 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
348 "CHILL_LIB=$(CHILL_LIB)" \
349 $(end-sanitize-chill
)\
350 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
351 "CXXFLAGS=$(CXXFLAGS)" \
352 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
353 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
354 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
355 "INSTALL=$(INSTALL)" \
356 "INSTALL_DATA=$(INSTALL_DATA)" \
357 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
358 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
359 "LDFLAGS=$(LDFLAGS)" \
361 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
362 "LIBCFLAGS=$(LIBCFLAGS)" \
363 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
364 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
365 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
368 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
369 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
370 "PICFLAG=$(PICFLAG)" \
371 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
372 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
373 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
376 "RUNTEST=$(RUNTEST)" \
377 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
378 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
381 "datadir=$(datadir)" \
382 "exec_prefix=$(exec_prefix)" \
383 "includedir=$(includedir)" \
384 "infodir=$(infodir)" \
386 "libexecdir=$(libexecdir)" \
387 "lispdir=$(lispdir)" \
388 "localstatedir=$(localstatedir)" \
390 "oldincludedir=$(oldincludedir)" \
392 "sbindir=$(sbindir)" \
393 "sharedstatedir=$(sharedstatedir)" \
394 "sysconfdir=$(sysconfdir)" \
397 # Flags to pass down to most sub-makes, in which we're building with
398 # the host environment.
399 # If any variables are added here, they must be added to do-*, below.
405 'DLLTOOL=$(DLLTOOL)' \
411 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
413 # Flags that are concerned with the location of the X11 include files
416 # NOTE: until the top-level is getting the values via autoconf, it only
417 # causes problems to have this top-level Makefile overriding the autoconf-set
418 # values in child directories. Only variables that don't conflict with
419 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
421 X11_FLAGS_TO_PASS
= \
422 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
423 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
425 # Flags to pass down to makes which are built with the target environment.
426 # The double $ decreases the length of the command line; the variables
427 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
428 # If any variables are added here, they must be added to do-*, below.
429 EXTRA_TARGET_FLAGS
= \
430 'AR=$$(AR_FOR_TARGET)' \
431 'AS=$$(AS_FOR_TARGET)' \
432 'CC=$$(CC_FOR_TARGET)' \
433 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
434 'CXX=$$(CXX_FOR_TARGET)' \
435 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
436 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
437 'LD=$$(LD_FOR_TARGET)' \
438 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
439 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
440 'NM=$$(NM_FOR_TARGET)' \
441 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
442 'RANLIB=$$(RANLIB_FOR_TARGET)' \
443 'WINDRES=$$(WINDRES_FOR_TARGET)'
445 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
447 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
448 # unfortunately needs the native compiler and the target ar and
450 # If any variables are added here, they must be added to do-*, below.
451 # The HOST_* variables are a special case, which are used for the gcc
452 # cross-building scheme.
454 'AR=$$(AR_FOR_TARGET)' \
458 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
459 'HOST_CC=$(CC_FOR_BUILD)' \
460 'HOST_PREFIX=$(HOST_PREFIX)' \
461 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
463 'RANLIB=$$(RANLIB_FOR_TARGET)' \
464 'WINDRES=$$(WINDRES_FOR_TARGET)' \
465 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
466 "`if test x'$(LANGUAGES)' != x; then echo 'LANGUAGES=$(LANGUAGES)'; else echo 'XFOO=bar'; fi`" \
467 "`if test x'$(STMP_FIXPROTO)' != x; then echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)'; else echo 'XFOO=bar'; fi`" \
468 "`if test x'$(LIMITS_H_TEST)' != x; then echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)'; else echo 'XFOO=bar'; fi`" \
469 "`if test x'$(LIBGCC1_TEST)' != x; then echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)'; else echo 'XFOO=bar'; fi`" \
470 "`if test x'$(LIBGCC2_CFLAGS)' != x; then echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
471 "`if test x'$(LIBGCC2_DEBUG_CFLAGS)' != x; then echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
472 "`if test x'$(LIBGCC2_INCLUDES)' != x; then echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)'; else echo 'XFOO=bar'; fi`" \
473 "`if test x'$(ENQUIRE)' != x; then echo 'ENQUIRE=$(ENQUIRE)'; else echo 'XFOO=bar'; fi`" \
474 "`if test x'$(BOOT_CFLAGS)' != x; then echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)'; else echo 'XFOO=bar'; fi`"
476 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
478 # This is a list of the targets for all of the modules which are compiled
479 # using $(FLAGS_TO_PASS).
507 $(start-sanitize-ide
) \
509 $(end-sanitize-ide
) \
514 $(start-sanitize-ide
) \
516 $(end-sanitize-ide
) \
520 $(start-sanitize-ide
) \
522 $(end-sanitize-ide
) \
546 $(start-sanitize-ide
) \
548 $(end-sanitize-ide
) \
551 # This is a list of the check targets for all of the modules which are
552 # compiled using $(FLAGS_TO_PASS).
554 # The list is in two parts. The first lists those tools which
555 # are tested as part of the host's native tool-chain, and not
556 # tested in a cross configuration.
557 NATIVE_CHECK_MODULES
= \
562 CROSS_CHECK_MODULES
= \
584 $(start-sanitize-ide
) \
586 $(end-sanitize-ide
) \
591 $(start-sanitize-ide
) \
593 $(end-sanitize-ide
) \
597 $(start-sanitize-ide
) \
599 $(end-sanitize-ide
) \
622 $(start-sanitize-ide
) \
624 $(end-sanitize-ide
) \
627 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
629 # This is a list of the install targets for all of the modules which are
630 # compiled using $(FLAGS_TO_PASS).
631 # We put install-opcodes before install-binutils because the installed
632 # binutils might be on PATH, and they might need the shared opcodes
634 # We put install-tcl before install-itcl because itcl wants to run a
635 # program on installation which uses the Tcl libraries.
664 $(start-sanitize-ide
) \
666 $(end-sanitize-ide
) \
672 $(start-sanitize-ide
) \
674 $(end-sanitize-ide
) \
678 $(start-sanitize-ide
) \
680 $(end-sanitize-ide
) \
701 $(start-sanitize-ide
) \
703 $(end-sanitize-ide
) \
706 # This is a list of the targets for all of the modules which are compiled
707 # using $(X11_FLAGS_TO_PASS).
719 # This is a list of the check targets for all of the modules which are
720 # compiled using $(X11_FLAGS_TO_PASS).
721 CHECK_X11_MODULES
= \
731 # This is a list of the install targets for all the modules which are
732 # compiled using $(X11_FLAGS_TO_PASS).
733 INSTALL_X11_MODULES
= \
744 # This is a list of the targets for all of the modules which are compiled
745 # using $(TARGET_FLAGS_TO_PASS).
746 ALL_TARGET_MODULES
= \
748 all-target-libstdc
++ \
753 all-target-libgloss \
754 all-target-libiberty \
756 all-target-examples \
759 # This is a list of the configure targets for all of the modules which
760 # are compiled using the target tools.
761 CONFIGURE_TARGET_MODULES
= \
762 configure-target-libio \
763 configure-target-libstdc
++ \
764 configure-target-librx \
765 configure-target-libg
++ \
766 configure-target-newlib \
767 configure-target-winsup \
768 configure-target-libgloss \
769 configure-target-libiberty \
770 configure-target-gperf \
771 configure-target-examples \
772 configure-target-cygmon
774 # This is a list of the check targets for all of the modules which are
775 # compiled using $(TARGET_FLAGS_TO_PASS).
776 CHECK_TARGET_MODULES
= \
778 check-target-libstdc
++ \
779 check-target-libg
++ \
780 check-target-newlib \
781 check-target-winsup \
782 check-target-libiberty \
785 # This is a list of the install targets for all of the modules which are
786 # compiled using $(TARGET_FLAGS_TO_PASS).
787 INSTALL_TARGET_MODULES
= \
788 install-target-libio \
789 install-target-libstdc
++ \
790 install-target-libg
++ \
791 install-target-newlib \
792 install-target-winsup \
793 install-target-libgloss \
794 install-target-libiberty \
797 # This is a list of the targets for which we can do a clean-{target}.
825 $(start-sanitize-ide
) \
827 $(end-sanitize-ide
) \
832 $(start-sanitize-ide
) \
834 $(end-sanitize-ide
) \
838 $(start-sanitize-ide
) \
840 $(end-sanitize-ide
) \
864 $(start-sanitize-ide
) \
866 $(end-sanitize-ide
) \
869 # All of the target modules that can be cleaned
870 CLEAN_TARGET_MODULES
= \
872 clean-target-libstdc
++ \
874 clean-target-libg
++ \
875 clean-target-newlib \
876 clean-target-winsup \
877 clean-target-libgloss \
878 clean-target-libiberty \
880 clean-target-examples \
883 # All of the x11 modules that can be cleaned
884 CLEAN_X11_MODULES
= \
895 # The first rule in the file had better be this one. Don't put any above it.
899 # The target built for a native build.
904 $(ALL_TARGET_MODULES
) \
907 # Do a target for all the subdirectories. A ``make do-X'' will do a
908 # ``make X'' in all subdirectories (because, in general, there is a
909 # dependency (below) of X upon do-X, a ``make X'' will also do this,
910 # but it may do additional work as well).
911 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
912 # because it is so large that it can easily overflow the command line
913 # length limit on some systems.
922 do-maintainer-clean \
926 @target
=`echo $@ | sed -e 's/^do-//'`; \
928 s
=`cd $(srcdir); pwd`; export s
; \
930 for i in
$(SUBDIRS
) -dummy-
; do \
931 if
[ -f .
/$$i/Makefile
]; then \
934 for flag in
$(EXTRA_GCC_FLAGS
); do \
935 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
939 for flag in
$(EXTRA_HOST_FLAGS
); do \
940 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
944 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
946 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
947 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
948 "RANLIB=$${RANLIB}" \
949 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
951 then true
; else exit
1; fi
; \
954 @target
=`echo $@ | sed -e 's/^do-//'`; \
956 s
=`cd $(srcdir); pwd`; export s
; \
958 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
959 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
960 for flag in
$(EXTRA_TARGET_FLAGS
); do \
961 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
963 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES
; \
964 if
(cd
$(TARGET_SUBDIR
)/$$i; \
965 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
966 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
967 "RANLIB=$${RANLIB}" \
968 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
970 then true
; else exit
1; fi
; \
974 # Here are the targets which correspond to the do-X targets.
976 .PHONY
: info installcheck dvi install-info
977 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
978 .PHONY
: local-clean local-distclean local-maintainer-clean
980 installcheck: do-installcheck
983 # Make sure makeinfo is built before we do a `make info'.
986 install-info
: do-install-info
dir.
info
987 s
=`cd $(srcdir); pwd`; export s
; \
988 if
[ -f
dir.
info ] ; then \
989 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
993 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
996 -rm -f Makefile config.status config.cache
997 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
998 rm -rf
$(TARGET_SUBDIR
); \
1001 local-maintainer-clean
:
1002 @echo
"This command is intended for maintainers to use;"
1003 @echo
"it deletes files that may require special tools to rebuild."
1005 clean: do-clean local-clean
1006 mostlyclean: do-mostlyclean local-clean
1007 distclean: do-distclean local-clean local-distclean
1008 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
1009 maintainer-clean
: local-distclean
1010 realclean: maintainer-clean
1012 # This rule is used to clean specific modules.
1013 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
1014 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
1015 @
dir=`echo $@ | sed -e 's/clean-//'`; \
1016 if
[ -f .
/$${dir}/Makefile
] ; then \
1017 r
=`pwd`; export r
; \
1018 s
=`cd $(srcdir); pwd`; export s
; \
1020 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
1025 .PHONY
: $(CLEAN_TARGET_MODULES
)
1026 $(CLEAN_TARGET_MODULES
):
1027 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
1028 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1029 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1030 r
=`pwd`; export r
; \
1031 s
=`cd $(srcdir); pwd`; export s
; \
1033 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
1038 clean-target
: $(CLEAN_TARGET_MODULES
)
1043 check: $(CHECK_MODULES
) \
1044 $(CHECK_TARGET_MODULES
) \
1045 $(CHECK_X11_MODULES
) \
1048 # Installation targets.
1050 .PHONY
: install uninstall source-vault binary-vault vault-install
1051 install: $(INSTALL_TARGET
)
1054 @echo
"the uninstall target is not supported in this tree"
1057 $(MAKE
) -f .
/release
/Build-A-Release \
1058 host
=$(host_alias
) source-vault
1061 $(MAKE
) -f .
/release
/Build-A-Release \
1062 host
=$(host_alias
) target
=$(target_alias
)
1065 @if
[ -f .
/release
/vault-install
] ; then \
1066 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
1072 install.
all: install-no-fixedincludes
1073 @if
[ -f .
/gcc
/Makefile
] ; then \
1074 r
=`pwd` ; export r
; \
1077 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
1082 # inet-install is used because the I*Net wants DejaGNU installed but
1083 # not built. Similarly, gzip is built but not installed.
1085 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1087 # install-no-fixedincludes is used because Cygnus can not distribute
1088 # the fixed header files.
1089 .PHONY
: install-no-fixedincludes
1090 install-no-fixedincludes
: \
1092 $(INSTALL_MODULES
) \
1093 $(INSTALL_TARGET_MODULES
) \
1094 $(INSTALL_X11_MODULES
) \
1095 gcc-no-fixedincludes
1097 # Install the gcc headers files, but not the fixed include files,
1098 # which Cygnus is not allowed to distribute. This rule is very
1099 # dependent on the workings of the gcc Makefile.in.
1100 .PHONY
: gcc-no-fixedincludes
1101 gcc-no-fixedincludes
:
1102 @if
[ -f .
/gcc
/Makefile
]; then \
1103 rm -rf gcc
/tmp-include
; \
1104 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
1105 mkdir gcc
/include; \
1106 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
1107 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
1108 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
1109 r
=`pwd`; export r
; \
1110 s
=`cd $(srcdir); pwd` ; export s
; \
1113 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1114 rm -rf gcc
/include; \
1115 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1118 # start-sanitize-ide
1119 # Install Foundry. Avoid installing a bunch of stuff we don't need.
1121 mods
="$(INSTALL_MODULES)"; \
1122 x11_mods
="$(INSTALL_X11_MODULES)"; \
1123 for d in install-tcl install-tk install-itcl install-tix install-ilu
; do \
1124 mods
="`echo $${mods} | sed -e "s
/$$d//"`"; \
1125 x11_mods
="`echo $${x11_mods} | sed -e "s
/$$d//"`"; \
1127 $(MAKE
) INSTALL_MODULES
="$${mods}" INSTALL_X11_MODULES
="$${x11_mods}" install
1128 for d in tcl tk itcl tix ilu
; do \
1129 if
[ -f
$$d/Makefile
]; then \
1130 r
=`pwd`; export r
; \
1131 s
=`cd $(srcdir); pwd`; export s
; \
1133 (cd
$$d; $(MAKE
) $(FLAGS_TO_PASS
) install-minimal
); \
1140 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1141 # build a target all-X means to cd to X and make all.
1143 # all-gui, and all-libproc are handled specially because
1144 # they are still experimental, and if they fail to build, that
1145 # shouldn't stop "make all".
1146 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1147 $(ALL_MODULES
) all-gui all-libproc
:
1148 @
dir=`echo $@ | sed -e 's/all-//'`; \
1149 if
[ -f .
/$${dir}/Makefile
] ; then \
1150 r
=`pwd`; export r
; \
1151 s
=`cd $(srcdir); pwd`; export s
; \
1153 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1158 # These rules are used to check the modules which use FLAGS_TO_PASS.
1159 # To build a target check-X means to cd to X and make check. Some
1160 # modules are only tested in a native toolchain.
1162 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1163 $(NATIVE_CHECK_MODULES
):
1164 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1165 dir=`echo $@ | sed -e 's/check-//'`; \
1166 if
[ -f .
/$${dir}/Makefile
] ; then \
1167 r
=`pwd`; export r
; \
1168 s
=`cd $(srcdir); pwd`; export s
; \
1170 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1176 $(CROSS_CHECK_MODULES
):
1177 @
dir=`echo $@ | sed -e 's/check-//'`; \
1178 if
[ -f .
/$${dir}/Makefile
] ; then \
1179 r
=`pwd`; export r
; \
1180 s
=`cd $(srcdir); pwd`; export s
; \
1182 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1187 # This rule is used to install the modules which use FLAGS_TO_PASS.
1188 # To build a target install-X means to cd to X and make install.
1189 .PHONY
: $(INSTALL_MODULES
)
1190 $(INSTALL_MODULES
): installdirs
1191 @
dir=`echo $@ | sed -e 's/install-//'`; \
1192 if
[ -f .
/$${dir}/Makefile
] ; then \
1193 r
=`pwd`; export r
; \
1194 s
=`cd $(srcdir); pwd`; export s
; \
1196 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1201 # This rule is used to configure the modules which are built with the
1203 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1204 $(CONFIGURE_TARGET_MODULES
):
1205 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1206 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1207 r
=`pwd`; export r
; \
1208 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1209 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1210 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1211 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1212 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1214 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1215 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1216 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1219 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1222 fi
; exit
0 # break command into two pieces
1223 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1224 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1226 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1228 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1229 if
[ -d
$(srcdir)/$${dir} ]; then \
1230 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1231 r
=`pwd`; export r
; \
1232 s
=`cd $(srcdir); pwd`; export s
; \
1234 AR
="$(AR_FOR_TARGET)"; export AR
; \
1235 AS
="$(AS_FOR_TARGET)"; export AS
; \
1236 CC
="$(CC_FOR_TARGET)"; export CC
; \
1237 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1238 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1239 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1240 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1241 LD
="$(LD_FOR_TARGET)"; export LD
; \
1242 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1243 NM
="$(NM_FOR_TARGET)"; export NM
; \
1244 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1245 WINDRES
="$(WINDRES_FOR_TARGET)"; export WINDRES
; \
1246 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1247 cd
$(TARGET_SUBDIR
)/$${dir}; \
1250 topdir
=$(srcdir) ;; \
1252 case
"$(TARGET_SUBDIR)" in \
1253 .
) topdir
="../$(srcdir)" ;; \
1254 *) topdir
="../../$(srcdir)" ;; \
1257 if
[ "$(srcdir)" = "." ] ; then \
1258 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1259 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1260 if
[ -f Makefile
]; then \
1261 if
$(MAKE
) distclean; then \
1275 srcdiroption
="--srcdir=."; \
1278 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1279 libsrcdir
="$$s/$${dir}"; \
1281 if
[ -f
$${libsrcdir}/configure
] ; then \
1282 $(SHELL
) $${libsrcdir}/configure \
1283 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1284 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1286 $(SHELL
) $$s/configure \
1287 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1288 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1297 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1298 # To build a target all-X means to cd to X and make all.
1299 .PHONY
: $(ALL_TARGET_MODULES
)
1300 $(ALL_TARGET_MODULES
):
1301 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1302 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1303 r
=`pwd`; export r
; \
1304 s
=`cd $(srcdir); pwd`; export s
; \
1306 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1311 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1312 # To build a target install-X means to cd to X and make install.
1313 .PHONY
: $(CHECK_TARGET_MODULES
)
1314 $(CHECK_TARGET_MODULES
):
1315 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1316 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1317 r
=`pwd`; export r
; \
1318 s
=`cd $(srcdir); pwd`; export s
; \
1320 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1325 # This rule is used to install the modules which use
1326 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1328 .PHONY
: $(INSTALL_TARGET_MODULES
)
1329 $(INSTALL_TARGET_MODULES
): installdirs
1330 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1331 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1332 r
=`pwd`; export r
; \
1333 s
=`cd $(srcdir); pwd`; export s
; \
1335 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1336 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1341 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1342 # To build a target all-X means to cd to X and make all.
1343 .PHONY
: $(ALL_X11_MODULES
)
1345 @
dir=`echo $@ | sed -e 's/all-//'`; \
1346 if
[ -f .
/$${dir}/Makefile
] ; then \
1347 r
=`pwd`; export r
; \
1348 s
=`cd $(srcdir); pwd`; export s
; \
1351 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1356 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1357 # To build a target check-X means to cd to X and make all.
1358 .PHONY
: $(CHECK_X11_MODULES
)
1359 $(CHECK_X11_MODULES
):
1360 @
dir=`echo $@ | sed -e 's/check-//'`; \
1361 if
[ -f .
/$${dir}/Makefile
] ; then \
1362 r
=`pwd`; export r
; \
1363 s
=`cd $(srcdir); pwd`; export s
; \
1366 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1371 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1372 # To build a target install-X means to cd to X and make install.
1373 .PHONY
: $(INSTALL_X11_MODULES
)
1374 $(INSTALL_X11_MODULES
): installdirs
1375 @
dir=`echo $@ | sed -e 's/install-//'`; \
1376 if
[ -f .
/$${dir}/Makefile
] ; then \
1377 r
=`pwd`; export r
; \
1378 s
=`cd $(srcdir); pwd`; export s
; \
1381 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1386 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1389 @if
[ -f .
/gcc
/Makefile
] ; then \
1390 r
=`pwd`; export r
; \
1391 s
=`cd $(srcdir); pwd`; export s
; \
1393 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1398 .PHONY
: all-bootstrap
1400 @if
[ -f .
/gcc
/Makefile
] ; then \
1401 r
=`pwd`; export r
; \
1402 s
=`cd $(srcdir); pwd`; export s
; \
1404 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) bootstrap
); \
1411 @if
[ -f .
/gcc
/Makefile
] ; then \
1412 r
=`pwd`; export r
; \
1413 s
=`cd $(srcdir); pwd`; export s
; \
1415 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1422 @if
[ -f .
/gcc
/Makefile
] ; then \
1423 r
=`pwd`; export r
; \
1424 s
=`cd $(srcdir); pwd`; export s
; \
1426 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1432 # EXPERIMENTAL STUFF
1433 # This rule is used to install the modules which use FLAGS_TO_PASS.
1434 # To build a target install-X means to cd to X and make install.
1435 .PHONY
: install-dosrel
1436 install-dosrel
: installdirs info
1437 @
dir=`echo $@ | sed -e 's/install-//'`; \
1438 if
[ -f .
/$${dir}/Makefile
] ; then \
1439 r
=`pwd`; export r
; \
1440 s
=`cd $(srcdir); pwd`; export s
; \
1442 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1447 install-dosrel-fake
:
1450 # This is a list of inter-dependencies among modules.
1452 all-autoconf
: all-m4 all-texinfo
1456 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc
1457 all-bison
: all-texinfo
1460 configure-target-cygmon
: $(ALL_GCC
)
1461 all-target-cygmon
: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1463 all-dejagnu
: all-tcl all-expect all-tk
1464 all-diff
: all-libiberty
1466 all-emacs19
: all-bison all-byacc
1468 configure-target-examples
: $(ALL_GCC
)
1469 all-target-examples
: configure-target-examples
1470 all-expect
: all-tcl all-tk
1471 all-fileutils
: all-libiberty
1474 all-flex
: all-libiberty all-bison all-byacc
1475 all-gas
: all-libiberty all-opcodes all-bfd
1479 all-gcc
: all-bison all-byacc all-binutils all-gas all-ld
1480 all-bootstrap
: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1481 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui
1482 # start-sanitize-ide
1483 GDB_TK
= all-tk all-tcl all-itcl all-tix all-libgui all-libide
1485 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1487 configure-target-gperf
: $(ALL_GCC
)
1488 all-target-gperf
: configure-target-gperf all-target-libiberty all-target-libstdc
++
1489 all-gprof
: all-libiberty all-bfd all-opcodes
1490 all-grep
: all-libiberty
1491 all-grez
: all-libiberty all-bfd all-opcodes
1492 all-gui
: all-gdb all-libproc all-target-librx
1494 all-gzip
: all-libiberty
1495 all-hello
: all-libiberty
1496 # start-sanitize-ide
1500 all-inet
: all-tcl all-send-pr all-perl
1501 all-ispell
: all-emacs19
1502 all-itcl
: all-tcl all-tk
1503 # start-sanitize-ide
1504 all-jstools
: all-tcl all-tk all-tix all-libgui all-libide
1506 all-ld
: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex
1507 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1508 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
++
1509 configure-target-libgloss
: $(ALL_GCC
)
1510 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1511 configure-target-libio
: $(ALL_GCC
)
1512 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1513 check-target-libio
: all-target-libstdc
++
1514 all-libgui
: all-tcl all-tk all-itcl
1516 # start-sanitize-ide
1517 all-libide
: all-tcl all-tk all-itcl all-ilu all-libgui
1519 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1520 all-target-librx
: configure-target-librx
1521 configure-target-libstdc
++: $(ALL_GCC
)
1522 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1523 all-m4
: all-libiberty
1524 all-make
: all-libiberty
1526 configure-target-newlib
: $(ALL_GCC
)
1527 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1528 all-opcodes
: all-bfd all-libiberty
1529 all-patch
: all-libiberty
1531 all-prms
: all-libiberty
1534 all-recode
: all-libiberty
1535 all-sed
: all-libiberty
1536 all-send-pr
: all-prms
1538 all-sim
: all-libiberty all-bfd all-opcodes all-readline
1539 all-snavigator
: all-tcl all-tk all-tix all-itcl all-db all-grep
1540 all-tar
: all-libiberty
1542 all-tclX
: all-tcl all-tk
1544 all-texinfo
: all-libiberty
1546 all-tgas
: all-libiberty all-bfd all-opcodes
1548 all-tix
: all-tcl all-tk
1549 # start-sanitize-ide
1550 all-vmake
: all-tcl all-tk all-itcl all-tix all-libgui all-libide
1553 all-target-winsup
: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
1554 configure-target-winsup
: configure-target-newlib
1555 all-uudecode
: all-libiberty
1556 configure-target-libiberty
: $(ALL_GCC
)
1557 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1558 all-target
: $(ALL_TARGET_MODULES
)
1559 install-target
: $(INSTALL_TARGET_MODULES
)
1560 # start-sanitize-gdbtk
1561 install-gdbtk
: install-tcl install-tk install-itcl install-tix install-libgui install-gdb
1563 ### other supporting targets
1569 installdirs: mkinstalldirs
1570 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1572 dir.
info: do-install-info
1573 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1574 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1575 mv
-f
dir.
info.new
dir.
info ; \
1580 @echo
"Building a full distribution of this tree isn't done"
1581 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1585 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1586 # ability to use several tags files at once, so there is probably no need
1587 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1588 # (if we felt like it) have this Makefile write a piece of elisp which
1589 # the user could load to tell emacs19 where all the TAGS files we just
1593 # with the gnu make, this is done automatically.
1595 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
1596 $(SHELL
) .
/config.status
1599 # Support for building net releases
1601 # Files in devo used in any net release.
1602 # ChangeLog omitted because it may refer to files which are not in this
1603 # distribution (perhaps it would be better to include it anyway).
1604 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1605 config.guess config.sub config move-if-change \
1606 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1607 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1608 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1610 # Files in devo/etc used in any net release.
1611 # ChangeLog omitted because it may refer to files which are not in this
1612 # distribution (perhaps it would be better to include it anyway).
1613 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1614 make-stds.texi standards.
info*
1616 # When you use `make setup-dirs' or `make taz' you should always redefine
1618 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1622 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1623 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1624 # Take out texinfo from a few places; make simple BISON=bison line.
1625 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1626 -e
'/^ install-texinfo /d' \
1628 mv
-f tmp Makefile.in
1630 $(start-sanitize-Sanitize
)
1631 @if
[ -f .Sanitize
] ; then echo
"RUN Sanitize FIRST!" ; false
; fi
;
1632 $(end-sanitize-Sanitize
)
1634 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1635 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1636 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1637 # Make links, and run "make diststuff" or "make info" when needed.
1638 rm -rf proto-toplev
; mkdir proto-toplev
1639 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1640 for d in
$$dirs ; do \
1641 if
[ -d
$$d ]; then \
1642 if
[ ! -f
$$d/Makefile
] ; then true
; \
1643 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1644 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1645 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1646 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1648 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1649 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1651 ln
-s ..
/$$d proto-toplev
/$$d ; \
1653 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1655 cd etc
; $(MAKE
) info
1658 mkdir proto-toplev
/etc
1659 (cd proto-toplev
/etc
; \
1660 for i in
$(ETC_SUPPORT
); do \
1661 ln
-s ..
/..
/etc
/$$i .
; \
1664 # Take out texinfo from configurable dirs
1665 rm proto-toplev
/configure.in
1666 sed
-e
'/^host_tools=/s/texinfo //' \
1667 <configure.in
>proto-toplev
/configure.in
1669 mkdir proto-toplev
/texinfo
1670 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1671 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1672 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1673 if
test -r texinfo
/util
/tex3patch
; then \
1674 mkdir proto-toplev
/texinfo
/util
&& \
1675 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1677 chmod og
=u
`find . -print`
1678 if grep AM_INIT_AUTOMAKE
$(TOOL
)/configure.in
>/dev
/null
2>&1; then \
1679 ver
=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1681 ver
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1683 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) VER
=$$ver
1686 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1687 -rm -f
$(TOOL
)-$(VER
)
1688 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1689 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1690 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1692 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1693 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1696 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes setup.com makefile.vms
1697 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1698 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1699 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1701 # The FSF "binutils" release includes gprof and ld.
1702 .PHONY
: binutils.
tar.gz
1703 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof setup.com makefile.vms
1704 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1705 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1706 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1708 .PHONY
: gas
+binutils.
tar.gz
1709 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1710 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1711 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1712 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1714 .PHONY
: libg
++.
tar.gz
1715 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1716 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1717 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1718 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1720 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1721 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1722 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1723 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1726 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils
1727 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1728 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1729 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1730 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1732 .PHONY
: newlib.
tar.gz
1733 NEWLIB_SUPPORT_DIRS
=libgloss
1734 # taz configures for the sun4 target which won't configure newlib.
1735 # We need newlib configured so that the .info files are made.
1736 # Unfortunately, it is not enough to just configure newlib separately:
1737 # taz will build the .info files but since SUBDIRS won't contain newlib,
1738 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1739 # used in building the .info files, eg: *.def, *.ref).
1740 # The problem isn't solvable however without a lot of extra work because
1741 # target libraries are built in subdir $(target_alias) which gets nuked during
1742 # the make distclean. For now punt on the issue of shipping newlib info files
1743 # with newlib net releases and wait for a day when some native target (sun4?)
1744 # supports newlib (if only minimally).
1745 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1746 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1747 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1748 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1753 # start-sanitize-chill
1754 ## This is ugly, but I don't want GNU make to put these variables in
1755 ## the environment. Older makes will see this as a set of targets
1756 ## with no dependencies and no actions.
1757 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1758 # end-sanitize-chill
1760 # end of Makefile.in