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)
91 # Use -O2 to stress test the compiler.
92 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
93 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
94 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
105 # Not plain GZIP, since gzip looks there for extra command-line options.
108 # These values are substituted by configure.
112 BISON = `if [ -f $$r/bison/bison ] ; then \
113 echo $$r/bison/bison -L $$s/bison/ ; \
118 YACC = `if [ -f $$r/bison/bison ] ; then \
119 echo $$r/bison/bison -y -L $$s/bison/ ; \
120 elif [ -f $$r/byacc/byacc ] ; then \
121 echo $$r/byacc/byacc ; \
123 echo ${DEFAULT_YACC} ; \
126 LEX = `if [ -f $$r/flex/flex ] ; \
127 then echo $$r/flex/flex ; \
128 else echo ${DEFAULT_LEX} ; fi`
130 M4 = `if [ -f $$r/m4/m4 ] ; \
131 then echo $$r/m4/m4 ; \
134 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
135 then echo $$r/texinfo/makeinfo/makeinfo ; \
136 else echo makeinfo ; fi`
138 # This just becomes part of the MAKEINFO definition passed down to
139 # sub-makes. It lets flags be given on the command line while still
140 # using the makeinfo from the object tree.
143 EXPECT = `if [ -f $$r/expect/expect ] ; \
144 then echo $$r/expect/expect ; \
145 else echo expect ; fi`
147 RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
148 then echo $$s/dejagnu/runtest ; \
149 else echo runtest ; fi`
152 # compilers to use to create programs which must be run in the build
155 CXX_FOR_BUILD = $(CXX)
157 SUBDIRS = "this is set via configure, don't edit this"
160 # This is set by the configure script to the list of directories which
161 # should be built using the target tools.
162 TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup opcodes cygmon
164 # Target libraries are put under this directory:
165 # Changed by configure to $(target_alias) if cross.
168 # This is set by the configure script to the arguments passed to configure.
171 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
175 # This is the name of the environment variable used for the path to
176 # the libraries. This may be changed by configure.in.
177 RPATH_ENVVAR = LD_LIBRARY_PATH
179 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
180 REALLY_SET_LIB_PATH = \
181 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
182 export $(RPATH_ENVVAR);
185 INSTALL_TARGET = installdirs \
188 $(INSTALL_TARGET_MODULES) \
189 $(INSTALL_X11_MODULES) \
194 if [ -f $$r/gcc/xgcc ] ; then \
195 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
196 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
197 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; \
199 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
202 echo $$r/gcc/xgcc -B$$r/gcc/; \
205 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
208 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
212 # If CC_FOR_TARGET is not overriden on the command line, then this
213 # variable is passed down to the gcc Makefile, where it is used to
214 # build libgcc2.a. We define it here so that it can itself be
215 # overridden on the command line.
216 GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/
220 if [ -f $$r/gcc/xgcc ] ; then \
221 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
222 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
223 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; \
225 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
228 echo $$r/gcc/xgcc -B$$r/gcc/; \
231 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
234 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
239 if [ -f $$r/gas/as-new ] ; then \
240 echo $$r/gas/as-new ; \
242 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
245 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
250 if [ -f $$r/ld/ld-new ] ; then \
251 echo $$r/ld/ld-new ; \
253 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
256 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
260 DLLTOOL_FOR_TARGET = ` \
261 if [ -f $$r/binutils/dlltool ] ; then \
262 echo $$r/binutils/dlltool ; \
264 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
267 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
271 WINDRES_FOR_TARGET = ` \
272 if [ -f $$r/binutils/windres ] ; then \
273 echo $$r/binutils/windres ; \
275 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
278 t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
283 if [ -f $$r/binutils/ar ] ; then \
284 echo $$r/binutils/ar ; \
286 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
289 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
293 RANLIB_FOR_TARGET = ` \
294 if [ -f $$r/binutils/ranlib ] ; then \
295 echo $$r/binutils/ranlib ; \
297 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
300 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
305 if [ -f $$r/binutils/nm-new ] ; then \
306 echo $$r/binutils/nm-new ; \
308 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
311 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
315 #### host and target specific makefile fragments come in here.
318 # Flags to pass down to all sub-makes.
319 # Please keep these in alphabetical order.
320 BASE_FLAGS_TO_PASS = \
321 "AR_FLAGS=$(AR_FLAGS)" \
322 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
323 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
325 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
326 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
328 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
329 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
330 "CXXFLAGS=$(CXXFLAGS)" \
331 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
332 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
333 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
334 "INSTALL=$(INSTALL)" \
335 "INSTALL_DATA=$(INSTALL_DATA)" \
336 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
337 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
338 "LDFLAGS=$(LDFLAGS)" \
340 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
341 "LIBCFLAGS=$(LIBCFLAGS)" \
342 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
343 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
344 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
347 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
348 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
349 "PICFLAG=$(PICFLAG)" \
350 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
351 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
352 "RPATH_ENVVAR=$(RPATH_ENVVAR)" \
355 "RUNTEST=$(RUNTEST)" \
356 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
357 "WINDRES_FOR_TARGET=$(WINDRES_FOR_TARGET)" \
360 "datadir=$(datadir)" \
361 "exec_prefix=$(exec_prefix)" \
362 "includedir=$(includedir)" \
363 "infodir=$(infodir)" \
365 "libexecdir=$(libexecdir)" \
366 "lispdir=$(lispdir)" \
367 "localstatedir=$(localstatedir)" \
369 "oldincludedir=$(oldincludedir)" \
371 "sbindir=$(sbindir)" \
372 "sharedstatedir=$(sharedstatedir)" \
373 "sysconfdir=$(sysconfdir)" \
376 # Flags to pass down to most sub-makes, in which we're building with
377 # the host environment.
378 # If any variables are added here, they must be added to do-*, below.
384 'DLLTOOL=$(DLLTOOL)' \
390 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
392 # Flags that are concerned with the location of the X11 include files
395 # NOTE: until the top-level is getting the values via autoconf, it only
396 # causes problems to have this top-level Makefile overriding the autoconf-set
397 # values in child directories. Only variables that don't conflict with
398 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
400 X11_FLAGS_TO_PASS = \
401 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
402 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
404 # Flags to pass down to makes which are built with the target environment.
405 # The double $ decreases the length of the command line; the variables
406 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
407 # If any variables are added here, they must be added to do-*, below.
408 EXTRA_TARGET_FLAGS = \
409 'AR=$$(AR_FOR_TARGET)' \
410 'AS=$$(AS_FOR_TARGET)' \
411 'CC=$$(CC_FOR_TARGET)' \
412 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
413 'CXX=$$(CXX_FOR_TARGET)' \
414 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
415 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
416 'LD=$$(LD_FOR_TARGET)' \
417 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
418 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
419 'NM=$$(NM_FOR_TARGET)' \
420 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
421 'RANLIB=$$(RANLIB_FOR_TARGET)' \
422 'WINDRES=$$(WINDRES_FOR_TARGET)'
424 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
426 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
427 # unfortunately needs the native compiler and the target ar and
429 # If any variables are added here, they must be added to do-*, below.
430 # The HOST_* variables are a special case, which are used for the gcc
431 # cross-building scheme.
433 'AR=$$(AR_FOR_TARGET)' \
437 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
438 'HOST_CC=$(CC_FOR_BUILD)' \
439 'HOST_PREFIX=$(HOST_PREFIX)' \
440 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
442 'RANLIB=$$(RANLIB_FOR_TARGET)' \
443 'WINDRES=$$(WINDRES_FOR_TARGET)' \
444 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
445 "`if test x'$(LANGUAGES)' != x; then echo 'LANGUAGES=$(LANGUAGES)'; else echo 'XFOO=bar'; fi`" \
446 "`if test x'$(STMP_FIXPROTO)' != x; then echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)'; else echo 'XFOO=bar'; fi`" \
447 "`if test x'$(LIMITS_H_TEST)' != x; then echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)'; else echo 'XFOO=bar'; fi`" \
448 "`if test x'$(LIBGCC1_TEST)' != x; then echo 'LIBGCC1_TEST=$(LIBGCC1_TEST)'; else echo 'XFOO=bar'; fi`" \
449 "`if test x'$(LIBGCC2_CFLAGS)' != x; then echo 'LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
450 "`if test x'$(LIBGCC2_DEBUG_CFLAGS)' != x; then echo 'LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)'; else echo 'XFOO=bar'; fi`" \
451 "`if test x'$(LIBGCC2_INCLUDES)' != x; then echo 'LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)'; else echo 'XFOO=bar'; fi`" \
452 "`if test x'$(ENQUIRE)' != x; then echo 'ENQUIRE=$(ENQUIRE)'; else echo 'XFOO=bar'; fi`" \
453 "`if test x'$(BOOT_CFLAGS)' != x; then echo 'BOOT_CFLAGS=$(BOOT_CFLAGS)'; else echo 'XFOO=bar'; fi`"
455 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
457 # This is a list of the targets for all of the modules which are compiled
458 # using $(FLAGS_TO_PASS).
520 # This is a list of the check targets for all of the modules which are
521 # compiled using $(FLAGS_TO_PASS).
523 # The list is in two parts. The first lists those tools which
524 # are tested as part of the host's native tool-chain, and not
525 # tested in a cross configuration.
526 NATIVE_CHECK_MODULES = \
531 CROSS_CHECK_MODULES = \
586 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
588 # This is a list of the install targets for all of the modules which are
589 # compiled using $(FLAGS_TO_PASS).
590 # We put install-opcodes before install-binutils because the installed
591 # binutils might be on PATH, and they might need the shared opcodes
593 # We put install-tcl before install-itcl because itcl wants to run a
594 # program on installation which uses the Tcl libraries.
654 # This is a list of the targets for all of the modules which are compiled
655 # using $(X11_FLAGS_TO_PASS).
667 # This is a list of the check targets for all of the modules which are
668 # compiled using $(X11_FLAGS_TO_PASS).
669 CHECK_X11_MODULES = \
679 # This is a list of the install targets for all the modules which are
680 # compiled using $(X11_FLAGS_TO_PASS).
681 INSTALL_X11_MODULES = \
692 # This is a list of the targets for all of the modules which are compiled
693 # using $(TARGET_FLAGS_TO_PASS).
694 ALL_TARGET_MODULES = \
696 all-target-libstdc++ \
701 all-target-libgloss \
702 all-target-libiberty \
704 all-target-examples \
707 # This is a list of the configure targets for all of the modules which
708 # are compiled using the target tools.
709 CONFIGURE_TARGET_MODULES = \
710 configure-target-libio \
711 configure-target-libstdc++ \
712 configure-target-librx \
713 configure-target-libg++ \
714 configure-target-newlib \
715 configure-target-winsup \
716 configure-target-libgloss \
717 configure-target-libiberty \
718 configure-target-gperf \
719 configure-target-examples \
720 configure-target-cygmon
722 # This is a list of the check targets for all of the modules which are
723 # compiled using $(TARGET_FLAGS_TO_PASS).
724 CHECK_TARGET_MODULES = \
726 check-target-libstdc++ \
727 check-target-libg++ \
728 check-target-newlib \
729 check-target-winsup \
730 check-target-libiberty \
733 # This is a list of the install targets for all of the modules which are
734 # compiled using $(TARGET_FLAGS_TO_PASS).
735 INSTALL_TARGET_MODULES = \
736 install-target-libio \
737 install-target-libstdc++ \
738 install-target-libg++ \
739 install-target-newlib \
740 install-target-winsup \
741 install-target-libgloss \
742 install-target-libiberty \
745 # This is a list of the targets for which we can do a clean-{target}.
807 # All of the target modules that can be cleaned
808 CLEAN_TARGET_MODULES = \
810 clean-target-libstdc++ \
812 clean-target-libg++ \
813 clean-target-newlib \
814 clean-target-winsup \
815 clean-target-libgloss \
816 clean-target-libiberty \
818 clean-target-examples \
821 # All of the x11 modules that can be cleaned
822 CLEAN_X11_MODULES = \
833 # The first rule in the file had better be this one. Don't put any above it.
837 # The target built for a native build.
842 $(ALL_TARGET_MODULES) \
845 # Do a target for all the subdirectories. A ``make do-X'' will do a
846 # ``make X'' in all subdirectories (because, in general, there is a
847 # dependency (below) of X upon do-X, a ``make X'' will also do this,
848 # but it may do additional work as well).
849 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
850 # because it is so large that it can easily overflow the command line
851 # length limit on some systems.
860 do-maintainer-clean \
864 @target=`echo $@ | sed -e 's/^do-//'`; \
866 s=`cd $(srcdir); pwd`; export s; \
868 for i in $(SUBDIRS) -dummy-; do \
869 if [ -f ./$$i/Makefile ]; then \
872 for flag in $(EXTRA_GCC_FLAGS); do \
873 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
877 for flag in $(EXTRA_HOST_FLAGS); do \
878 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
882 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
884 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
885 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
886 "RANLIB=$${RANLIB}" \
887 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
889 then true; else exit 1; fi; \
892 @target=`echo $@ | sed -e 's/^do-//'`; \
894 s=`cd $(srcdir); pwd`; export s; \
896 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
897 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
898 for flag in $(EXTRA_TARGET_FLAGS); do \
899 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
901 export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
902 if (cd $(TARGET_SUBDIR)/$$i; \
903 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
904 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
905 "RANLIB=$${RANLIB}" \
906 "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
908 then true; else exit 1; fi; \
912 # Here are the targets which correspond to the do-X targets.
914 .PHONY: info installcheck dvi install-info
915 .PHONY: clean distclean mostlyclean maintainer-clean realclean
916 .PHONY: local-clean local-distclean local-maintainer-clean
918 installcheck: do-installcheck
921 # Make sure makeinfo is built before we do a `make info'.
924 install-info: do-install-info dir.info
925 s=`cd $(srcdir); pwd`; export s; \
926 if [ -f dir.info ] ; then \
927 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
931 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
934 -rm -f Makefile config.status config.cache
935 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
936 rm -rf $(TARGET_SUBDIR); \
939 local-maintainer-clean:
940 @echo "This command is intended for maintainers to use;"
941 @echo "it deletes files that may require special tools to rebuild."
943 clean: do-clean local-clean
944 mostlyclean: do-mostlyclean local-clean
945 distclean: do-distclean local-clean local-distclean
946 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
947 maintainer-clean: local-distclean
948 realclean: maintainer-clean
950 # This rule is used to clean specific modules.
951 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
952 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
953 @dir=`echo $@ | sed -e 's/clean-//'`; \
954 if [ -f ./$${dir}/Makefile ] ; then \
956 s=`cd $(srcdir); pwd`; export s; \
958 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
963 .PHONY: $(CLEAN_TARGET_MODULES)
964 $(CLEAN_TARGET_MODULES):
965 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
966 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
967 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
969 s=`cd $(srcdir); pwd`; export s; \
971 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
976 clean-target: $(CLEAN_TARGET_MODULES)
981 check: $(CHECK_MODULES) \
982 $(CHECK_TARGET_MODULES) \
983 $(CHECK_X11_MODULES) \
986 # Installation targets.
988 .PHONY: install uninstall source-vault binary-vault vault-install
989 install: $(INSTALL_TARGET)
992 @echo "the uninstall target is not supported in this tree"
995 $(MAKE) -f ./release/Build-A-Release \
996 host=$(host_alias) source-vault
999 $(MAKE) -f ./release/Build-A-Release \
1000 host=$(host_alias) target=$(target_alias)
1003 @if [ -f ./release/vault-install ] ; then \
1004 ./release/vault-install $(host_alias) $(target_alias) ; \
1010 install.all: install-no-fixedincludes
1011 @if [ -f ./gcc/Makefile ] ; then \
1012 r=`pwd` ; export r ; \
1015 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1020 # inet-install is used because the I*Net wants DejaGNU installed but
1021 # not built. Similarly, gzip is built but not installed.
1023 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1025 # install-no-fixedincludes is used because Cygnus can not distribute
1026 # the fixed header files.
1027 .PHONY: install-no-fixedincludes
1028 install-no-fixedincludes: \
1030 $(INSTALL_MODULES) \
1031 $(INSTALL_TARGET_MODULES) \
1032 $(INSTALL_X11_MODULES) \
1033 gcc-no-fixedincludes
1035 # Install the gcc headers files, but not the fixed include files,
1036 # which Cygnus is not allowed to distribute. This rule is very
1037 # dependent on the workings of the gcc Makefile.in.
1038 .PHONY: gcc-no-fixedincludes
1039 gcc-no-fixedincludes:
1040 @if [ -f ./gcc/Makefile ]; then \
1041 rm -rf gcc/tmp-include; \
1042 mv gcc/include gcc/tmp-include 2>/dev/null; \
1043 mkdir gcc/include; \
1044 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1045 touch gcc/stmp-fixinc gcc/include/fixed; \
1046 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1047 r=`pwd`; export r; \
1048 s=`cd $(srcdir); pwd` ; export s; \
1051 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1052 rm -rf gcc/include; \
1053 mv gcc/tmp-include gcc/include 2>/dev/null; \
1057 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1058 # build a target all-X means to cd to X and make all.
1060 # all-gui, and all-libproc are handled specially because
1061 # they are still experimental, and if they fail to build, that
1062 # shouldn't stop "make all".
1063 .PHONY: $(ALL_MODULES) all-gui all-libproc
1064 $(ALL_MODULES) all-gui all-libproc:
1065 @dir=`echo $@ | sed -e 's/all-//'`; \
1066 if [ -f ./$${dir}/Makefile ] ; then \
1067 r=`pwd`; export r; \
1068 s=`cd $(srcdir); pwd`; export s; \
1070 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1075 # These rules are used to check the modules which use FLAGS_TO_PASS.
1076 # To build a target check-X means to cd to X and make check. Some
1077 # modules are only tested in a native toolchain.
1079 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1080 $(NATIVE_CHECK_MODULES):
1081 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1082 dir=`echo $@ | sed -e 's/check-//'`; \
1083 if [ -f ./$${dir}/Makefile ] ; then \
1084 r=`pwd`; export r; \
1085 s=`cd $(srcdir); pwd`; export s; \
1087 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1093 $(CROSS_CHECK_MODULES):
1094 @dir=`echo $@ | sed -e 's/check-//'`; \
1095 if [ -f ./$${dir}/Makefile ] ; then \
1096 r=`pwd`; export r; \
1097 s=`cd $(srcdir); pwd`; export s; \
1099 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1104 # This rule is used to install the modules which use FLAGS_TO_PASS.
1105 # To build a target install-X means to cd to X and make install.
1106 .PHONY: $(INSTALL_MODULES)
1107 $(INSTALL_MODULES): installdirs
1108 @dir=`echo $@ | sed -e 's/install-//'`; \
1109 if [ -f ./$${dir}/Makefile ] ; then \
1110 r=`pwd`; export r; \
1111 s=`cd $(srcdir); pwd`; export s; \
1113 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1118 # This rule is used to configure the modules which are built with the
1120 .PHONY: $(CONFIGURE_TARGET_MODULES)
1121 $(CONFIGURE_TARGET_MODULES):
1122 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1123 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1124 r=`pwd`; export r; \
1125 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1126 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1127 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1128 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1129 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1131 echo "Multilibs changed for $${dir}, reconfiguring"; \
1132 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1133 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1136 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1139 fi; exit 0 # break command into two pieces
1140 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1141 if [ ! -d $(TARGET_SUBDIR) ]; then \
1143 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1145 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1146 if [ -d $(srcdir)/$${dir} ]; then \
1147 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1148 r=`pwd`; export r; \
1149 s=`cd $(srcdir); pwd`; export s; \
1151 AR="$(AR_FOR_TARGET)"; export AR; \
1152 AS="$(AS_FOR_TARGET)"; export AS; \
1153 CC="$(CC_FOR_TARGET)"; export CC; \
1154 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1155 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1156 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1157 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1158 LD="$(LD_FOR_TARGET)"; export LD; \
1159 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1160 NM="$(NM_FOR_TARGET)"; export NM; \
1161 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1162 WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
1163 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1164 cd $(TARGET_SUBDIR)/$${dir}; \
1167 topdir=$(srcdir) ;; \
1169 case "$(TARGET_SUBDIR)" in \
1170 .) topdir="../$(srcdir)" ;; \
1171 *) topdir="../../$(srcdir)" ;; \
1174 if [ "$(srcdir)" = "." ] ; then \
1175 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1176 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1177 if [ -f Makefile ]; then \
1178 if $(MAKE) distclean; then \
1192 srcdiroption="--srcdir=."; \
1195 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1196 libsrcdir="$$s/$${dir}"; \
1198 if [ -f $${libsrcdir}/configure ] ; then \
1199 $(SHELL) $${libsrcdir}/configure \
1200 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1201 --with-target-subdir="$(TARGET_SUBDIR)"; \
1203 $(SHELL) $$s/configure \
1204 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1205 --with-target-subdir="$(TARGET_SUBDIR)"; \
1214 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1215 # To build a target all-X means to cd to X and make all.
1216 .PHONY: $(ALL_TARGET_MODULES)
1217 $(ALL_TARGET_MODULES):
1218 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1219 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1220 r=`pwd`; export r; \
1221 s=`cd $(srcdir); pwd`; export s; \
1223 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1228 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1229 # To build a target install-X means to cd to X and make install.
1230 .PHONY: $(CHECK_TARGET_MODULES)
1231 $(CHECK_TARGET_MODULES):
1232 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1233 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1234 r=`pwd`; export r; \
1235 s=`cd $(srcdir); pwd`; export s; \
1237 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1242 # This rule is used to install the modules which use
1243 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1245 .PHONY: $(INSTALL_TARGET_MODULES)
1246 $(INSTALL_TARGET_MODULES): installdirs
1247 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1248 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1249 r=`pwd`; export r; \
1250 s=`cd $(srcdir); pwd`; export s; \
1252 (cd $(TARGET_SUBDIR)/$${dir}; \
1253 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1258 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1259 # To build a target all-X means to cd to X and make all.
1260 .PHONY: $(ALL_X11_MODULES)
1262 @dir=`echo $@ | sed -e 's/all-//'`; \
1263 if [ -f ./$${dir}/Makefile ] ; then \
1264 r=`pwd`; export r; \
1265 s=`cd $(srcdir); pwd`; export s; \
1268 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1273 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1274 # To build a target check-X means to cd to X and make all.
1275 .PHONY: $(CHECK_X11_MODULES)
1276 $(CHECK_X11_MODULES):
1277 @dir=`echo $@ | sed -e 's/check-//'`; \
1278 if [ -f ./$${dir}/Makefile ] ; then \
1279 r=`pwd`; export r; \
1280 s=`cd $(srcdir); pwd`; export s; \
1283 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1288 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1289 # To build a target install-X means to cd to X and make install.
1290 .PHONY: $(INSTALL_X11_MODULES)
1291 $(INSTALL_X11_MODULES): installdirs
1292 @dir=`echo $@ | sed -e 's/install-//'`; \
1293 if [ -f ./$${dir}/Makefile ] ; then \
1294 r=`pwd`; export r; \
1295 s=`cd $(srcdir); pwd`; export s; \
1298 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1303 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1306 @if [ -f ./gcc/Makefile ] ; then \
1307 r=`pwd`; export r; \
1308 s=`cd $(srcdir); pwd`; export s; \
1310 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1315 .PHONY: all-bootstrap
1317 @if [ -f ./gcc/Makefile ] ; then \
1318 r=`pwd`; export r; \
1319 s=`cd $(srcdir); pwd`; export s; \
1321 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
1328 @if [ -f ./gcc/Makefile ] ; then \
1329 r=`pwd`; export r; \
1330 s=`cd $(srcdir); pwd`; export s; \
1332 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1339 @if [ -f ./gcc/Makefile ] ; then \
1340 r=`pwd`; export r; \
1341 s=`cd $(srcdir); pwd`; export s; \
1343 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1349 # EXPERIMENTAL STUFF
1350 # This rule is used to install the modules which use FLAGS_TO_PASS.
1351 # To build a target install-X means to cd to X and make install.
1352 .PHONY: install-dosrel
1353 install-dosrel: installdirs info
1354 @dir=`echo $@ | sed -e 's/install-//'`; \
1355 if [ -f ./$${dir}/Makefile ] ; then \
1356 r=`pwd`; export r; \
1357 s=`cd $(srcdir); pwd`; export s; \
1359 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1364 install-dosrel-fake:
1367 # This is a list of inter-dependencies among modules.
1369 all-autoconf: all-m4 all-texinfo
1373 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-bison all-byacc
1374 all-bison: all-texinfo
1377 configure-target-cygmon: $(ALL_GCC)
1378 all-target-cygmon: configure-target-cygmon all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1380 all-dejagnu: all-tcl all-expect all-tk
1381 all-diff: all-libiberty
1383 all-emacs19: all-bison all-byacc
1385 configure-target-examples: $(ALL_GCC)
1386 all-target-examples: configure-target-examples
1387 all-expect: all-tcl all-tk
1388 all-fileutils: all-libiberty
1391 all-flex: all-libiberty all-bison all-byacc
1392 all-gas: all-libiberty all-opcodes all-bfd
1396 all-gcc: all-bison all-byacc all-binutils all-gas all-ld
1397 all-bootstrap: all-libiberty all-bison all-byacc all-binutils all-gas all-ld
1398 GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
1399 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1402 configure-target-gperf: $(ALL_GCC)
1403 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
1404 all-gprof: all-libiberty all-bfd all-opcodes
1405 all-grep: all-libiberty
1406 all-grez: all-libiberty all-bfd all-opcodes
1407 all-gui: all-gdb all-libproc all-target-librx
1409 all-gzip: all-libiberty
1410 all-hello: all-libiberty
1412 all-inet: all-tcl all-send-pr all-perl
1414 all-ispell: all-emacs19
1415 all-itcl: all-tcl all-tk
1416 all-ld: all-libiberty all-bfd all-opcodes all-bison all-byacc all-flex
1417 configure-target-libg++: $(ALL_GCC) configure-target-librx
1418 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++
1419 configure-target-libgloss: $(ALL_GCC)
1420 all-target-libgloss: configure-target-libgloss configure-target-newlib
1421 configure-target-libio: $(ALL_GCC)
1422 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1423 check-target-libio: all-target-libstdc++
1424 all-libgui: all-tcl all-tk all-itcl
1426 configure-target-librx: $(ALL_GCC) configure-target-newlib
1427 all-target-librx: configure-target-librx
1428 configure-target-libstdc++: $(ALL_GCC)
1429 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1430 all-m4: all-libiberty
1431 all-make: all-libiberty
1433 configure-target-newlib: $(ALL_GCC)
1434 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1435 all-opcodes: all-bfd all-libiberty
1436 all-patch: all-libiberty
1438 all-prms: all-libiberty
1441 all-recode: all-libiberty
1442 all-sed: all-libiberty
1443 all-send-pr: all-prms
1445 all-sim: all-libiberty all-bfd all-opcodes all-readline
1446 all-snavigator: all-tcl all-tk all-tix all-itcl all-db all-grep
1447 all-tar: all-libiberty
1449 all-tclX: all-tcl all-tk
1451 all-texinfo: all-libiberty
1453 all-tgas: all-libiberty all-bfd all-opcodes
1455 all-tix: all-tcl all-tk
1457 all-target-winsup: all-target-newlib all-target-libiberty all-target-libio configure-target-winsup
1458 configure-target-winsup: configure-target-newlib
1459 all-uudecode: all-libiberty
1460 configure-target-libiberty: $(ALL_GCC)
1461 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1462 all-target: $(ALL_TARGET_MODULES)
1463 install-target: $(INSTALL_TARGET_MODULES)
1464 install-gdbtk: install-tcl install-tk install-itcl install-tix install-libgui install-gdb
1465 ### other supporting targets
1471 installdirs: mkinstalldirs
1472 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1474 dir.info: do-install-info
1475 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1476 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1477 mv -f dir.info.new dir.info ; \
1482 @echo "Building a full distribution of this tree isn't done"
1483 @echo "via 'make dist'. Check out the etc/ subdirectory"
1487 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1488 # ability to use several tags files at once, so there is probably no need
1489 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1490 # (if we felt like it) have this Makefile write a piece of elisp which
1491 # the user could load to tell emacs19 where all the TAGS files we just
1495 # with the gnu make, this is done automatically.
1497 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
1498 $(SHELL) ./config.status
1501 # Support for building net releases
1503 # Files in devo used in any net release.
1504 # ChangeLog omitted because it may refer to files which are not in this
1505 # distribution (perhaps it would be better to include it anyway).
1506 DEVO_SUPPORT= README Makefile.in configure configure.in \
1507 config.guess config.sub config move-if-change \
1508 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1509 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1510 mkinstalldirs ltconfig ltmain.sh missing ylwrap
1512 # Files in devo/etc used in any net release.
1513 # ChangeLog omitted because it may refer to files which are not in this
1514 # distribution (perhaps it would be better to include it anyway).
1515 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1516 make-stds.texi standards.info*
1518 # When you use `make setup-dirs' or `make taz' you should always redefine
1520 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1524 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1525 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1526 # Take out texinfo from a few places; make simple BISON=bison line.
1527 sed -e '/^all\.normal: /s/\all-texinfo //' \
1528 -e '/^ install-texinfo /d' \
1530 mv -f tmp Makefile.in
1533 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1534 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1535 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1536 # Make links, and run "make diststuff" or "make info" when needed.
1537 rm -rf proto-toplev ; mkdir proto-toplev
1538 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1539 for d in $$dirs ; do \
1540 if [ -d $$d ]; then \
1541 if [ ! -f $$d/Makefile ] ; then true ; \
1542 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1543 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1544 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1545 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1547 if [ -d $$d/proto-$$d.dir ]; then \
1548 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1550 ln -s ../$$d proto-toplev/$$d ; \
1552 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1554 cd etc ; $(MAKE) info
1557 mkdir proto-toplev/etc
1558 (cd proto-toplev/etc; \
1559 for i in $(ETC_SUPPORT); do \
1560 ln -s ../../etc/$$i . ; \
1563 # Take out texinfo from configurable dirs
1564 rm proto-toplev/configure.in
1565 sed -e '/^host_tools=/s/texinfo //' \
1566 <configure.in >proto-toplev/configure.in
1568 mkdir proto-toplev/texinfo
1569 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1570 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1571 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1572 if test -r texinfo/util/tex3patch ; then \
1573 mkdir proto-toplev/texinfo/util && \
1574 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1576 chmod og=u `find . -print`
1577 if grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
1578 ver=`sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'`; \
1580 ver=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1582 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) VER=$$ver
1585 echo "==> Making $(TOOL)-$(VER).tar.gz"
1586 -rm -f $(TOOL)-$(VER)
1587 ln -s proto-toplev $(TOOL)-$(VER)
1588 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1589 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
1591 TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1592 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1595 GAS_SUPPORT_DIRS= bfd include libiberty opcodes setup.com makefile.vms
1596 gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1597 $(MAKE) -f Makefile.in taz TOOL=gas \
1598 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1600 # The FSF "binutils" release includes gprof and ld.
1601 .PHONY: binutils.tar.gz
1602 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof setup.com makefile.vms
1603 binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1604 $(MAKE) -f Makefile.in taz TOOL=binutils \
1605 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1607 .PHONY: gas+binutils.tar.gz
1608 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1609 gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1610 $(MAKE) -f Makefile.in taz TOOL=gas \
1611 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1613 .PHONY: libg++.tar.gz
1614 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1615 libg++.tar.gz: $(DIST_SUPPORT) libg++
1616 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1617 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1619 GNATS_SUPPORT_DIRS=include libiberty send-pr
1620 gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1621 $(MAKE) -f Makefile.in taz TOOL=gnats \
1622 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1625 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
1626 GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1627 gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1628 $(MAKE) -f Makefile.in taz TOOL=gdb \
1629 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1631 .PHONY: newlib.tar.gz
1632 NEWLIB_SUPPORT_DIRS=libgloss
1633 # taz configures for the sun4 target which won't configure newlib.
1634 # We need newlib configured so that the .info files are made.
1635 # Unfortunately, it is not enough to just configure newlib separately:
1636 # taz will build the .info files but since SUBDIRS won't contain newlib,
1637 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1638 # used in building the .info files, eg: *.def, *.ref).
1639 # The problem isn't solvable however without a lot of extra work because
1640 # target libraries are built in subdir $(target_alias) which gets nuked during
1641 # the make distclean. For now punt on the issue of shipping newlib info files
1642 # with newlib net releases and wait for a day when some native target (sun4?)
1643 # supports newlib (if only minimally).
1644 newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1645 $(MAKE) -f Makefile.in taz TOOL=newlib \
1646 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1647 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1653 # end of Makefile.in