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.
537 @target=`echo $@ | sed -e 's/^do-//'`; \
538 rootme=`pwd`; export rootme; \
539 srcroot=`cd $(srcdir); pwd`; export srcroot; \
540 for i in $(SUBDIRS); do \
541 if [ -f ./$$i/Makefile ]; then \
544 for flag in $(EXTRA_TARGET_FLAGS); do \
545 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
549 for flag in $(EXTRA_GCC_FLAGS); do \
550 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
554 for flag in $(EXTRA_HOST_FLAGS); do \
555 eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
559 export AR AS CC CXX NM RANLIB XTRAFLAGS; \
561 $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
562 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
563 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
565 then true; else exit 1; fi; \
569 # Here are the targets which correspond to the do-X targets.
571 .PHONY: info check installcheck dvi install-info
572 .PHONY: clean distclean mostlyclean realclean local-clean local-distclean
575 installcheck: do-installcheck
578 install-info: install-info-dirs do-install-info dir.info
579 if [ -f dir.info ] ; then \
580 $(INSTALL_DATA) dir.info $(infodir)/dir.info ; \
583 do-install-info: install-info-dirs
586 -rm -f *.a TEMP errs core *.o *~ \#* TAGS *.E
589 -rm -f Makefile config.status
591 clean: do-clean local-clean
592 mostlyclean: do-mostlyclean local-clean
593 distclean: do-distclean local-clean local-distclean
594 realclean: do-realclean local-clean local-distclean
596 # Installation targets.
598 .PHONY: install uninstall
599 install: $(INSTALL_TARGET)
602 @echo "the uninstall target is not supported in this tree"
605 install.all: install-no-fixedincludes
606 @if [ -f ./gcc/Makefile ] ; then \
607 rootme=`pwd` ; export rootme ; \
609 $(MAKE) $(FLAGS_TO_PASS) install-headers) ; \
614 # install-no-fixedincludes is used because Cygnus can not distributed
615 # the fixed header files.
616 .PHONY: install-no-fixedincludes
617 install-no-fixedincludes: \
619 gcc-no-fixedincludes \
621 $(INSTALL_TARGET_MODULES) \
622 $(INSTALL_X11_MODULES)
624 # Install the gcc headers files, but not the fixed include files,
625 # which Cygnus is not allowed to distribute. This rule is very
626 # dependent on the workings of the gcc Makefile.in.
627 .PHONY: gcc-no-fixedincludes
628 gcc-no-fixedincludes:
629 @if [ -f ./gcc/Makefile ]; then \
630 rm -rf gcc/tmp-include; \
631 mv gcc/include gcc/tmp-include 2>/dev/null; \
633 touch gcc/stmp-fixincludes; \
634 rm -f gcc/stmp-headers; \
635 rootme=`pwd`; export rootme; \
636 srcroot=`cd $(srcdir); pwd` ; export srcroot; \
638 $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
639 rm -rf gcc/include; \
640 mv gcc/tmp-include gcc/include 2>/dev/null; \
643 .PHONY: install.cross
660 $(INSTALL_TARGET_MODULES)
662 # This rule is used to build the modules which use FLAGS_TO_PASS. To
663 # build a target all-X means to cd to X and make all.
664 # all-glob is handled specially because it doesn't actually build.
665 .PHONY: $(ALL_MODULES) all-glob
666 $(ALL_MODULES) all-glob:
667 @dir=`echo $@ | sed -e 's/all-//'`; \
668 if [ -f ./$${dir}/Makefile ] ; then \
669 rootme=`pwd`; export rootme; \
670 srcroot=`cd $(srcdir); pwd`; export srcroot; \
671 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) all); \
676 # This rule is used to check the modules which use FLAGS_TO_PASS. To
677 # build a target check-X means to cd to X and make all.
678 .PHONY: $(CHECK_MODULES)
680 @dir=`echo $@ | sed -e 's/check-//'`; \
681 if [ -f ./$${dir}/Makefile ] ; then \
682 rootme=`pwd`; export rootme; \
683 srcroot=`cd $(srcdir); pwd`; export srcroot; \
684 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) check); \
689 # This rule is used to install the modules which use FLAGS_TO_PASS.
690 # To build a target install-X means to cd to X and make install.
691 .PHONY: $(INSTALL_MODULES)
692 $(INSTALL_MODULES): install-dirs
693 @dir=`echo $@ | sed -e 's/install-//'`; \
694 if [ -f ./$${dir}/Makefile ] ; then \
695 rootme=`pwd`; export rootme; \
696 srcroot=`cd $(srcdir); pwd`; export srcroot; \
697 (cd $${dir}; $(MAKE) $(FLAGS_TO_PASS) install); \
702 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
703 # To build a target all-X means to cd to X and make all.
704 .PHONY: $(ALL_TARGET_MODULES)
705 $(ALL_TARGET_MODULES):
706 @dir=`echo $@ | sed -e 's/all-//'`; \
707 if [ -f ./$${dir}/Makefile ] ; then \
708 rootme=`pwd`; export rootme; \
709 srcroot=`cd $(srcdir); pwd`; export srcroot; \
710 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
715 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
716 # To build a target install-X means to cd to X and make install.
717 .PHONY: $(CHECK_TARGET_MODULES)
718 $(CHECK_TARGET_MODULES):
719 @dir=`echo $@ | sed -e 's/check-//'`; \
720 if [ -f ./$${dir}/Makefile ] ; then \
721 rootme=`pwd`; export rootme; \
722 srcroot=`cd $(srcdir); pwd`; export srcroot; \
723 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) check); \
728 # This rule is used to install the modules which use
729 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
731 .PHONY: $(INSTALL_TARGET_MODULES)
732 $(INSTALL_TARGET_MODULES): install-dirs
733 @dir=`echo $@ | sed -e 's/install-//'`; \
734 if [ -f ./$${dir}/Makefile ] ; then \
735 rootme=`pwd`; export rootme; \
736 srcroot=`cd $(srcdir); pwd`; export srcroot; \
737 (cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
742 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
743 # To build a target all-X means to cd to X and make all.
744 .PHONY: $(ALL_X11_MODULES)
746 @dir=`echo $@ | sed -e 's/all-//'`; \
747 if [ -f ./$${dir}/Makefile ] ; then \
748 rootme=`pwd`; export rootme; \
749 srcroot=`cd $(srcdir); pwd`; export srcroot; \
751 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) all); \
756 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
757 # To build a target check-X means to cd to X and make all.
758 .PHONY: $(CHECK_X11_MODULES)
759 $(CHECK_X11_MODULES):
760 @dir=`echo $@ | sed -e 's/check-//'`; \
761 if [ -f ./$${dir}/Makefile ] ; then \
762 rootme=`pwd`; export rootme; \
763 srcroot=`cd $(srcdir); pwd`; export srcroot; \
765 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) check); \
770 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
771 # To build a target install-X means to cd to X and make install.
772 .PHONY: $(INSTALL_X11_MODULES)
773 $(INSTALL_X11_MODULES):
774 @dir=`echo $@ | sed -e 's/install-//'`; \
775 if [ -f ./$${dir}/Makefile ] ; then \
776 rootme=`pwd`; export rootme; \
777 srcroot=`cd $(srcdir); pwd`; export srcroot; \
779 $(MAKE) $(FLAGS_TO_PASS) $(X11_FLAGS_TO_PASS) install); \
784 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
787 @if [ -f ./gcc/Makefile ] ; then \
788 rootme=`pwd`; export rootme; \
789 srcroot=`cd $(srcdir); pwd`; export srcroot; \
790 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
797 @if [ -f ./gcc/Makefile ] ; then \
798 rootme=`pwd`; export rootme; \
799 srcroot=`cd $(srcdir); pwd`; export srcroot; \
800 (cd gcc; $(MAKE) $(GCC_FLAGS_TO_PASS) install); \
805 # This is a list of inter-dependencies among modules.
808 all-binutils: all-libiberty all-opcodes all-bfd all-flex
810 # start-sanitize-chill
811 all-chillrt: all-binutils all-gas all-gcc all-newlib
815 all-diff: all-libiberty
821 all-flex: all-libiberty all-byacc
822 all-gas: all-libiberty all-opcodes all-bfd
824 all-gcc: all-libiberty all-byacc all-binutils all-gas
825 all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-glob all-byacc
827 all-gprof: all-libiberty all-bfd
829 all-gzip: all-libiberty
830 all-hello: all-libiberty
832 all-ispell: all-emacs
833 all-ld: all-libiberty all-bfd all-byacc all-flex
834 all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib
836 all-m4: all-libiberty
837 all-make: all-libiberty
839 all-newlib: all-binutils all-gas all-gcc
845 all-recode: all-libiberty
849 all-sim: all-libiberty all-bfd
850 all-tar: all-libiberty
852 all-tclX: all-tcl all-tk
854 all-texinfo: all-libiberty
856 all-tgas: all-libiberty all-bfd
859 all-uudecode: all-libiberty
860 all-xiberty: all-gcc all-newlib
862 ### other supporting targets
871 @for i in $(MAKEDIRS) ; do \
872 echo Making $$i... ; \
873 parent=`echo $$i|sed -e 's@/[^/]*$$@@'`; \
874 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi ; \
875 if [ ! -d $$i ] ; then \
876 if mkdir $$i ; then \
886 .PHONY: install-info-dirs
888 if [ -d $(prefix) ] ; then true ; else mkdir $(prefix) ; fi
889 -parent=`echo $(infodir)|sed -e 's@/[^/]*$$@@'`; \
890 if [ -d $$parent ] ; then true ; else mkdir $$parent ; fi
891 -if [ -d $(infodir) ] ; then true ; else mkdir $(infodir) ; fi
893 dir.info: do-install-info
894 if [ -f $(srcdir)/texinfo/gen-info-dir ] ; then \
895 $(srcdir)/texinfo/gen-info-dir $(infodir) $(srcdir)/texinfo/dir.info-template > dir.info.new ; \
896 mv -f dir.info.new dir.info ; \
901 @echo "Building a full distribution of this tree isn't done"
902 @echo "via 'make dist'. Check out the etc/ subdirectory"
911 @for i in $(SUBDIRS); \
915 wd=`basename $$pwd`; \
916 for j in `$(MAKE) ls`; \
922 # with the gnu make, this is done automatically.
924 Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
925 $(SHELL) ./config.status
928 # Build GDB distributions that contain BFD, Include, Libiberty, Readline, etc
930 DEVO_SUPPORT= README Makefile.in configure configure.in \
931 config.guess config.sub config move-if-change
932 ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \
934 GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline glob sim
935 GDB_SUPPORT_FILES= $(GDB_SUPPORT_DIRS)
937 .PHONY: setup-dirs-gdb gdb.tar.Z make-gdb.tar.Z
942 chmod og=u `find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
944 gdb.tar.Z: setup-dirs-gdb
945 (cd gdb; $(MAKE) -f Makefile.in make-proto-gdb.dir BISON="byacc")
946 $(MAKE) $(MFLAGS) -f Makefile.in make-gdb.tar.Z
948 make-gdb.tar.Z: $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS) gdb texinfo/texinfo.tex
949 rm -rf proto-toplev; mkdir proto-toplev
950 ln -s ../gdb/proto-gdb.dir proto-toplev/gdb
951 (cd proto-toplev; for i in $(DEVO_SUPPORT) $(GDB_SUPPORT_DIRS); do \
954 mkdir proto-toplev/etc
955 (cd proto-toplev/etc; for i in $(ETC_SUPPORT); do \
956 ln -s ../../etc/$$i . ; \
958 # Put only one copy (four hard links) of COPYING in the tar file.
959 rm proto-toplev/bfd/COPYING
960 ln proto-toplev/gdb/COPYING proto-toplev/bfd/COPYING
961 rm proto-toplev/include/COPYING
962 ln proto-toplev/gdb/COPYING proto-toplev/include/COPYING
963 rm proto-toplev/readline/COPYING
964 ln proto-toplev/gdb/COPYING proto-toplev/readline/COPYING
966 # Take out texinfo and glob from configurable dirs
967 rm proto-toplev/configure.in
968 sed -e '/^host_tools=/s/texinfo //' \
969 -e '/^host_libs=/s/glob //' \
970 <configure.in >proto-toplev/configure.in
972 # Take out texinfo from a few places; make simple BISON=bison line.
973 rm proto-toplev/Makefile.in
974 sed -e '/^all\.normal: /s/\all-texinfo //' \
975 -e '/^ install-texinfo /d' \
976 -e '/^BISON = /,/^$$/d' \
977 -e '/^# BISON:/s/.*/BISON = bison -y/' \
978 <Makefile.in >proto-toplev/Makefile.in
980 mkdir proto-toplev/texinfo
981 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
982 ln -s ../../texinfo/tex3patch proto-toplev/texinfo/
983 chmod og=u `find proto-toplev -print`
984 (VER=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
985 ln -s proto-toplev gdb-$$VER; \
986 echo "==> Making gdb-$$VER.tar.Z"; \
987 tar cfh - gdb-$$VER | $(COMPRESS) -v >gdb-$$VER.tar.Z; \
988 echo "==> Making gdb-$$VER.tar.z"; \
989 tar cfh - gdb-$$VER | $(GZIP) -v -9 >gdb-$$VER.tar.z)
991 # When you use `make setup-dirs' or `make taz' you should always redefine
993 SUPPORT_FILES = list-of-support-files-for-tool-in-question
994 # Directories that might want `make proto-dir' run.
997 .PHONY: setup-dirs taz
1001 ./configure -rm sun4
1002 chmod og=u `find etc $(DEVO_SUPPORT) $(SUPPORT_FILES) -print`
1003 for d in .. $(PROTODIRS) ; do \
1004 if [ $$d != ".." ] && [ -d $$d ]; then \
1005 (cd $$d ; $(MAKE) -f Makefile.in proto-dir) ; \
1009 taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
1010 rm -rf proto-toplev; mkdir proto-toplev
1011 for d in .. $(PROTODIRS) ; do \
1012 if [ $$d != .. ]; then \
1013 if [ -d $$d ]; then \
1014 ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
1018 (cd proto-toplev; for i in $(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES); do \
1019 if [ ! -d $$i ]; then ln -s ../$$i . ; else true ; fi ; \
1021 mkdir proto-toplev/etc
1022 (cd proto-toplev/etc; for i in $(ETC_SUPPORT); do \
1023 ln -s ../../etc/$$i . ; \
1025 # Put only one copy (four hard links) of COPYING in the tar file.
1028 # Take out texinfo and glob from configurable dirs
1029 rm proto-toplev/configure.in
1030 sed -e '/^host_tools=/s/texinfo //' \
1031 -e '/^host_libs=/s/glob //' \
1032 <configure.in >proto-toplev/configure.in
1034 # Take out texinfo from a few places; make simple BISON=bison line.
1035 rm proto-toplev/Makefile.in
1036 sed -e '/^all\.normal: /s/\all-texinfo //' \
1037 -e '/^ install-texinfo /d' \
1038 -e '/^BISON = /,/^$$/d' \
1039 -e '/^# BISON:/s/.*/BISON = bison -y/' \
1040 <Makefile.in >proto-toplev/Makefile.in
1042 mkdir proto-toplev/texinfo
1043 ln -s ../../texinfo/texinfo.tex proto-toplev/texinfo/
1044 ln -s ../../texinfo/tex3patch proto-toplev/texinfo/
1045 chmod og=u `find proto-toplev -print`
1046 (VER=`sed <$(TOOL)/Makefile.in -n 's/VERSION *= *//p'`; \
1047 echo "==> Making $(TOOL)-$$VER.tar.z"; \
1048 ln -s proto-toplev $(TOOL)-$$VER; \
1049 tar cfh - $(TOOL)-$$VER \
1050 | $(GZIP) -v >$(TOOL)-$$VER.tar.z)
1052 GAS_SUPPORT_DIRS= bfd include libiberty opcodes
1055 gas.tar.z: $(DEVO_SUPPORT) $(GAS_SUPPORT_DIRS) gas texinfo/texinfo.tex
1056 $(MAKE) -f Makefile.in setup-dirs SUPPORT_FILES="$(GAS_SUPPORT_DIRS)"
1057 $(MAKE) -f Makefile.in taz SUPPORT_FILES="$(GAS_SUPPORT_DIRS)" TOOL=gas
1063 # start-sanitize-chill
1064 ## This is ugly, but I don't want GNU make to put these variables in
1065 ## the environment. Older makes will see this as a set of targets
1066 ## with no dependencies and no actions.
1067 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET :
1068 # end-sanitize-chill
1070 # end of Makefile.in