2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 1991, 1992, 1993 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
24 exec_prefix = $(prefix)
25 bindir = $(exec_prefix)/bin
26 libdir = $(exec_prefix)/lib
29 program_transform_name =
31 datadir = $(prefix)/lib
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
44 docdir = $(datadir)/doc
49 INSTALL_PROGRAM = $(INSTALL)
50 INSTALL_DATA = $(INSTALL)
57 # start-sanitize-chill
58 CHILLFLAGS = $(CFLAGS)
68 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
69 BISON = `if [ -f $${rootme}/byacc/byacc ] ; \
70 then echo $${rootme}/byacc/byacc ; \
74 LEX = `if [ -f $${rootme}/flex/flex ] ; \
75 then echo $${rootme}/flex/flex ; \
78 MAKEINFO = `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
79 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
80 else echo makeinfo ; fi`
82 RUNTEST = `if [ -f $${rootme}/dejagnu/runtest ] ; \
83 then echo EXPECT=$${rootme}/expect/expect $${rootme}/dejagnu/runtest ; \
84 else echo runtest ; fi`
87 # libraries that may need to be augmented on a system-by-system basis
90 # compilers to use to create programs which must be run in the build
93 CXX_FOR_BUILD = $(CXX)
95 SUBDIRS = "this is set via configure, don't edit this"
99 INSTALL_TARGET = install.all
102 if [ -f $${rootme}/gcc/Makefile ] ; then \
103 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
105 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
108 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
112 # start-sanitize-chill
113 CHILL_FOR_TARGET = ` \
114 if [ -f $${rootme}/gcc/Makefile ] ; then \
115 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
117 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
120 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
127 if [ -f $${rootme}/gcc/Makefile ] ; then \
128 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
130 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
133 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
138 if [ -f $${rootme}/gas/Makefile ] ; then \
139 echo $${rootme}/gas/as.new ; \
141 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
144 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
149 if [ -f $${rootme}/binutils/Makefile ] ; then \
150 echo $${rootme}/binutils/ar ; \
152 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
155 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
159 RANLIB_FOR_TARGET = ` \
160 if [ -f $${rootme}/binutils/Makefile ] ; then \
161 echo $${rootme}/binutils/ranlib ; \
163 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
166 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
171 if [ -f $${rootme}/binutils/Makefile ] ; then \
172 echo $${rootme}/binutils/nm ; \
174 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
177 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
181 # FIXME: This is badly named.
183 if [ -f $${rootme}/gcc/Makefile ] ; then \
184 if [ -f $${rootme}/newlib/Makefile ] ; then \
185 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
187 echo -I$${rootme}/gcc/include ; \
195 #### host and target specific makefile fragments come in here.
198 # Flags to pass down to all sub-makes.
199 # Please keep these in alphabetical order.
200 BASE_FLAGS_TO_PASS = \
201 "AR_FLAGS=$(AR_FLAGS)" \
202 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
203 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
205 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
206 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
208 $(start-sanitize-chill)\
209 "CHILLFLAGS=$(CHILLFLAGS)" \
210 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
211 "CHILL_LIB=$(CHILL_LIB)" \
212 $(end-sanitize-chill)\
213 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
214 "CXXFLAGS=$(CXXFLAGS)" \
215 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
216 'GCC_FOR_TARGET=$$(CC_FOR_TARGET)' \
217 "INSTALL=$(INSTALL)" \
218 "INSTALL_DATA=$(INSTALL_DATA)" \
219 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
220 "LDFLAGS=$(LDFLAGS)" \
222 "LOADLIBES=$(LOADLIBES)" \
223 "MAKEINFO=$(MAKEINFO)" \
224 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
226 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
227 "RUNTEST=$(RUNTEST)" \
228 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
229 "exec_prefix=$(exec_prefix)" \
233 # Flags to pass down to most sub-makes, in which we're building with
234 # the host environment.
235 # If any variables are added here, they must be added to do-*, below.
245 FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
247 # Flags that are concerned with the location of the X11 include files
249 X11_FLAGS_TO_PASS = \
250 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
251 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
254 # Flags to pass down to makes which are built with the target environment.
255 # The double $ decreases the length of the command line; the variables
256 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
257 # If any variables are added here, they must be added to do-*, below.
258 EXTRA_TARGET_FLAGS = \
259 'AR=$$(AR_FOR_TARGET)' \
260 'AS=$$(AS_FOR_TARGET)' \
261 'CC=$$(CC_FOR_TARGET)' \
262 'CXX=$$(CXX_FOR_TARGET)' \
263 'NM=$$(NM_FOR_TARGET)' \
264 'RANLIB=$$(RANLIB_FOR_TARGET)' \
265 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
267 TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
269 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
270 # unfortunately needs the native compiler and the target ar and
272 # If any variables are added here, they must be added to do-*, below.
274 'AR=$$(AR_FOR_TARGET)' \
279 'RANLIB=$$(RANLIB_FOR_TARGET)' \
282 GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
284 # This is a list of the targets for all of the modules which are compiled
285 # using $(FLAGS_TO_PASS).
331 # This is a list of the check targets for all of the modules which are
332 # compiled using $(FLAGS_TO_PASS).
378 # This is a list of the install targets for all of the modules which are
379 # compiled using $(FLAGS_TO_PASS).
426 # This is a list of the targets for all of the modules which are compiled
427 # using $(X11_FLAGS_TO_PASS).
434 # This is a list of the check targets for all of the modules which are
435 # compiled using $(X11_FLAGS_TO_PASS).
436 CHECK_X11_MODULES = \
442 # This is a list of the install targets for all the modules which are
443 # compiled using $(X11_FLAGS_TO_PASS).
444 INSTALL_X11_MODULES = \
450 # This is a list of the targets for all of the modules which are compiled
451 # using $(TARGET_FLAGS_TO_PASS).
452 ALL_TARGET_MODULES = \
453 $(start-sanitize-chill) \
455 $(end-sanitize-chill) \
460 # This is a list of the check targets for all of the modules which are
461 # compiled using $(TARGET_FLAGS_TO_PASS).
462 CHECK_TARGET_MODULES = \
463 $(start-sanitize-chill) \
465 $(end-sanitize-chill) \
470 # This is a list of the install targets for all of the modules which are
471 # compiled using $(TARGET_FLAGS_TO_PASS).
472 INSTALL_TARGET_MODULES = \
473 $(start-sanitize-chill) \
475 $(end-sanitize-chill) \
480 # This is a shell case of all modules which are compiled using
481 # $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
482 TARGET_LIBS = libg++ | newlib | xiberty
483 # start-sanitize-chill
484 TARGET_LIBS = chillrt | libg++ | newlib | xiberty
487 # The first rule in the file had better be this one. Don't put any above it.
491 # The target built for a native build.
495 $(ALL_TARGET_MODULES) \
499 # The target built for a cross build.
516 $(ALL_TARGET_MODULES)
518 # Do a target for all the subdirectories. A ``make do-X'' will do a
519 # ``make X'' in all subdirectories (because, in general, there is a
520 # dependency (below) of X upon do-X, a ``make X'' will also do this,
521 # but it may do additional work as well).
522 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
523 # because it is so large that it can easily overflow the command line
524 # length limit on some systems.
536 @target=`echo $@ | sed -e 's/^do-//'`; \
537 rootme=`pwd`; export rootme; \
538 srcroot=`cd $(srcdir); pwd`; export srcroot; \
539 for i in $(SUBDIRS); do \
540 if [ -f ./$$i/Makefile ]; then \
543 for flag in $(EXTRA_TARGET_FLAGS); do \
544 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
548 for flag in $(EXTRA_GCC_FLAGS); do \
549 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
553 for flag in $(EXTRA_HOST_FLAGS); do \
554 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
558 export AR AS CC CXX NM RANLIB XTRAFLAGS; \
560 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
561 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
562 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
564 then true; else exit 1; fi; \
568 # Here are the targets which correspond to the do-X targets.
570 .PHONY: info installcheck dvi install-info
571 .PHONY: clean distclean mostlyclean realclean local-clean local-distclean
573 installcheck: do-installcheck
576 install-info: install-info-dirs do-install-info dir.info
577 if [ -f dir.info ] ; then \
578 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
581 do-install-info: install-info-dirs
584 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
587 -rm -f Makefile config.status
589 clean: do-clean local-clean
590 mostlyclean: do-mostlyclean local-clean
591 distclean: do-distclean local-clean local-distclean
592 realclean: do-realclean local-clean local-distclean
597 check: $(CHECK_MODULES) \
598 $(CHECK_TARGET_MODULES) \
599 $(CHECK_X11_MODULES) \
602 # Installation targets.
604 .PHONY: install uninstall
605 install: $(INSTALL_TARGET)
608 @echo "the uninstall target is not supported in this tree"
611 install.all: install-no-fixedincludes
612 @if [ -f ./gcc/Makefile ] ; then \
613 rootme=`pwd` ; export rootme ; \
615 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
620 # install-no-fixedincludes is used because Cygnus can not distributed
621 # the fixed header files.
622 .PHONY: install-no-fixedincludes
623 install-no-fixedincludes: \
625 gcc-no-fixedincludes \
627 $(INSTALL_TARGET_MODULES) \
628 $(INSTALL_X11_MODULES)
630 # Install the gcc headers files, but not the fixed include files,
631 # which Cygnus is not allowed to distribute. This rule is very
632 # dependent on the workings of the gcc Makefile.in.
633 .PHONY: gcc-no-fixedincludes
634 gcc-no-fixedincludes:
635 @if [ -f ./gcc/Makefile ]; then \
636 rm -rf gcc/tmp-include; \
637 mv gcc/include gcc/tmp-include 2>/dev/null; \
639 touch gcc/stmp-fixincludes; \
640 rm -f gcc/stmp-headers; \
641 rootme=`pwd`; export rootme; \
642 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
644 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
645 rm -rf gcc/include; \
646 mv gcc/tmp-include gcc/include 2>/dev/null; \
649 .PHONY: install.cross
666 $(INSTALL_TARGET_MODULES)
668 # This rule is used to build the modules which use FLAGS_TO_PASS. To
669 # build a target all-X means to cd to X and make all.
670 # all-glob is handled specially because it doesn't actually build.
671 .PHONY: $(ALL_MODULES) all-glob
672 $(ALL_MODULES) all-glob:
673 @dir=`echo $@ | sed -e 's/all-//'`; \
674 if [ -f ./$${dir}/Makefile ] ; then \
675 rootme=`pwd`; export rootme; \
676 srcroot=`cd $(srcdir); pwd`; export srcroot; \
677 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
682 # This rule is used to check the modules which use FLAGS_TO_PASS. To
683 # build a target check-X means to cd to X and make all.
684 .PHONY: $(CHECK_MODULES)
686 @dir=`echo $@ | sed -e 's/check-//'`; \
687 if [ -f ./$${dir}/Makefile ] ; then \
688 rootme=`pwd`; export rootme; \
689 srcroot=`cd $(srcdir); pwd`; export srcroot; \
690 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
695 # This rule is used to install the modules which use FLAGS_TO_PASS.
696 # To build a target install-X means to cd to X and make install.
697 .PHONY: $(INSTALL_MODULES)
698 $(INSTALL_MODULES): install-dirs
699 @dir=`echo $@ | sed -e 's/install-//'`; \
700 if [ -f ./$${dir}/Makefile ] ; then \
701 rootme=`pwd`; export rootme; \
702 srcroot=`cd $(srcdir); pwd`; export srcroot; \
703 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
708 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
709 # To build a target all-X means to cd to X and make all.
710 .PHONY: $(ALL_TARGET_MODULES)
711 $(ALL_TARGET_MODULES):
712 @dir=`echo $@ | sed -e 's/all-//'`; \
713 if [ -f ./$${dir}/Makefile ] ; then \
714 rootme=`pwd`; export rootme; \
715 srcroot=`cd $(srcdir); pwd`; export srcroot; \
716 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
721 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
722 # To build a target install-X means to cd to X and make install.
723 .PHONY: $(CHECK_TARGET_MODULES)
724 $(CHECK_TARGET_MODULES):
725 @dir=`echo $@ | sed -e 's/check-//'`; \
726 if [ -f ./$${dir}/Makefile ] ; then \
727 rootme=`pwd`; export rootme; \
728 srcroot=`cd $(srcdir); pwd`; export srcroot; \
729 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) check); \
734 # This rule is used to install the modules which use
735 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
737 .PHONY: $(INSTALL_TARGET_MODULES)
738 $(INSTALL_TARGET_MODULES): install-dirs
739 @dir=`echo $@ | sed -e 's/install-//'`; \
740 if [ -f ./$${dir}/Makefile ] ; then \
741 rootme=`pwd`; export rootme; \
742 srcroot=`cd $(srcdir); pwd`; export srcroot; \
743 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
748 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
749 # To build a target all-X means to cd to X and make all.
750 .PHONY: $(ALL_X11_MODULES)
752 @dir=`echo $@ | sed -e 's/all-//'`; \
753 if [ -f ./$${dir}/Makefile ] ; then \
754 rootme=`pwd`; export rootme; \
755 srcroot=`cd $(srcdir); pwd`; export srcroot; \
757 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
762 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
763 # To build a target check-X means to cd to X and make all.
764 .PHONY: $(CHECK_X11_MODULES)
765 $(CHECK_X11_MODULES):
766 @dir=`echo $@ | sed -e 's/check-//'`; \
767 if [ -f ./$${dir}/Makefile ] ; then \
768 rootme=`pwd`; export rootme; \
769 srcroot=`cd $(srcdir); pwd`; export srcroot; \
771 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
776 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
777 # To build a target install-X means to cd to X and make install.
778 .PHONY: $(INSTALL_X11_MODULES)
779 $(INSTALL_X11_MODULES):
780 @dir=`echo $@ | sed -e 's/install-//'`; \
781 if [ -f ./$${dir}/Makefile ] ; then \
782 rootme=`pwd`; export rootme; \
783 srcroot=`cd $(srcdir); pwd`; export srcroot; \
785 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
790 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
793 @if [ -f ./gcc/Makefile ] ; then \
794 rootme=`pwd`; export rootme; \
795 srcroot=`cd $(srcdir); pwd`; export srcroot; \
796 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
803 @if [ -f ./gcc/Makefile ] ; then \
804 rootme=`pwd`; export rootme; \
805 srcroot=`cd $(srcdir); pwd`; export srcroot; \
806 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) check); \
813 @if [ -f ./gcc/Makefile ] ; then \
814 rootme=`pwd`; export rootme; \
815 srcroot=`cd $(srcdir); pwd`; export srcroot; \
816 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
821 # This is a list of inter-dependencies among modules.
824 all-binutils: all-libiberty all-opcodes all-bfd all-flex
826 # start-sanitize-chill
827 all-chillrt: all-binutils all-gas all-gcc all-newlib
831 all-diff: all-libiberty
837 all-flex: all-libiberty all-byacc
838 all-gas: all-libiberty all-opcodes all-bfd
840 all-gcc: all-libiberty all-byacc all-binutils all-gas
841 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-glob all-byacc
843 all-gprof: all-libiberty all-bfd
845 all-gzip: all-libiberty
846 all-hello: all-libiberty
848 all-ispell: all-emacs
849 all-ld: all-libiberty all-bfd all-byacc all-flex
850 all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib
852 all-m4: all-libiberty
853 all-make: all-libiberty
855 all-newlib: all-binutils all-gas all-gcc
861 all-recode: all-libiberty
865 all-sim: all-libiberty all-bfd
866 all-tar: all-libiberty
868 all-tclX: all-tcl all-tk
870 all-texinfo: all-libiberty
872 all-tgas: all-libiberty all-bfd
875 all-uudecode: all-libiberty
876 all-xiberty: all-gcc all-newlib
878 ### other supporting targets
887 @for i in $(MAKEDIRS) ; do \
888 echo Making $$i... ; \
889 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
890 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
891 if [ ! -d $$i ] ; then \
892 if mkdir $$i ; then \
902 .PHONY: install-info-dirs
904 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
905 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
906 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
907 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
909 dir.info: do-install-info
910 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
911 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
912 mv -f dir.info.new dir.info ; \
917 @echo "Building a full distribution of this tree isn't done"
918 @echo "via 'make dist'. Check out the etc/ subdirectory"
927 @for i in $(SUBDIRS); \
931 wd=`basename $$pwd`; \
932 for j in `$(MAKE) ls`; \
938 # with the gnu make, this is done automatically.
940 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
941 $(SHELL) ./config.status
944 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
946 DEVO_SUPPORT= README Makefile.in configure configure.in \
947 config.guess config.sub config move-if-change
948 ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \
950 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob sim
951 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS)
953 .PHONY: setup-dirs-gdb gdb.tar.Z make-gdb.tar.Z
958 chmod og=u `find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
960 gdb.tar.Z: setup-dirs-gdb
961 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir BISON="byacc")
962 (cd gdb; $(MAKE) -f Makefile.in make-proto-testsuite.dir)
963 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
965 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/texinfo.tex
966 rm -rf proto-toplev; mkdir proto-toplev
967 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
968 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
971 mkdir proto-toplev/etc
972 (cd proto-toplev/etc; for i in $(ETC_SUPPORT); do \
973 ln -s ../../etc/$$i . ; \
975 # Put only one copy (four hard links) of COPYING in the tar file.
976 rm proto-toplev/bfd/COPYING
977 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
978 rm proto-toplev/include/COPYING
979 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
980 rm proto-toplev/readline/COPYING
981 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
983 # Take out texinfo and glob from configurable dirs
984 rm proto-toplev/configure.in
985 sed -e '/^host_tools=/s/texinfo //' \
986 -e '/^host_libs=/s/glob //' \
987 <configure.in >proto-toplev/configure.in
989 # Take out texinfo from a few places; make simple BISON=bison line.
990 rm proto-toplev/Makefile.in
991 sed -e '/^all\.normal: /s/\all-texinfo //' \
992 -e '/^ install-texinfo /d' \
993 -e '/^BISON = /,/^$$/d' \
994 -e '/^# BISON:/s/.*/BISON = bison -y/' \
995 <Makefile.in >proto-toplev/Makefile.in
997 mkdir proto-toplev/texinfo
998 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
999 ln -s ../../texinfo/tex3patch proto-toplev/texinfo/
1000 chmod og=u `find proto-toplev -print`
1001 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1002 ln -s proto-toplev gdb-$$VER; \
1003 echo "==> Making gdb-$$VER.tar.Z"; \
1004 tar cfh - gdb-$$VER | $(COMPRESS) -v >gdb-$$VER.tar.Z; \
1005 echo "==> Making gdb-$$VER.tar.z"; \
1006 tar cfh - gdb-$$VER | $(GZIP) -v -9 >gdb-$$VER.tar.z)
1008 # Make the testsuite archive separately.
1009 ln -s ../../gdb/proto-testsuite.dir/testsuite proto-toplev/gdb/testsuite
1010 # Put a copy of COPYING in the tar file.
1011 ln proto-toplev/gdb/COPYING proto-toplev/gdb/testsuite/COPYING
1012 chmod og=u `find proto-toplev/gdb/testsuite -print`
1013 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1014 echo "==> Making gdb-$$VER-testsuite.tar.Z"; \
1015 tar cfh - gdb-$$VER/gdb/testsuite | \
1016 $(COMPRESS) -v >gdb-$$VER-testsuite.tar.Z; \
1017 echo "==> Making gdb-$$VER-testsuite.tar.z"; \
1018 tar cfh - gdb-$$VER/gdb/testsuite | \
1019 $(GZIP) -v -9 >gdb-$$VER-testsuite.tar.z)
1021 # When you use `make setup-dirs' or `make taz' you should always redefine
1023 SUPPORT_FILES = list-of-support-files-for-tool-in-question
1024 # Directories that might want `make proto-dir' run.
1027 .PHONY: setup-dirs taz
1031 ./configure -rm sun4
1032 chmod og=u `find etc $(DEVO_SUPPORT) $(SUPPORT_FILES) -print`
1033 for d in .. $(PROTODIRS) ; do \
1034 if [ $$d != ".." ] && [ -d $$d ]; then \
1035 (cd $$d ; $(MAKE) -f Makefile.in proto-dir) ; \
1039 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1040 rm -rf proto-toplev; mkdir proto-toplev
1041 for d in .. $(PROTODIRS) ; do \
1042 if [ $$d != .. ]; then \
1043 if [ -d $$d ]; then \
1044 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1048 (cd proto-toplev; for i in $(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES); do \
1049 if [ ! -d $$i ]; then ln -s ../$$i . ; else true ; fi ; \
1051 mkdir proto-toplev/etc
1052 (cd proto-toplev/etc; for i in $(ETC_SUPPORT); do \
1053 ln -s ../../etc/$$i . ; \
1055 # Put only one copy (four hard links) of COPYING in the tar file.
1058 # Take out texinfo and glob from configurable dirs
1059 rm proto-toplev/configure.in
1060 sed -e '/^host_tools=/s/texinfo //' \
1061 -e '/^host_libs=/s/glob //' \
1062 <configure.in >proto-toplev/configure.in
1064 # Take out texinfo from a few places; make simple BISON=bison line.
1065 rm proto-toplev/Makefile.in
1066 sed -e '/^all\.normal: /s/\all-texinfo //' \
1067 -e '/^ install-texinfo /d' \
1068 -e '/^BISON = /,/^$$/d' \
1069 -e '/^# BISON:/s/.*/BISON = bison -y/' \
1070 <Makefile.in >proto-toplev/Makefile.in
1072 mkdir proto-toplev/texinfo
1073 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1074 ln -s ../../texinfo/tex3patch proto-toplev/texinfo/
1075 chmod og=u `find proto-toplev -print`
1076 (VER=`sed <$(TOOL)/Makefile.in -n 's/VERSION *= *//p'`; \
1077 echo "==> Making $(TOOL)-$$VER.tar.z"; \
1078 ln -s proto-toplev $(TOOL)-$$VER; \
1079 tar cfh - $(TOOL)-$$VER \
1080 | $(GZIP) -v >$(TOOL)-$$VER.tar.z)
1082 GAS_SUPPORT_DIRS= bfd include libiberty opcodes
1085 gas.tar.z: $(DEVO_SUPPORT) $(GAS_SUPPORT_DIRS) gas texinfo/texinfo.tex
1086 $(MAKE) -f Makefile.in setup-dirs SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1087 $(MAKE) -f Makefile.in taz SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" TOOL=gas
1089 .PHONY: gas+binutils.tar.z
1090 GASB_SUPPORT_DIRS= $(GAS_SUPPORT_DIRS) binutils ld
1091 gas+binutils.tar.z: $(DEVO_SUPPORT) $(GASB_SUPPORT_DIRS) gas texinfo/texinfo.tex
1092 $(MAKE) -f Makefile.in setup-dirs SUPPORT_FILES="$(GASB_SUPPORT_DIRS)"
1093 $(MAKE) -f Makefile.in taz SUPPORT_FILES="$(GASB_SUPPORT_DIRS)" TOOL=gas
1098 # start-sanitize-chill
1099 ## This is ugly, but I don't want GNU make to put these variables in
1100 ## the environment. Older makes will see this as a set of targets
1101 ## with no dependencies and no actions.
1102 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1103 # end-sanitize-chill
1105 # end of Makefile.in