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.
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
27 tooldir = $(exec_prefix)/$(target)
29 program_transform_name =
31 datadir = $(prefix)/share
32 mandir = $(prefix)/man
33 man1dir = $(mandir)/man1
34 man2dir = $(mandir)/man2
35 man3dir = $(mandir)/man3
36 man4dir = $(mandir)/man4
37 man5dir = $(mandir)/man5
38 man6dir = $(mandir)/man6
39 man7dir = $(mandir)/man7
40 man8dir = $(mandir)/man8
41 man9dir = $(mandir)/man9
42 infodir = $(prefix)/info
43 includedir = $(prefix)/include
48 INSTALL = $(SHELL) $$s/install-sh -c
49 INSTALL_PROGRAM = $(INSTALL)
50 INSTALL_DATA = $(INSTALL) -m 644
52 INSTALL_DOSREL = install-dosrel-fake
59 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
60 # here so that they can be overridden by Makefile fragments.
61 HOST_CC = $(CC_FOR_BUILD)
63 HOST_PREFIX_1 = loser-
65 # These flag values are normally overridden by the configure script.
70 CFLAGS_FOR_TARGET = $(CFLAGS)
72 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
76 # start-sanitize-chill
77 CHILLFLAGS = $(CFLAGS)
82 # Use -O2 to stress test the compiler.
83 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
84 CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
85 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
95 # Not plain GZIP, since gzip looks there for extra command-line options.
98 # These values are substituted by configure.
102 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
103 BISON = `if [ -f $$r/byacc/byacc ] ; \
104 then echo $$r/byacc/byacc ; \
105 else echo ${DEFAULT_YACC} ; \
108 LEX = `if [ -f $$r/flex/flex ] ; \
109 then echo $$r/flex/flex ; \
110 else echo ${DEFAULT_LEX} ; fi`
112 M4 = `if [ -f $$r/m4/m4 ] ; \
113 then echo $$r/m4/m4 ; \
116 MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
117 then echo $$r/texinfo/makeinfo/makeinfo ; \
118 else echo makeinfo ; fi`
120 # This just becomes part of the MAKEINFO definition passed down to
121 # sub-makes. It lets flags be given on the command line while still
122 # using the makeinfo from the object tree.
125 EXPECT = `if [ -f $$r/expect/expect ] ; \
126 then echo $$r/expect/expect ; \
127 else echo expect ; fi`
129 RUNTEST = `if [ -f $$s/dejagnu/runtest ] ; \
130 then echo $$s/dejagnu/runtest ; \
131 else echo runtest ; fi`
134 # compilers to use to create programs which must be run in the build
137 CXX_FOR_BUILD = $(CXX)
139 SUBDIRS = "this is set via configure, don't edit this"
142 # This is set by the configure script to the list of directories which
143 # should be built using the target tools.
144 TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
146 # Target libraries are put under this directory:
147 # Changed by configure to $(target_alias) if cross.
150 # This is set by the configure script to the arguments passed to configure.
153 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
157 # This is the name of the environment variable used for the path to
158 # the libraries. This may be changed by configure.in.
159 RPATH_ENVVAR = LD_LIBRARY_PATH
161 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
162 REALLY_SET_LIB_PATH = \
163 $(RPATH_ENVVAR)=$$r/bfd:$$r/opcodes:$$$(RPATH_ENVVAR); \
164 export $(RPATH_ENVVAR);
167 INSTALL_TARGET = installdirs \
169 $(INSTALL_TARGET_MODULES) \
170 $(INSTALL_X11_MODULES) \
176 if [ -f $$r/gcc/xgcc ] ; then \
177 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
178 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
179 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; \
181 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
184 echo $$r/gcc/xgcc -B$$r/gcc/; \
187 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
190 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
194 # If CC_FOR_TARGET is not overriden on the command line, then this
195 # variable is passed down to the gcc Makefile, where it is used to
196 # build libgcc2.a. We define it here so that it can itself be
197 # overridden on the command line.
198 GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/
200 # start-sanitize-chill
201 CHILL_FOR_TARGET = ` \
202 if [ -f $$r/gcc/xgcc ] ; then \
203 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
205 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
208 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
215 if [ -f $$r/gcc/xgcc ] ; then \
216 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
217 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
218 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; \
220 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
223 echo $$r/gcc/xgcc -B$$r/gcc/; \
226 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
229 t='$(program_transform_name)'; echo c++ | sed -e 's/x/x/' $$t; \
234 if [ -f $$r/gas/as.new ] ; then \
235 echo $$r/gas/as.new ; \
237 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
240 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
245 if [ -f $$r/ld/ld.new ] ; then \
246 echo $$r/ld/ld.new ; \
248 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
251 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
255 DLLTOOL_FOR_TARGET = ` \
256 if [ -f $$r/binutils/dlltool ] ; then \
257 echo $$r/binutils/dlltool ; \
259 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
262 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
267 if [ -f $$r/binutils/ar ] ; then \
268 echo $$r/binutils/ar ; \
270 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
273 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
277 RANLIB_FOR_TARGET = ` \
278 if [ -f $$r/binutils/ranlib ] ; then \
279 echo $$r/binutils/ranlib ; \
281 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
284 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
289 if [ -f $$r/binutils/nm.new ] ; then \
290 echo $$r/binutils/nm.new ; \
292 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
295 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
299 #### host and target specific makefile fragments come in here.
302 # Flags to pass down to all sub-makes.
303 # Please keep these in alphabetical order.
304 BASE_FLAGS_TO_PASS = \
305 "AR_FLAGS=$(AR_FLAGS)" \
306 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
307 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
309 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
310 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
312 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
313 $(start-sanitize-chill)\
314 "CHILLFLAGS=$(CHILLFLAGS)" \
315 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
316 "CHILL_LIB=$(CHILL_LIB)" \
317 $(end-sanitize-chill)\
318 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
319 "CXXFLAGS=$(CXXFLAGS)" \
320 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
321 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
322 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
323 "INSTALL=$(INSTALL)" \
324 "INSTALL_DATA=$(INSTALL_DATA)" \
325 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
326 "LDFLAGS=$(LDFLAGS)" \
328 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
329 "LIBCFLAGS=$(LIBCFLAGS)" \
330 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
331 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
332 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
335 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
336 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
337 "PICFLAG=$(PICFLAG)" \
338 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
339 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
342 "RUNTEST=$(RUNTEST)" \
343 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
345 "exec_prefix=$(exec_prefix)" \
349 # Flags to pass down to most sub-makes, in which we're building with
350 # the host environment.
351 # If any variables are added here, they must be added to do-*, below.
357 'DLLTOOL=$(DLLTOOL)' \
363 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
365 # Flags that are concerned with the location of the X11 include files
368 # NOTE: until the top-level is getting the values via autoconf, it only
369 # causes problems to have this top-level Makefile overriding the autoconf-set
370 # values in child directories. Only variables that don't conflict with
371 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
373 X11_FLAGS_TO_PASS = \
374 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
375 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
377 # Flags to pass down to makes which are built with the target environment.
378 # The double $ decreases the length of the command line; the variables
379 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
380 # If any variables are added here, they must be added to do-*, below.
381 EXTRA_TARGET_FLAGS = \
382 'AR=$$(AR_FOR_TARGET)' \
383 'AS=$$(AS_FOR_TARGET)' \
384 'CC=$$(CC_FOR_TARGET)' \
385 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
386 'CXX=$$(CXX_FOR_TARGET)' \
387 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
388 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
389 'LD=$$(LD_FOR_TARGET)' \
390 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
391 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
392 'NM=$$(NM_FOR_TARGET)' \
393 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
394 'RANLIB=$$(RANLIB_FOR_TARGET)'
396 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
398 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
399 # unfortunately needs the native compiler and the target ar and
401 # If any variables are added here, they must be added to do-*, below.
402 # The HOST_* variables are a special case, which are used for the gcc
403 # cross-building scheme.
405 'AR=$$(AR_FOR_TARGET)' \
409 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
410 'HOST_CC=$(CC_FOR_BUILD)' \
411 'HOST_PREFIX=$(HOST_PREFIX)' \
412 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
414 'RANLIB=$$(RANLIB_FOR_TARGET)' \
415 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
416 `if test x"$(LANGUAGES)" != x; then echo "LANGUAGES=$(LANGUAGES)"; fi` \
417 `if test x"$(STMP_FIXPROTO)" != x; then echo "STMP_FIXPROTO=$(STMP_FIXPROTO)"; fi` \
418 `if test x"$(LIMITS_H_TEST)" != x; then echo "LIMITS_H_TEST=$(LIMITS_H_TEST)"; fi` \
419 `if test x"$(LIBGCC1_TEST)" != x; then echo "LIBGCC1_TEST=$(LIBGCC1_TEST)"; fi` \
420 `if test x"$(LIBGCC2_CFLAGS)" != x; then echo "LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)"; fi` \
421 `if test x"$(LIBGCC2_DEBUG_CFLAGS)" != x; then echo "LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)"; fi` \
422 `if test x"$(LIBGCC2_INCLUDES)" != x; then echo "LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)"; fi` \
423 `if test x"$(ENQUIRE)" != x; then echo "ENQUIRE=$(ENQUIRE)"; fi` \
424 `if test x"$(BOOT_CFLAGS)" != x; then echo "BOOT_CFLAGS=$(BOOT_CFLAGS)"; fi`
426 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
428 # This is a list of the targets for all of the modules which are compiled
429 # using $(FLAGS_TO_PASS).
456 $(start-sanitize-ide) \
458 $(end-sanitize-ide) \
465 $(start-sanitize-ide) \
467 $(end-sanitize-ide) \
491 $(start-sanitize-ide) \
493 $(end-sanitize-ide) \
496 # This is a list of the check targets for all of the modules which are
497 # compiled using $(FLAGS_TO_PASS).
499 # The list is in two parts. The first lists those tools which
500 # are tested as part of the host's native tool-chain, and not
501 # tested in a cross configuration.
502 NATIVE_CHECK_MODULES = \
506 CROSS_CHECK_MODULES = \
528 $(start-sanitize-ide) \
530 $(end-sanitize-ide) \
537 $(start-sanitize-ide) \
539 $(end-sanitize-ide) \
562 $(start-sanitize-ide) \
564 $(end-sanitize-ide) \
567 CHECK_MODULES=$(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
569 # This is a list of the install targets for all of the modules which are
570 # compiled using $(FLAGS_TO_PASS).
571 # We put install-opcodes before install-binutils because the installed
572 # binutils might be on PATH, and they might need the shared opcodes
601 $(start-sanitize-ide) \
603 $(end-sanitize-ide) \
610 $(start-sanitize-ide) \
612 $(end-sanitize-ide) \
634 $(start-sanitize-ide) \
636 $(end-sanitize-ide) \
639 # This is a list of the targets for all of the modules which are compiled
640 # using $(X11_FLAGS_TO_PASS).
651 # This is a list of the check targets for all of the modules which are
652 # compiled using $(X11_FLAGS_TO_PASS).
653 CHECK_X11_MODULES = \
661 # This is a list of the install targets for all the modules which are
662 # compiled using $(X11_FLAGS_TO_PASS).
663 INSTALL_X11_MODULES = \
673 # This is a list of the targets for all of the modules which are compiled
674 # using $(TARGET_FLAGS_TO_PASS).
675 ALL_TARGET_MODULES = \
677 all-target-libstdc++ \
682 all-target-libgloss \
683 all-target-libiberty \
687 # This is a list of the configure targets for all of the modules which
688 # are compiled using the target tools.
689 CONFIGURE_TARGET_MODULES = \
690 configure-target-libio \
691 configure-target-libstdc++ \
692 configure-target-librx \
693 configure-target-libg++ \
694 configure-target-newlib \
695 configure-target-winsup \
696 configure-target-libgloss \
697 configure-target-libiberty \
698 configure-target-gperf \
699 configure-target-examples
701 # This is a list of the check targets for all of the modules which are
702 # compiled using $(TARGET_FLAGS_TO_PASS).
703 CHECK_TARGET_MODULES = \
705 check-target-libstdc++ \
706 check-target-libg++ \
707 check-target-newlib \
708 check-target-winsup \
709 check-target-libiberty \
712 # This is a list of the install targets for all of the modules which are
713 # compiled using $(TARGET_FLAGS_TO_PASS).
714 INSTALL_TARGET_MODULES = \
715 install-target-libio \
716 install-target-libstdc++ \
717 install-target-libg++ \
718 install-target-newlib \
719 install-target-winsup \
720 install-target-libgloss \
721 install-target-libiberty \
724 # This is a list of the targets for which we can do a clean-{target}.
751 $(start-sanitize-ide) \
753 $(end-sanitize-ide) \
760 $(start-sanitize-ide) \
762 $(end-sanitize-ide) \
786 $(start-sanitize-ide) \
788 $(end-sanitize-ide) \
791 # All of the target modules that can be cleaned
792 CLEAN_TARGET_MODULES = \
794 clean-target-libstdc++ \
796 clean-target-libg++ \
797 clean-target-newlib \
798 clean-target-winsup \
799 clean-target-libgloss \
800 clean-target-libiberty \
802 clean-target-examples
804 # All of the x11 modules that can be cleaned
805 CLEAN_X11_MODULES = \
815 # The first rule in the file had better be this one. Don't put any above it.
819 # The target built for a native build.
824 $(ALL_TARGET_MODULES) \
827 # Do a target for all the subdirectories. A ``make do-X'' will do a
828 # ``make X'' in all subdirectories (because, in general, there is a
829 # dependency (below) of X upon do-X, a ``make X'' will also do this,
830 # but it may do additional work as well).
831 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
832 # because it is so large that it can easily overflow the command line
833 # length limit on some systems.
842 do-maintainer-clean \
846 @target=`echo $@ | sed -e 's/^do-//'`; \
848 s=`cd $(srcdir); pwd`; export s; \
850 for i in $(SUBDIRS) -dummy-; do \
851 if [ -f ./$$i/Makefile ]; then \
854 for flag in $(EXTRA_GCC_FLAGS); do \
855 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
859 for flag in $(EXTRA_HOST_FLAGS); do \
860 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
864 export AR AS CC CXX LD NM RANLIB DLLTOOL; \
866 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
867 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
868 "RANLIB=$${RANLIB}" \
869 "DLLTOOL=$${DLLTOOL}" \
871 then true; else exit 1; fi; \
874 @target=`echo $@ | sed -e 's/^do-//'`; \
876 s=`cd $(srcdir); pwd`; export s; \
878 for i in $(TARGET_CONFIGDIRS) -dummy-; do \
879 if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
880 for flag in $(EXTRA_TARGET_FLAGS); do \
881 eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
883 export AR AS CC CXX LD NM RANLIB DLLTOOL; \
884 if (cd $(TARGET_SUBDIR)/$$i; \
885 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
886 "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
887 "RANLIB=$${RANLIB}" \
888 "DLLTOOL=$${DLLTOOL}" \
890 then true; else exit 1; fi; \
894 # Here are the targets which correspond to the do-X targets.
896 .PHONY: info installcheck dvi install-info
897 .PHONY: clean distclean mostlyclean maintainer-clean realclean
898 .PHONY: local-clean local-distclean local-maintainer-clean
900 installcheck: do-installcheck
903 # Make sure makeinfo is built before we do a `make info'.
906 install-info: do-install-info dir.info
907 s=`cd $(srcdir); pwd`; export s; \
908 if [ -f dir.info ] ; then \
909 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
913 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
916 -rm -f Makefile config.status config.cache
917 -if [ "$(TARGET_SUBDIR)" != "." ]; then \
918 rm -rf $(TARGET_SUBDIR); \
921 local-maintainer-clean:
922 @echo "This command is intended for maintainers to use;"
923 @echo "it deletes files that may require special tools to rebuild."
925 clean: do-clean local-clean
926 mostlyclean: do-mostlyclean local-clean
927 distclean: do-distclean local-clean local-distclean
928 maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
929 maintainer-clean: local-distclean
930 realclean: maintainer-clean
932 # This rule is used to clean specific modules.
933 .PHONY: $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc
934 $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc:
935 @dir=`echo $@ | sed -e 's/clean-//'`; \
936 if [ -f ./$${dir}/Makefile ] ; then \
938 s=`cd $(srcdir); pwd`; export s; \
940 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) clean); \
945 .PHONY: $(CLEAN_TARGET_MODULES)
946 $(CLEAN_TARGET_MODULES):
947 @dir=`echo $@ | sed -e 's/clean-target-//'`; \
948 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
949 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
951 s=`cd $(srcdir); pwd`; export s; \
953 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) clean); \
958 clean-target: $(CLEAN_TARGET_MODULES)
963 check: $(CHECK_MODULES) \
964 $(CHECK_TARGET_MODULES) \
965 $(CHECK_X11_MODULES) \
968 # Installation targets.
970 .PHONY: install uninstall source-vault binary-vault vault-install
971 install: $(INSTALL_TARGET)
974 @echo "the uninstall target is not supported in this tree"
977 $(MAKE) -f ./release/Build-A-Release \
978 host=$(host_alias) source-vault
981 $(MAKE) -f ./release/Build-A-Release \
982 host=$(host_alias) target=$(target_alias)
985 @if [ -f ./release/vault-install ] ; then \
986 ./release/vault-install $(host_alias) $(target_alias) ; \
992 install.all: install-no-fixedincludes
993 @if [ -f ./gcc/Makefile ] ; then \
994 r=`pwd` ; export r ; \
997 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
1002 # inet-install is used because the I*Net wants DejaGNU installed but
1003 # not built. Similarly, gzip is built but not installed.
1005 $(MAKE) INSTALL_MODULES="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
1007 # install-no-fixedincludes is used because Cygnus can not distribute
1008 # the fixed header files.
1009 .PHONY: install-no-fixedincludes
1010 install-no-fixedincludes: \
1012 $(INSTALL_MODULES) \
1013 $(INSTALL_TARGET_MODULES) \
1014 $(INSTALL_X11_MODULES) \
1015 gcc-no-fixedincludes
1017 # Install the gcc headers files, but not the fixed include files,
1018 # which Cygnus is not allowed to distribute. This rule is very
1019 # dependent on the workings of the gcc Makefile.in.
1020 .PHONY: gcc-no-fixedincludes
1021 gcc-no-fixedincludes:
1022 @if [ -f ./gcc/Makefile ]; then \
1023 rm -rf gcc/tmp-include; \
1024 mv gcc/include gcc/tmp-include 2>/dev/null; \
1025 mkdir gcc/include; \
1026 cp $(srcdir)/gcc/gsyslimits.h gcc/include/syslimits.h; \
1027 touch gcc/stmp-fixinc gcc/include/fixed; \
1028 rm -f gcc/stmp-headers gcc/stmp-int-hdrs; \
1029 r=`pwd`; export r; \
1030 s=`cd $(srcdir); pwd` ; export s; \
1033 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1034 rm -rf gcc/include; \
1035 mv gcc/tmp-include gcc/include 2>/dev/null; \
1038 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1039 # build a target all-X means to cd to X and make all.
1041 # all-gui, and all-libproc are handled specially because
1042 # they are still experimental, and if they fail to build, that
1043 # shouldn't stop "make all".
1044 .PHONY: $(ALL_MODULES) all-gui all-libproc
1045 $(ALL_MODULES) all-gui all-libproc:
1046 @dir=`echo $@ | sed -e 's/all-//'`; \
1047 if [ -f ./$${dir}/Makefile ] ; then \
1048 r=`pwd`; export r; \
1049 s=`cd $(srcdir); pwd`; export s; \
1051 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
1056 # These rules are used to check the modules which use FLAGS_TO_PASS.
1057 # To build a target check-X means to cd to X and make check. Some
1058 # modules are only tested in a native toolchain.
1060 .PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
1061 $(NATIVE_CHECK_MODULES):
1062 @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1063 dir=`echo $@ | sed -e 's/check-//'`; \
1064 if [ -f ./$${dir}/Makefile ] ; then \
1065 r=`pwd`; export r; \
1066 s=`cd $(srcdir); pwd`; export s; \
1068 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1074 $(CROSS_CHECK_MODULES):
1075 @dir=`echo $@ | sed -e 's/check-//'`; \
1076 if [ -f ./$${dir}/Makefile ] ; then \
1077 r=`pwd`; export r; \
1078 s=`cd $(srcdir); pwd`; export s; \
1080 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
1085 # This rule is used to install the modules which use FLAGS_TO_PASS.
1086 # To build a target install-X means to cd to X and make install.
1087 .PHONY: $(INSTALL_MODULES)
1088 $(INSTALL_MODULES): installdirs
1089 @dir=`echo $@ | sed -e 's/install-//'`; \
1090 if [ -f ./$${dir}/Makefile ] ; then \
1091 r=`pwd`; export r; \
1092 s=`cd $(srcdir); pwd`; export s; \
1094 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1099 # This rule is used to configure the modules which are built with the
1101 .PHONY: $(CONFIGURE_TARGET_MODULES)
1102 $(CONFIGURE_TARGET_MODULES):
1103 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1104 if [ -d $(TARGET_SUBDIR)/$${dir} ]; then \
1105 r=`pwd`; export r; \
1106 $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out 2> /dev/null; \
1107 if [ -s $(TARGET_SUBDIR)/$${dir}/tmpmulti.out ]; then \
1108 if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \
1109 if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \
1110 rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \
1112 echo "Multilibs changed for $${dir}, reconfiguring"; \
1113 rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \
1114 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1117 mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \
1120 fi; exit 0 # break command into two pieces
1121 @dir=`echo $@ | sed -e 's/configure-target-//'`; \
1122 if [ ! -d $(TARGET_SUBDIR) ]; then \
1124 elif [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1126 elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
1127 if [ -d $(srcdir)/$${dir} ]; then \
1128 [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
1129 r=`pwd`; export r; \
1130 s=`cd $(srcdir); pwd`; export s; \
1132 AR="$(AR_FOR_TARGET)"; export AR; \
1133 AS="$(AS_FOR_TARGET)"; export AS; \
1134 CC="$(CC_FOR_TARGET)"; export CC; \
1135 CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
1136 CXX="$(CXX_FOR_TARGET)"; export CXX; \
1137 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
1138 DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
1139 LD="$(LD_FOR_TARGET)"; export LD; \
1140 LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
1141 NM="$(NM_FOR_TARGET)"; export NM; \
1142 RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
1143 echo Configuring in $(TARGET_SUBDIR)/$${dir}; \
1144 cd $(TARGET_SUBDIR)/$${dir}; \
1147 topdir=$(srcdir) ;; \
1149 case "$(TARGET_SUBDIR)" in \
1150 .) topdir="../$(srcdir)" ;; \
1151 *) topdir="../../$(srcdir)" ;; \
1154 if [ "$(srcdir)" = "." ] ; then \
1155 if [ "$(TARGET_SUBDIR)" != "." ] ; then \
1156 if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
1157 if [ -f Makefile ]; then \
1158 if $(MAKE) distclean; then \
1172 srcdiroption="--srcdir=."; \
1175 srcdiroption="--srcdir=$${topdir}/$${dir}"; \
1176 libsrcdir="$$s/$${dir}"; \
1178 if [ -f $${libsrcdir}/configure ] ; then \
1179 $(SHELL) $${libsrcdir}/configure \
1180 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1181 --with-target-subdir="$(TARGET_SUBDIR)"; \
1183 $(SHELL) $$s/configure \
1184 $(CONFIG_ARGUMENTS) $${srcdiroption} \
1185 --with-target-subdir="$(TARGET_SUBDIR)"; \
1194 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1195 # To build a target all-X means to cd to X and make all.
1196 .PHONY: $(ALL_TARGET_MODULES)
1197 $(ALL_TARGET_MODULES):
1198 @dir=`echo $@ | sed -e 's/all-target-//'`; \
1199 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1200 r=`pwd`; export r; \
1201 s=`cd $(srcdir); pwd`; export s; \
1203 (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
1208 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1209 # To build a target install-X means to cd to X and make install.
1210 .PHONY: $(CHECK_TARGET_MODULES)
1211 $(CHECK_TARGET_MODULES):
1212 @dir=`echo $@ | sed -e 's/check-target-//'`; \
1213 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1214 r=`pwd`; export r; \
1215 s=`cd $(srcdir); pwd`; export s; \
1217 (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
1222 # This rule is used to install the modules which use
1223 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1225 .PHONY: $(INSTALL_TARGET_MODULES)
1226 $(INSTALL_TARGET_MODULES): installdirs
1227 @dir=`echo $@ | sed -e 's/install-target-//'`; \
1228 if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
1229 r=`pwd`; export r; \
1230 s=`cd $(srcdir); pwd`; export s; \
1232 (cd $(TARGET_SUBDIR)/$${dir}; \
1233 $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
1238 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1239 # To build a target all-X means to cd to X and make all.
1240 .PHONY: $(ALL_X11_MODULES)
1242 @dir=`echo $@ | sed -e 's/all-//'`; \
1243 if [ -f ./$${dir}/Makefile ] ; then \
1244 r=`pwd`; export r; \
1245 s=`cd $(srcdir); pwd`; export s; \
1248 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
1253 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1254 # To build a target check-X means to cd to X and make all.
1255 .PHONY: $(CHECK_X11_MODULES)
1256 $(CHECK_X11_MODULES):
1257 @dir=`echo $@ | sed -e 's/check-//'`; \
1258 if [ -f ./$${dir}/Makefile ] ; then \
1259 r=`pwd`; export r; \
1260 s=`cd $(srcdir); pwd`; export s; \
1263 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
1268 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1269 # To build a target install-X means to cd to X and make install.
1270 .PHONY: $(INSTALL_X11_MODULES)
1271 $(INSTALL_X11_MODULES):
1272 @dir=`echo $@ | sed -e 's/install-//'`; \
1273 if [ -f ./$${dir}/Makefile ] ; then \
1274 r=`pwd`; export r; \
1275 s=`cd $(srcdir); pwd`; export s; \
1278 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
1283 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1286 @if [ -f ./gcc/Makefile ] ; then \
1287 r=`pwd`; export r; \
1288 s=`cd $(srcdir); pwd`; export s; \
1290 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
1295 .PHONY: all-bootstrap
1297 @if [ -f ./gcc/Makefile ] ; then \
1298 r=`pwd`; export r; \
1299 s=`cd $(srcdir); pwd`; export s; \
1301 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) bootstrap); \
1308 @if [ -f ./gcc/Makefile ] ; then \
1309 r=`pwd`; export r; \
1310 s=`cd $(srcdir); pwd`; export s; \
1312 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
1319 @if [ -f ./gcc/Makefile ] ; then \
1320 r=`pwd`; export r; \
1321 s=`cd $(srcdir); pwd`; export s; \
1323 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
1329 # EXPERIMENTAL STUFF
1330 # This rule is used to install the modules which use FLAGS_TO_PASS.
1331 # To build a target install-X means to cd to X and make install.
1332 .PHONY: install-dosrel
1333 install-dosrel: installdirs info
1334 @dir=`echo $@ | sed -e 's/install-//'`; \
1335 if [ -f ./$${dir}/Makefile ] ; then \
1336 r=`pwd`; export r; \
1337 s=`cd $(srcdir); pwd`; export s; \
1339 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
1344 install-dosrel-fake:
1347 # This is a list of inter-dependencies among modules.
1349 all-autoconf: all-m4
1353 all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
1357 all-dejagnu: all-tcl all-expect all-tk
1358 all-diff: all-libiberty
1360 all-emacs19: all-byacc
1362 configure-target-examples: $(ALL_GCC)
1363 all-target-examples: configure-target-examples
1364 all-expect: all-tcl all-tk
1365 all-fileutils: all-libiberty
1368 all-flex: all-libiberty all-byacc
1369 all-gas: all-libiberty all-opcodes all-bfd
1373 all-gcc: all-byacc all-binutils all-gas all-ld
1374 all-bootstrap: all-libiberty all-byacc all-binutils all-gas all-ld
1375 GDB_TK = all-tk all-tcl
1376 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
1378 configure-target-gperf: $(ALL_GCC)
1379 all-target-gperf: configure-target-gperf all-target-libiberty all-target-libg++
1380 all-gprof: all-libiberty all-bfd all-opcodes
1381 all-grep: all-libiberty
1382 all-grez: all-libiberty all-bfd all-opcodes
1383 all-gui: all-gdb all-libproc all-target-librx
1385 all-gzip: all-libiberty
1386 all-hello: all-libiberty
1387 # start-sanitize-ide
1391 all-inet: all-tcl all-send-pr all-perl
1392 all-ispell: all-emacs19
1393 all-itcl: all-tcl all-tk
1394 all-ld: all-libiberty all-bfd all-opcodes all-byacc all-flex
1395 configure-target-libg++: $(ALL_GCC) configure-target-librx
1396 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++
1397 configure-target-libgloss: $(ALL_GCC)
1398 all-target-libgloss: configure-target-libgloss configure-target-newlib
1399 configure-target-libio: $(ALL_GCC)
1400 all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1402 # start-sanitize-ide
1403 all-libide: all-tcl all-tk all-itcl all-ilu
1405 configure-target-librx: $(ALL_GCC) configure-target-newlib
1406 all-target-librx: configure-target-librx
1407 configure-target-libstdc++: $(ALL_GCC)
1408 all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1409 all-m4: all-libiberty
1410 all-make: all-libiberty
1412 configure-target-newlib: $(ALL_GCC)
1413 all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
1414 all-opcodes: all-bfd all-libiberty
1415 all-patch: all-libiberty
1417 all-prms: all-libiberty
1420 all-recode: all-libiberty
1421 all-sed: all-libiberty
1422 all-send-pr: all-prms
1424 all-sim: all-libiberty all-bfd all-opcodes
1425 all-sn: all-tcl all-tk all-itcl all-db all-grep
1426 all-tar: all-libiberty
1428 all-tclX: all-tcl all-tk
1430 all-texinfo: all-libiberty
1432 all-tgas: all-libiberty all-bfd all-opcodes
1434 # start-sanitize-ide
1435 all-vmake: all-tcl all-tk all-itcl all-libide
1438 all-target-winsup: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
1439 configure-target-winsup: configure-target-newlib
1440 all-uudecode: all-libiberty
1441 configure-target-libiberty: $(ALL_GCC)
1442 all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
1443 all-target: $(ALL_TARGET_MODULES)
1444 install-target: $(INSTALL_TARGET_MODULES)
1446 ### other supporting targets
1452 installdirs: mkinstalldirs
1453 $(SHELL) $(srcdir)/mkinstalldirs $(MAKEDIRS)
1455 dir.info: do-install-info
1456 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
1457 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
1458 mv -f dir.info.new dir.info ; \
1463 @echo "Building a full distribution of this tree isn't done"
1464 @echo "via 'make dist'. Check out the etc/ subdirectory"
1468 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1469 # ability to use several tags files at once, so there is probably no need
1470 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1471 # (if we felt like it) have this Makefile write a piece of elisp which
1472 # the user could load to tell emacs19 where all the TAGS files we just
1476 # with the gnu make, this is done automatically.
1478 Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
1479 $(SHELL) ./config.status
1482 # Support for building net releases
1484 # Files in devo used in any net release.
1485 # ChangeLog omitted because it may refer to files which are not in this
1486 # distribution (perhaps it would be better to include it anyway).
1487 DEVO_SUPPORT= README Makefile.in configure configure.in \
1488 config.guess config.sub config move-if-change \
1489 mpw-README mpw-build.in mpw-config.in mpw-configure mpw-install \
1490 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1493 # Files in devo/etc used in any net release.
1494 # ChangeLog omitted because it may refer to files which are not in this
1495 # distribution (perhaps it would be better to include it anyway).
1496 ETC_SUPPORT= Makefile.in configure configure.in standards.texi \
1497 make-stds.texi standards.info*
1499 # When you use `make setup-dirs' or `make taz' you should always redefine
1501 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1505 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
1506 texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1507 # Take out texinfo from a few places; make simple BISON=bison line.
1508 sed -e '/^all\.normal: /s/\all-texinfo //' \
1509 -e '/^ install-texinfo /d' \
1510 -e '/^BISON = `if/,/^$$/d' \
1511 -e '/^# BISON:/s/.*/BISON = $(DEFAULT_YACC)/' \
1513 mv -f tmp Makefile.in
1515 $(start-sanitize-Sanitize)
1516 @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
1517 $(end-sanitize-Sanitize)
1519 [ -z "$(CONFIGURE_TARGET_MODULES)" ] \
1520 || $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
1521 CC_FOR_TARGET="$(CC)" CXX_FOR_TARGET="$(CXX)"
1522 # Make links, and run "make diststuff" or "make info" when needed.
1523 rm -rf proto-toplev ; mkdir proto-toplev
1524 set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1525 for d in $$dirs ; do \
1526 if [ -d $$d ]; then \
1527 if [ ! -f $$d/Makefile ] ; then true ; \
1528 elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
1529 (cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
1530 elif grep '^info:' $$d/Makefile >/dev/null ; then \
1531 (cd $$d ; $(MAKE) info ) || exit 1 ; \
1533 if [ -d $$d/proto-$$d.dir ]; then \
1534 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1536 ln -s ../$$d proto-toplev/$$d ; \
1538 else ln -s ../$$d proto-toplev/$$d ; fi ; \
1540 cd etc ; $(MAKE) info
1543 mkdir proto-toplev/etc
1544 (cd proto-toplev/etc; \
1545 for i in $(ETC_SUPPORT); do \
1546 ln -s ../../etc/$$i . ; \
1549 # Take out texinfo from configurable dirs
1550 rm proto-toplev/configure.in
1551 sed -e '/^host_tools=/s/texinfo //' \
1552 <configure.in >proto-toplev/configure.in
1554 mkdir proto-toplev/texinfo
1555 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1556 ln -s ../../texinfo/gpl.texinfo proto-toplev/texinfo/
1557 ln -s ../../texinfo/lgpl.texinfo proto-toplev/texinfo/
1558 if test -r texinfo/util/tex3patch ; then \
1559 mkdir proto-toplev/texinfo/util && \
1560 ln -s ../../../texinfo/util/tex3patch proto-toplev/texinfo/util ; \
1562 chmod og=u `find . -print`
1563 $(MAKE) -f Makefile.in do-tar-gz TOOL=$(TOOL) \
1564 VER=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`
1567 echo "==> Making $(TOOL)-$(VER).tar.gz"
1568 -rm -f $(TOOL)-$(VER)
1569 ln -s proto-toplev $(TOOL)-$(VER)
1570 tar cfh $(TOOL)-$(VER).tar $(TOOL)-$(VER)
1571 $(GZIPPROG) -v -9 $(TOOL)-$(VER).tar
1573 TEXINFO_SUPPORT= texinfo/texinfo.tex texinfo/gpl.texinfo texinfo/lgpl.texinfo
1574 DIST_SUPPORT= $(DEVO_SUPPORT) $(TEXINFO_SUPPORT)
1577 GAS_SUPPORT_DIRS= bfd include libiberty opcodes setup.com makefile.vms
1578 gas.tar.gz: $(DIST_SUPPORT) $(GAS_SUPPORT_DIRS) gas
1579 $(MAKE) -f Makefile.in taz TOOL=gas \
1580 SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1582 # The FSF "binutils" release includes gprof and ld.
1583 .PHONY: binutils.tar.gz
1584 BINUTILS_SUPPORT_DIRS= bfd gas include libiberty opcodes ld gprof setup.com makefile.vms
1585 binutils.tar.gz: $(DIST_SUPPORT) $(BINUTILS_SUPPORT_DIRS) binutils
1586 $(MAKE) -f Makefile.in taz TOOL=binutils \
1587 SUPPORT_FILES="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1589 .PHONY: gas+binutils.tar.gz
1590 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld gprof
1591 gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
1592 $(MAKE) -f Makefile.in taz TOOL=gas \
1593 SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1595 .PHONY: libg++.tar.gz
1596 LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
1597 libg++.tar.gz: $(DIST_SUPPORT) libg++
1598 $(MAKE) -f Makefile.in taz TOOL=libg++ \
1599 SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"
1601 GNATS_SUPPORT_DIRS=include libiberty send-pr
1602 gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
1603 $(MAKE) -f Makefile.in taz TOOL=gnats \
1604 SUPPORT_FILES="$(GNATS_SUPPORT_DIRS)"
1607 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
1608 GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1609 gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
1610 $(MAKE) -f Makefile.in taz TOOL=gdb \
1611 SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1613 .PHONY: newlib.tar.gz
1614 NEWLIB_SUPPORT_DIRS=libgloss
1615 # taz configures for the sun4 target which won't configure newlib.
1616 # We need newlib configured so that the .info files are made.
1617 # Unfortunately, it is not enough to just configure newlib separately:
1618 # taz will build the .info files but since SUBDIRS won't contain newlib,
1619 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1620 # used in building the .info files, eg: *.def, *.ref).
1621 # The problem isn't solvable however without a lot of extra work because
1622 # target libraries are built in subdir $(target_alias) which gets nuked during
1623 # the make distclean. For now punt on the issue of shipping newlib info files
1624 # with newlib net releases and wait for a day when some native target (sun4?)
1625 # supports newlib (if only minimally).
1626 newlib.tar.gz: $(DIST_SUPPORT) $(NEWLIB_SUPPORT_DIRS) newlib
1627 $(MAKE) -f Makefile.in taz TOOL=newlib \
1628 SUPPORT_FILES="$(NEWLIB_SUPPORT_DIRS)" \
1629 DEVO_SUPPORT="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1634 # start-sanitize-chill
1635 ## This is ugly, but I don't want GNU make to put these variables in
1636 ## the environment. Older makes will see this as a set of targets
1637 ## with no dependencies and no actions.
1638 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1639 # end-sanitize-chill
1641 # end of Makefile.in