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/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/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 "gxx_include_dir=$(gxx_include_dir)" \
356 "INSTALL=$(INSTALL)" \
357 "INSTALL_DATA=$(INSTALL_DATA)" \
358 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
359 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
360 "LDFLAGS=$(LDFLAGS)" \
362 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
363 "LIBCFLAGS=$(LIBCFLAGS)" \
364 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
365 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
366 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
367 "local_prefix=$(local_prefix)" \
370 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
371 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
372 "PICFLAG=$(PICFLAG)" \
373 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
374 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
375 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
378 "RUNTEST=$(RUNTEST)" \
379 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
380 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
383 "datadir=$(datadir)" \
384 "exec_prefix=$(exec_prefix)" \
385 "includedir=$(includedir)" \
386 "infodir=$(infodir)" \
388 "libexecdir=$(libexecdir)" \
389 "localstatedir=$(localstatedir)" \
391 "oldincludedir=$(oldincludedir)" \
393 "sbindir=$(sbindir)" \
394 "sharedstatedir=$(sharedstatedir)" \
395 "sysconfdir=$(sysconfdir)" \
398 # Flags to pass down to most sub-makes, in which we're building with
399 # the host environment.
400 # If any variables are added here, they must be added to do-*, below.
406 'DLLTOOL=$(DLLTOOL)' \
412 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
414 # Flags that are concerned with the location of the X11 include files
417 # NOTE: until the top-level is getting the values via autoconf, it only
418 # causes problems to have this top-level Makefile overriding the autoconf-set
419 # values in child directories. Only variables that don't conflict with
420 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
422 X11_FLAGS_TO_PASS = \
423 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
424 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
426 # Flags to pass down to makes which are built with the target environment.
427 # The double $ decreases the length of the command line; the variables
428 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
429 # If any variables are added here, they must be added to do-*, below.
430 EXTRA_TARGET_FLAGS = \
431 'AR=$$(AR_FOR_TARGET)' \
432 'AS=$$(AS_FOR_TARGET)' \
433 'CC=$$(CC_FOR_TARGET)' \
434 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
435 'CXX=$$(CXX_FOR_TARGET)' \
436 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
437 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
438 'LD=$$(LD_FOR_TARGET)' \
439 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
440 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
441 'NM=$$(NM_FOR_TARGET)' \
442 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
443 'RANLIB=$$(RANLIB_FOR_TARGET)' \
444 'WINDRES=$$(WINDRES_FOR_TARGET)'
446 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
448 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
449 # unfortunately needs the native compiler and the target ar and
451 # If any variables are added here, they must be added to do-*, below.
452 # The HOST_* variables are a special case, which are used for the gcc
453 # cross-building scheme.
455 'AR=$$(AR_FOR_TARGET)' \
459 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
460 'HOST_CC=$(CC_FOR_BUILD)' \
461 'HOST_PREFIX=$(HOST_PREFIX)' \
462 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
464 'RANLIB=$$(RANLIB_FOR_TARGET)' \
465 'WINDRES=$$(WINDRES_FOR_TARGET)' \
466 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
467 "`if test x'$(LANGUAGES)' != x; then echo 'LANGUAGES=$(LANGUAGES)'; else echo 'XFOO=bar'; fi`" \
468 "`if test x'$(STMP_FIXPROTO)' != x; then echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)'; else echo 'XFOO=bar'; fi`" \
469 "`if test x'$(LIMITS_H_TEST)' != x; then echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)'; else echo 'XFOO=bar'; fi`" \
470 "`if test x'$(LIBGCC1_TEST)' != x; then echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)'; else echo 'XFOO=bar'; fi`" \
471 "`if test x'$(LIBGCC2_CFLAGS)' != x; then echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
472 "`if test x'$(LIBGCC2_DEBUG_CFLAGS)' != x; then echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
473 "`if test x'$(LIBGCC2_INCLUDES)' != x; then echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)'; else echo 'XFOO=bar'; fi`" \
474 "`if test x'$(ENQUIRE)' != x; then echo 'ENQUIRE=$(ENQUIRE)'; else echo 'XFOO=bar'; fi`" \
475 "`if test x'$(BOOT_CFLAGS)' != x; then echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)'; else echo 'XFOO=bar'; fi`"
477 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
479 # This is a list of the targets for all of the modules which are compiled
480 # using $(FLAGS_TO_PASS).
508 $(start-sanitize-ide) \
510 $(end-sanitize-ide) \
515 $(start-sanitize-ide) \
517 $(end-sanitize-ide) \
521 $(start-sanitize-ide) \
523 $(end-sanitize-ide) \
547 $(start-sanitize-ide) \
549 $(end-sanitize-ide) \
552 # This is a list of the check targets for all of the modules which are
553 # compiled using $(FLAGS_TO_PASS).
555 # The list is in two parts. The first lists those tools which
556 # are tested as part of the host's native tool-chain, and not
557 # tested in a cross configuration.
558 NATIVE_CHECK_MODULES = \
563 CROSS_CHECK_MODULES = \
585 $(start-sanitize-ide) \
587 $(end-sanitize-ide) \
592 $(start-sanitize-ide) \
594 $(end-sanitize-ide) \
598 $(start-sanitize-ide) \
600 $(end-sanitize-ide) \
623 $(start-sanitize-ide) \
625 $(end-sanitize-ide) \
628 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
630 # This is a list of the install targets for all of the modules which are
631 # compiled using $(FLAGS_TO_PASS).
632 # We put install-opcodes before install-binutils because the installed
633 # binutils might be on PATH, and they might need the shared opcodes
663 $(start-sanitize-ide) \
665 $(end-sanitize-ide) \
670 $(start-sanitize-ide) \
672 $(end-sanitize-ide) \
676 $(start-sanitize-ide) \
678 $(end-sanitize-ide) \
700 $(start-sanitize-ide) \
702 $(end-sanitize-ide) \
705 # This is a list of the targets for all of the modules which are compiled
706 # using $(X11_FLAGS_TO_PASS).
718 # This is a list of the check targets for all of the modules which are
719 # compiled using $(X11_FLAGS_TO_PASS).
720 CHECK_X11_MODULES = \
730 # This is a list of the install targets for all the modules which are
731 # compiled using $(X11_FLAGS_TO_PASS).
732 INSTALL_X11_MODULES = \
743 # This is a list of the targets for all of the modules which are compiled
744 # using $(TARGET_FLAGS_TO_PASS).
745 ALL_TARGET_MODULES = \
747 all-target-libstdc++ \
752 all-target-libgloss \
753 all-target-libiberty \
755 all-target-examples \
758 # This is a list of the configure targets for all of the modules which
759 # are compiled using the target tools.
760 CONFIGURE_TARGET_MODULES = \
761 configure-target-libio \
762 configure-target-libstdc++ \
763 configure-target-librx \
764 configure-target-libg++ \
765 configure-target-newlib \
766 configure-target-winsup \
767 configure-target-libgloss \
768 configure-target-libiberty \
769 configure-target-gperf \
770 configure-target-examples \
771 configure-target-cygmon
773 # This is a list of the check targets for all of the modules which are
774 # compiled using $(TARGET_FLAGS_TO_PASS).
775 CHECK_TARGET_MODULES = \
777 check-target-libstdc++ \
778 check-target-libg++ \
779 check-target-newlib \
780 check-target-winsup \
781 check-target-libiberty \
784 # This is a list of the install targets for all of the modules which are
785 # compiled using $(TARGET_FLAGS_TO_PASS).
786 INSTALL_TARGET_MODULES = \
787 install-target-libio \
788 install-target-libstdc++ \
789 install-target-libg++ \
790 install-target-newlib \
791 install-target-winsup \
792 install-target-libgloss \
793 install-target-libiberty \
796 # This is a list of the targets for which we can do a clean-{target}.
824 $(start-sanitize-ide) \
826 $(end-sanitize-ide) \
831 $(start-sanitize-ide) \
833 $(end-sanitize-ide) \
837 $(start-sanitize-ide) \
839 $(end-sanitize-ide) \
863 $(start-sanitize-ide) \
865 $(end-sanitize-ide) \
868 # All of the target modules that can be cleaned
869 CLEAN_TARGET_MODULES = \
871 clean-target-libstdc++ \
873 clean-target-libg++ \
874 clean-target-newlib \
875 clean-target-winsup \
876 clean-target-libgloss \
877 clean-target-libiberty \
879 clean-target-examples \
882 # All of the x11 modules that can be cleaned
883 CLEAN_X11_MODULES = \
894 # The first rule in the file had better be this one. Don't put any above it.
898 # The target built for a native build.
903 $(ALL_TARGET_MODULES) \
906 # Do a target for all the subdirectories. A ``make do-X'' will do a
907 # ``make X'' in all subdirectories (because, in general, there is a
908 # dependency (below) of X upon do-X, a ``make X'' will also do this,
909 # but it may do additional work as well).
910 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
911 # because it is so large that it can easily overflow the command line
912 # length limit on some systems.
921 do-maintainer-clean \
925 @target=`echo $@ | sed -e 's/^do-//'`; \
927 s=`cd $(srcdir); pwd`; export s; \
929 for i in $(SUBDIRS) -dummy-; do \
930 if [ -f ./$$i/Makefile ]; then \
933 for flag in $(EXTRA_GCC_FLAGS); do \
934 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
938 for flag in $(EXTRA_HOST_FLAGS); do \
939 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
943 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
945 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
946 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
947 "RANLIB=$${RANLIB}" \
948 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
950 then true; else exit 1; fi; \
953 @target=`echo $@ | sed -e 's/^do-//'`; \
955 s=`cd $(srcdir); pwd`; export s; \
957 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
958 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
959 for flag in $(EXTRA_TARGET_FLAGS); do \
960 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
962 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
963 if (cd $(TARGET_SUBDIR)/$$i; \
964 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
965 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
966 "RANLIB=$${RANLIB}" \
967 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
969 then true; else exit 1; fi; \
973 # Here are the targets which correspond to the do-X targets.
975 .PHONY: info installcheck dvi install-info
976 .PHONY: clean distclean mostlyclean maintainer-clean realclean
977 .PHONY: local-clean local-distclean local-maintainer-clean
979 installcheck: do-installcheck
982 # Make sure makeinfo is built before we do a `make info'.
985 install-info: do-install-info dir.info
986 s=`cd $(srcdir); pwd`; export s; \
987 if [ -f dir.info ] ; then \
988 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
992 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
995 -rm -f Makefile config.status config.cache
996 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
997 rm -rf $(TARGET_SUBDIR); \
1000 local-maintainer-clean:
1001 @echo "This command is intended for maintainers to use;"
1002 @echo "it deletes files that may require special tools to rebuild."
1004 clean: do-clean local-clean
1005 mostlyclean: do-mostlyclean local-clean
1006 distclean: do-distclean local-clean local-distclean
1007 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
1008 maintainer-clean: local-distclean
1009 realclean: maintainer-clean
1011 # This rule is used to clean specific modules.
1012 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
1013 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
1014 @dir=`echo $@ | sed -e 's/clean-//'`; \
1015 if [ -f ./$${dir}/Makefile ] ; then \
1016 r=`pwd`; export r; \
1017 s=`cd $(srcdir); pwd`; export s; \
1019 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
1024 .PHONY: $(CLEAN_TARGET_MODULES)
1025 $(CLEAN_TARGET_MODULES):
1026 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
1027 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1028 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1029 r=`pwd`; export r; \
1030 s=`cd $(srcdir); pwd`; export s; \
1032 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
1037 clean-target: $(CLEAN_TARGET_MODULES)
1042 check: $(CHECK_MODULES) \
1043 $(CHECK_TARGET_MODULES) \
1044 $(CHECK_X11_MODULES) \
1047 # Installation targets.
1049 .PHONY: install uninstall source-vault binary-vault vault-install
1050 install: $(INSTALL_TARGET)
1053 @echo "the uninstall target is not supported in this tree"
1056 $(MAKE) -f ./release/Build-A-Release \
1057 host=$(host_alias) source-vault
1060 $(MAKE) -f ./release/Build-A-Release \
1061 host=$(host_alias) target=$(target_alias)
1064 @if [ -f ./release/vault-install ] ; then \
1065 ./release/vault-install $(host_alias) $(target_alias) ; \
1071 install.all: install-no-fixedincludes
1072 @if [ -f ./gcc/Makefile ] ; then \
1073 r=`pwd` ; export r ; \
1076 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1081 # inet-install is used because the I*Net wants DejaGNU installed but
1082 # not built. Similarly, gzip is built but not installed.
1084 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1086 # install-no-fixedincludes is used because Cygnus can not distribute
1087 # the fixed header files.
1088 .PHONY: install-no-fixedincludes
1089 install-no-fixedincludes: \
1091 $(INSTALL_MODULES) \
1092 $(INSTALL_TARGET_MODULES) \
1093 $(INSTALL_X11_MODULES) \
1094 gcc-no-fixedincludes
1096 # Install the gcc headers files, but not the fixed include files,
1097 # which Cygnus is not allowed to distribute. This rule is very
1098 # dependent on the workings of the gcc Makefile.in.
1099 .PHONY: gcc-no-fixedincludes
1100 gcc-no-fixedincludes:
1101 @if [ -f ./gcc/Makefile ]; then \
1102 rm -rf gcc/tmp-include; \
1103 mv gcc/include gcc/tmp-include 2>/dev/null; \
1104 mkdir gcc/include; \
1105 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1106 touch gcc/stmp-fixinc gcc/include/fixed; \
1107 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1108 r=`pwd`; export r; \
1109 s=`cd $(srcdir); pwd` ; export s; \
1112 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1113 rm -rf gcc/include; \
1114 mv gcc/tmp-include gcc/include 2>/dev/null; \
1117 # start-sanitize-ide
1118 # Install Foundry. Avoid installing a bunch of stuff we don't need.
1120 mods="$(INSTALL_MODULES)"; \
1121 x11_mods="$(INSTALL_X11_MODULES)"; \
1122 for d in install-tcl install-tk install-itcl install-tix install-ilu; do \
1123 mods="`echo $${mods} | sed -e "s/$$d//"`"; \
1124 x11_mods="`echo $${x11_mods} | sed -e "s/$$d//"`"; \
1126 $(MAKE) INSTALL_MODULES="$${mods}" INSTALL_X11_MODULES="$${x11_mods}" install
1127 for d in tcl tk itcl tix ilu; do \
1128 if [ -f $$d/Makefile ]; then \
1129 r=`pwd`; export r; \
1130 s=`cd $(srcdir); pwd`; export s; \
1132 (cd $$d; $(MAKE) $(FLAGS_TO_PASS) install-minimal); \
1139 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1140 # build a target all-X means to cd to X and make all.
1142 # all-gui, and all-libproc are handled specially because
1143 # they are still experimental, and if they fail to build, that
1144 # shouldn't stop "make all".
1145 .PHONY: $(ALL_MODULES) all-gui all-libproc
1146 $(ALL_MODULES) all-gui all-libproc:
1147 @dir=`echo $@ | sed -e 's/all-//'`; \
1148 if [ -f ./$${dir}/Makefile ] ; then \
1149 r=`pwd`; export r; \
1150 s=`cd $(srcdir); pwd`; export s; \
1152 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1157 # These rules are used to check the modules which use FLAGS_TO_PASS.
1158 # To build a target check-X means to cd to X and make check. Some
1159 # modules are only tested in a native toolchain.
1161 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1162 $(NATIVE_CHECK_MODULES):
1163 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1164 dir=`echo $@ | sed -e 's/check-//'`; \
1165 if [ -f ./$${dir}/Makefile ] ; then \
1166 r=`pwd`; export r; \
1167 s=`cd $(srcdir); pwd`; export s; \
1169 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1175 $(CROSS_CHECK_MODULES):
1176 @dir=`echo $@ | sed -e 's/check-//'`; \
1177 if [ -f ./$${dir}/Makefile ] ; then \
1178 r=`pwd`; export r; \
1179 s=`cd $(srcdir); pwd`; export s; \
1181 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1186 # This rule is used to install the modules which use FLAGS_TO_PASS.
1187 # To build a target install-X means to cd to X and make install.
1188 .PHONY: $(INSTALL_MODULES)
1189 $(INSTALL_MODULES): installdirs
1190 @dir=`echo $@ | sed -e 's/install-//'`; \
1191 if [ -f ./$${dir}/Makefile ] ; then \
1192 r=`pwd`; export r; \
1193 s=`cd $(srcdir); pwd`; export s; \
1195 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1200 # This rule is used to configure the modules which are built with the
1202 .PHONY: $(CONFIGURE_TARGET_MODULES)
1203 $(CONFIGURE_TARGET_MODULES):
1204 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1205 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1206 r=`pwd`; export r; \
1207 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1208 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1209 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1210 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1211 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1213 echo "Multilibs changed for $${dir}, reconfiguring"; \
1214 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1215 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1218 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1221 fi; exit 0 # break command into two pieces
1222 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1223 if [ ! -d $(TARGET_SUBDIR) ]; then \
1225 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1227 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1228 if [ -d $(srcdir)/$${dir} ]; then \
1229 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1230 r=`pwd`; export r; \
1231 s=`cd $(srcdir); pwd`; export s; \
1233 AR="$(AR_FOR_TARGET)"; export AR; \
1234 AS="$(AS_FOR_TARGET)"; export AS; \
1235 CC="$(CC_FOR_TARGET)"; export CC; \
1236 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1237 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1238 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1239 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1240 LD="$(LD_FOR_TARGET)"; export LD; \
1241 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1242 NM="$(NM_FOR_TARGET)"; export NM; \
1243 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1244 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1245 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1246 cd $(TARGET_SUBDIR)/$${dir}; \
1249 topdir=$(srcdir) ;; \
1251 case "$(TARGET_SUBDIR)" in \
1252 .) topdir="../$(srcdir)" ;; \
1253 *) topdir="../../$(srcdir)" ;; \
1256 if [ "$(srcdir)" = "." ] ; then \
1257 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1258 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1259 if [ -f Makefile ]; then \
1260 if $(MAKE) distclean; then \
1274 srcdiroption="--srcdir=."; \
1277 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1278 libsrcdir="$$s/$${dir}"; \
1280 if [ -f $${libsrcdir}/configure ] ; then \
1281 $(SHELL) $${libsrcdir}/configure \
1282 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1283 --with-target-subdir="$(TARGET_SUBDIR)"; \
1285 $(SHELL) $$s/configure \
1286 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1287 --with-target-subdir="$(TARGET_SUBDIR)"; \
1296 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1297 # To build a target all-X means to cd to X and make all.
1298 .PHONY: $(ALL_TARGET_MODULES)
1299 $(ALL_TARGET_MODULES):
1300 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1301 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1302 r=`pwd`; export r; \
1303 s=`cd $(srcdir); pwd`; export s; \
1305 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1310 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1311 # To build a target install-X means to cd to X and make install.
1312 .PHONY: $(CHECK_TARGET_MODULES)
1313 $(CHECK_TARGET_MODULES):
1314 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1315 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1316 r=`pwd`; export r; \
1317 s=`cd $(srcdir); pwd`; export s; \
1319 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1324 # This rule is used to install the modules which use
1325 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1327 .PHONY: $(INSTALL_TARGET_MODULES)
1328 $(INSTALL_TARGET_MODULES): installdirs
1329 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1330 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1331 r=`pwd`; export r; \
1332 s=`cd $(srcdir); pwd`; export s; \
1334 (cd $(TARGET_SUBDIR)/$${dir}; \
1335 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1340 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1341 # To build a target all-X means to cd to X and make all.
1342 .PHONY: $(ALL_X11_MODULES)
1344 @dir=`echo $@ | sed -e 's/all-//'`; \
1345 if [ -f ./$${dir}/Makefile ] ; then \
1346 r=`pwd`; export r; \
1347 s=`cd $(srcdir); pwd`; export s; \
1350 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1355 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1356 # To build a target check-X means to cd to X and make all.
1357 .PHONY: $(CHECK_X11_MODULES)
1358 $(CHECK_X11_MODULES):
1359 @dir=`echo $@ | sed -e 's/check-//'`; \
1360 if [ -f ./$${dir}/Makefile ] ; then \
1361 r=`pwd`; export r; \
1362 s=`cd $(srcdir); pwd`; export s; \
1365 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1370 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1371 # To build a target install-X means to cd to X and make install.
1372 .PHONY: $(INSTALL_X11_MODULES)
1373 $(INSTALL_X11_MODULES): installdirs
1374 @dir=`echo $@ | sed -e 's/install-//'`; \
1375 if [ -f ./$${dir}/Makefile ] ; then \
1376 r=`pwd`; export r; \
1377 s=`cd $(srcdir); pwd`; export s; \
1380 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1385 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1388 @if [ -f ./gcc/Makefile ] ; then \
1389 r=`pwd`; export r; \
1390 s=`cd $(srcdir); pwd`; export s; \
1392 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1397 .PHONY: all-bootstrap
1399 @if [ -f ./gcc/Makefile ] ; then \
1400 r=`pwd`; export r; \
1401 s=`cd $(srcdir); pwd`; export s; \
1403 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
1410 @if [ -f ./gcc/Makefile ] ; then \
1411 r=`pwd`; export r; \
1412 s=`cd $(srcdir); pwd`; export s; \
1414 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1421 @if [ -f ./gcc/Makefile ] ; then \
1422 r=`pwd`; export r; \
1423 s=`cd $(srcdir); pwd`; export s; \
1425 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1431 # EXPERIMENTAL STUFF
1432 # This rule is used to install the modules which use FLAGS_TO_PASS.
1433 # To build a target install-X means to cd to X and make install.
1434 .PHONY: install-dosrel
1435 install-dosrel: installdirs info
1436 @dir=`echo $@ | sed -e 's/install-//'`; \
1437 if [ -f ./$${dir}/Makefile ] ; then \
1438 r=`pwd`; export r; \
1439 s=`cd $(srcdir); pwd`; export s; \
1441 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1446 install-dosrel-fake:
1449 # This is a list of inter-dependencies among modules.
1451 all-autoconf: all-m4 all-texinfo
1455 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc
1456 all-bison: all-texinfo
1459 configure-target-cygmon: $(ALL_GCC)
1460 all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1462 all-dejagnu: all-tcl all-expect all-tk
1463 all-diff: all-libiberty
1465 all-emacs19: all-bison all-byacc
1467 configure-target-examples: $(ALL_GCC)
1468 all-target-examples: configure-target-examples
1469 all-expect: all-tcl all-tk
1470 all-fileutils: all-libiberty
1473 all-flex: all-libiberty all-bison all-byacc
1474 all-gas: all-libiberty all-opcodes all-bfd
1478 all-gcc: all-bison all-byacc all-binutils all-gas all-ld
1479 all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1480 GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
1481 # start-sanitize-ide
1482 GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui all-libide
1484 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1486 configure-target-gperf: $(ALL_GCC)
1487 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
1488 all-gprof: all-libiberty all-bfd all-opcodes
1489 all-grep: all-libiberty
1490 all-grez: all-libiberty all-bfd all-opcodes
1491 all-gui: all-gdb all-libproc all-target-librx
1493 all-gzip: all-libiberty
1494 all-hello: all-libiberty
1495 # start-sanitize-ide
1499 all-inet: all-tcl all-send-pr all-perl
1500 all-ispell: all-emacs19
1501 all-itcl: all-tcl all-tk
1502 # start-sanitize-ide
1503 all-jstools: all-tcl all-tk all-tix all-libgui all-libide
1505 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex
1506 configure-target-libg++: $(ALL_GCC) configure-target-librx
1507 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++
1508 configure-target-libgloss: $(ALL_GCC)
1509 all-target-libgloss: configure-target-libgloss configure-target-newlib
1510 configure-target-libio: $(ALL_GCC)
1511 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1512 check-target-libio: all-target-libstdc++
1513 all-libgui: all-tcl all-tk all-itcl
1515 # start-sanitize-ide
1516 all-libide: all-tcl all-tk all-itcl all-ilu all-libgui
1518 configure-target-librx: $(ALL_GCC) configure-target-newlib
1519 all-target-librx: configure-target-librx
1520 configure-target-libstdc++: $(ALL_GCC)
1521 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1522 all-m4: all-libiberty
1523 all-make: all-libiberty
1525 configure-target-newlib: $(ALL_GCC)
1526 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1527 all-opcodes: all-bfd all-libiberty
1528 all-patch: all-libiberty
1530 all-prms: all-libiberty
1533 all-recode: all-libiberty
1534 all-sed: all-libiberty
1535 all-send-pr: all-prms
1537 all-sim: all-libiberty all-bfd all-opcodes all-readline
1538 all-sn: all-tcl all-tk all-tix all-itcl all-db all-grep
1539 all-tar: all-libiberty
1541 all-tclX: all-tcl all-tk
1543 all-texinfo: all-libiberty
1545 all-tgas: all-libiberty all-bfd all-opcodes
1547 all-tix: all-tcl all-tk
1548 # start-sanitize-ide
1549 all-vmake: all-tcl all-tk all-itcl all-tix all-libgui all-libide
1552 all-target-winsup: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
1553 configure-target-winsup: configure-target-newlib
1554 all-uudecode: all-libiberty
1555 configure-target-libiberty: $(ALL_GCC)
1556 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1557 all-target: $(ALL_TARGET_MODULES)
1558 install-itcl: install-tcl
1559 install-target: $(INSTALL_TARGET_MODULES)
1561 ### other supporting targets
1567 installdirs: mkinstalldirs
1568 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1570 dir.info: do-install-info
1571 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1572 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1573 mv -f dir.info.new dir.info ; \
1578 @echo "Building a full distribution of this tree isn't done"
1579 @echo "via 'make dist'. Check out the etc/ subdirectory"
1583 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1584 # ability to use several tags files at once, so there is probably no need
1585 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1586 # (if we felt like it) have this Makefile write a piece of elisp which
1587 # the user could load to tell emacs19 where all the TAGS files we just
1591 # with the gnu make, this is done automatically.
1593 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
1594 $(SHELL) ./config.status
1597 # Support for building net releases
1599 # Files in devo used in any net release.
1600 # ChangeLog omitted because it may refer to files which are not in this
1601 # distribution (perhaps it would be better to include it anyway).
1602 DEVO_SUPPORT= README Makefile.in configure configure.in \
1603 config.guess config.sub config move-if-change \
1604 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1605 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1606 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1608 # Files in devo/etc used in any net release.
1609 # ChangeLog omitted because it may refer to files which are not in this
1610 # distribution (perhaps it would be better to include it anyway).
1611 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1612 make-stds.texi standards.info*
1614 # When you use `make setup-dirs' or `make taz' you should always redefine
1616 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1620 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1621 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1622 # Take out texinfo from a few places; make simple BISON=bison line.
1623 sed -e '/^all\.normal: /s/\all-texinfo //' \
1624 -e '/^ install-texinfo /d' \
1626 mv -f tmp Makefile.in
1628 $(start-sanitize-Sanitize)
1629 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1630 $(end-sanitize-Sanitize)
1632 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1633 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1634 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1635 # Make links, and run "make diststuff" or "make info" when needed.
1636 rm -rf proto-toplev ; mkdir proto-toplev
1637 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1638 for d in $$dirs ; do \
1639 if [ -d $$d ]; then \
1640 if [ ! -f $$d/Makefile ] ; then true ; \
1641 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1642 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1643 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1644 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1646 if [ -d $$d/proto-$$d.dir ]; then \
1647 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1649 ln -s ../$$d proto-toplev/$$d ; \
1651 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1653 cd etc ; $(MAKE) info
1656 mkdir proto-toplev/etc
1657 (cd proto-toplev/etc; \
1658 for i in $(ETC_SUPPORT); do \
1659 ln -s ../../etc/$$i . ; \
1662 # Take out texinfo from configurable dirs
1663 rm proto-toplev/configure.in
1664 sed -e '/^host_tools=/s/texinfo //' \
1665 <configure.in >proto-toplev/configure.in
1667 mkdir proto-toplev/texinfo
1668 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1669 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1670 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1671 if test -r texinfo/util/tex3patch ; then \
1672 mkdir proto-toplev/texinfo/util && \
1673 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1675 chmod og=u `find . -print`
1676 if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1677 ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1679 ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1681 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver
1684 echo "==> Making $(TOOL)-$(VER).tar.gz"
1685 -rm -f $(TOOL)-$(VER)
1686 ln -s proto-toplev $(TOOL)-$(VER)
1687 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1688 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
1690 TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1691 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1694 GAS_SUPPORT_DIRS= bfd include libiberty opcodes setup.com makefile.vms
1695 gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1696 $(MAKE) -f Makefile.in taz TOOL=gas \
1697 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1699 # The FSF "binutils" release includes gprof and ld.
1700 .PHONY: binutils.tar.gz
1701 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof setup.com makefile.vms
1702 binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1703 $(MAKE) -f Makefile.in taz TOOL=binutils \
1704 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1706 .PHONY: gas+binutils.tar.gz
1707 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1708 gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1709 $(MAKE) -f Makefile.in taz TOOL=gas \
1710 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1712 .PHONY: libg++.tar.gz
1713 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1714 libg++.tar.gz: $(DIST_SUPPORT) libg++
1715 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1716 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1718 GNATS_SUPPORT_DIRS=include libiberty send-pr
1719 gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1720 $(MAKE) -f Makefile.in taz TOOL=gnats \
1721 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1724 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
1725 GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1726 gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1727 $(MAKE) -f Makefile.in taz TOOL=gdb \
1728 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1730 .PHONY: newlib.tar.gz
1731 NEWLIB_SUPPORT_DIRS=libgloss
1732 # taz configures for the sun4 target which won't configure newlib.
1733 # We need newlib configured so that the .info files are made.
1734 # Unfortunately, it is not enough to just configure newlib separately:
1735 # taz will build the .info files but since SUBDIRS won't contain newlib,
1736 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1737 # used in building the .info files, eg: *.def, *.ref).
1738 # The problem isn't solvable however without a lot of extra work because
1739 # target libraries are built in subdir $(target_alias) which gets nuked during
1740 # the make distclean. For now punt on the issue of shipping newlib info files
1741 # with newlib net releases and wait for a day when some native target (sun4?)
1742 # supports newlib (if only minimally).
1743 newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1744 $(MAKE) -f Makefile.in taz TOOL=newlib \
1745 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1746 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1751 # start-sanitize-chill
1752 ## This is ugly, but I don't want GNU make to put these variables in
1753 ## the environment. Older makes will see this as a set of targets
1754 ## with no dependencies and no actions.
1755 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1756 # end-sanitize-chill
1758 # end of Makefile.in