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
27 tooldir
= $(exec_prefix)/$(target
)
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
48 INSTALL
= $${srcroot}/install.sh
-c
49 INSTALL_PROGRAM
= $(INSTALL
)
50 INSTALL_DATA
= $(INSTALL
)
51 INSTALL_XFORM
= $(INSTALL
) -t
='$(program_transform_name)'
58 # start-sanitize-chill
59 CHILLFLAGS
= $(CFLAGS
)
69 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
70 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
71 then echo $${rootme}/byacc/byacc ; \
75 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
76 then echo $${rootme}/flex/flex ; \
79 M4
= `if [ -f $${rootme}/m4/m4 ] ; \
80 then echo $${rootme}/m4/m4 ; \
83 MAKEINFO
= `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
84 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
85 else echo makeinfo ; fi`
86 # This just becomes part of the MAKEINFO definition passed down to
87 # sub-makes. It lets flags be given on the command line while still
88 # using the makeinfo from the object tree.
91 EXPECT
= `if [ -f $${rootme}/expect/expect ] ; \
92 then echo $${rootme}/expect/expect ; \
93 else echo expect ; fi`
95 RUNTEST
= `if [ -f $${srcroot}/dejagnu/runtest ] ; \
96 then echo $${srcroot}/dejagnu/runtest ; \
97 else echo runtest ; fi`
100 # libraries that may need to be augmented on a system-by-system basis
103 # compilers to use to create programs which must be run in the build
106 CXX_FOR_BUILD
= $(CXX
)
108 SUBDIRS
= "this is set via configure, don't edit this"
112 INSTALL_TARGET
= install-dirs \
114 $(INSTALL_TARGET_MODULES
) \
115 $(INSTALL_X11_MODULES
) \
119 if [ -f $${rootme}/gcc/Makefile ] ; then \
120 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
122 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
125 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
129 # start-sanitize-chill
130 CHILL_FOR_TARGET
= ` \
131 if [ -f $${rootme}/gcc/Makefile ] ; then \
132 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
134 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
137 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
144 if [ -f $${rootme}/gcc/Makefile ] ; then \
145 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
147 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
150 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
155 if [ -f $${rootme}/gas/Makefile ] ; then \
156 echo $${rootme}/gas/as.new ; \
158 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
161 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
166 if [ -f $${rootme}/binutils/ar ] ; then \
167 echo $${rootme}/binutils/ar ; \
169 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
172 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
176 RANLIB_FOR_TARGET
= ` \
177 if [ -f $${rootme}/binutils/ranlib ] ; then \
178 echo $${rootme}/binutils/ranlib ; \
180 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
183 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
188 if [ -f $${rootme}/binutils/Makefile ] ; then \
189 echo $${rootme}/binutils/nm ; \
191 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
194 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
198 # FIXME: This is badly named.
200 if [ -f $${rootme}/gcc/Makefile ] ; then \
201 if [ -f $${rootme}/newlib/Makefile ] ; then \
202 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
204 echo -I$${rootme}/gcc/include ; \
210 #### host and target specific makefile fragments come in here.
213 # Flags to pass down to all sub-makes.
214 # Please keep these in alphabetical order.
215 BASE_FLAGS_TO_PASS
= \
216 "AR_FLAGS=$(AR_FLAGS)" \
217 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
218 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
220 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
221 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
223 $(start-sanitize-chill
)\
224 "CHILLFLAGS=$(CHILLFLAGS)" \
225 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
226 "CHILL_LIB=$(CHILL_LIB)" \
227 $(end-sanitize-chill
)\
228 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
229 "CXXFLAGS=$(CXXFLAGS)" \
230 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
231 "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
232 "INSTALL=$(INSTALL)" \
233 "INSTALL_DATA=$(INSTALL_DATA)" \
234 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
235 "INSTALL_XFORM=$(INSTALL_XFORM)" \
236 "LDFLAGS=$(LDFLAGS)" \
239 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
240 "MUNCH_NM=$(MUNCH_NM)" \
241 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
242 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
244 "RUNTEST=$(RUNTEST)" \
245 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
246 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
247 "exec_prefix=$(exec_prefix)" \
251 # Flags to pass down to most sub-makes, in which we're building with
252 # the host environment.
253 # If any variables are added here, they must be added to do-*, below.
263 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
265 # Flags that are concerned with the location of the X11 include files
267 X11_FLAGS_TO_PASS
= \
268 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
269 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
272 # Flags to pass down to makes which are built with the target environment.
273 # The double $ decreases the length of the command line; the variables
274 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
275 # If any variables are added here, they must be added to do-*, below.
276 EXTRA_TARGET_FLAGS
= \
277 'AR=$$(AR_FOR_TARGET)' \
278 'AS=$$(AS_FOR_TARGET)' \
279 'CC=$$(CC_FOR_TARGET)' \
280 'CXX=$$(CXX_FOR_TARGET)' \
281 'NM=$$(NM_FOR_TARGET)' \
282 'RANLIB=$$(RANLIB_FOR_TARGET)' \
283 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
285 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
287 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
288 # unfortunately needs the native compiler and the target ar and
290 # If any variables are added here, they must be added to do-*, below.
291 # The HOST_* variables are a special case, which are used for the gcc
292 # cross-building scheme.
293 HOST_CC
= $(CC_FOR_BUILD
)
295 HOST_PREFIX_1
= loser-
297 'AR=$$(AR_FOR_TARGET)' \
301 'HOST_CC=$(CC_FOR_BUILD)' \
302 'HOST_PREFIX=$(HOST_PREFIX)' \
303 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
305 'RANLIB=$$(RANLIB_FOR_TARGET)' \
308 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
310 # This is a list of the targets for all of the modules which are compiled
311 # using $(FLAGS_TO_PASS).
360 # This is a list of the check targets for all of the modules which are
361 # compiled using $(FLAGS_TO_PASS).
408 # This is a list of the install targets for all of the modules which are
409 # compiled using $(FLAGS_TO_PASS).
457 # This is a list of the targets for all of the modules which are compiled
458 # using $(X11_FLAGS_TO_PASS).
466 # This is a list of the check targets for all of the modules which are
467 # compiled using $(X11_FLAGS_TO_PASS).
468 CHECK_X11_MODULES
= \
475 # This is a list of the install targets for all the modules which are
476 # compiled using $(X11_FLAGS_TO_PASS).
477 INSTALL_X11_MODULES
= \
484 # This is a list of the targets for all of the modules which are compiled
485 # using $(TARGET_FLAGS_TO_PASS).
486 ALL_TARGET_MODULES
= \
487 $(start-sanitize-chill
) \
489 $(end-sanitize-chill
) \
495 # This is a list of the check targets for all of the modules which are
496 # compiled using $(TARGET_FLAGS_TO_PASS).
497 CHECK_TARGET_MODULES
= \
498 $(start-sanitize-chill
) \
500 $(end-sanitize-chill
) \
506 # This is a list of the install targets for all of the modules which are
507 # compiled using $(TARGET_FLAGS_TO_PASS).
508 INSTALL_TARGET_MODULES
= \
509 $(start-sanitize-chill
) \
511 $(end-sanitize-chill
) \
517 # This is a shell case of all modules which are compiled using
518 # $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
519 TARGET_LIBS
= libio | libg
++ | newlib | xiberty
520 # start-sanitize-chill
521 TARGET_LIBS
= chillrt | libio | libg
++ | newlib | xiberty
524 # The first rule in the file had better be this one. Don't put any above it.
528 # The target built for a native build.
532 $(ALL_TARGET_MODULES
) \
536 # Do a target for all the subdirectories. A ``make do-X'' will do a
537 # ``make X'' in all subdirectories (because, in general, there is a
538 # dependency (below) of X upon do-X, a ``make X'' will also do this,
539 # but it may do additional work as well).
540 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
541 # because it is so large that it can easily overflow the command line
542 # length limit on some systems.
554 @target
=`echo $@ | sed -e 's/^do-//'`; \
555 rootme
=`pwd`; export rootme
; \
556 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
557 for i in
$(SUBDIRS
); do \
558 if
[ -f .
/$$i/Makefile
]; then \
561 for flag in
$(EXTRA_TARGET_FLAGS
); do \
562 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
566 for flag in
$(EXTRA_GCC_FLAGS
); do \
567 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
571 for flag in
$(EXTRA_HOST_FLAGS
); do \
572 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
576 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
578 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
579 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
580 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
582 then true
; else exit
1; fi
; \
586 # Here are the targets which correspond to the do-X targets.
588 .PHONY
: info installcheck dvi install-info
589 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
591 installcheck: do-installcheck
594 install-info
: do-install-info
dir.
info
595 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
596 if
[ -f
dir.
info ] ; then \
597 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
601 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
604 -rm -f Makefile config.status
606 clean: do-clean local-clean
607 mostlyclean: do-mostlyclean local-clean
608 distclean: do-distclean local-clean local-distclean
609 realclean: do-realclean local-clean local-distclean
614 check: $(CHECK_MODULES
) \
615 $(CHECK_TARGET_MODULES
) \
616 $(CHECK_X11_MODULES
) \
619 # Installation targets.
621 .PHONY
: install uninstall vault-install
622 install: $(INSTALL_TARGET
)
625 @echo
"the uninstall target is not supported in this tree"
628 @if
[ -f .
/release
/vault-install
] ; then \
629 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
635 install.
all: install-no-fixedincludes
636 @if
[ -f .
/gcc
/Makefile
] ; then \
637 rootme
=`pwd` ; export rootme
; \
639 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
644 # install-no-fixedincludes is used because Cygnus can not distribute
645 # the fixed header files.
646 .PHONY
: install-no-fixedincludes
647 install-no-fixedincludes
: \
650 $(INSTALL_TARGET_MODULES
) \
651 $(INSTALL_X11_MODULES
) \
654 # Install the gcc headers files, but not the fixed include files,
655 # which Cygnus is not allowed to distribute. This rule is very
656 # dependent on the workings of the gcc Makefile.in.
657 .PHONY
: gcc-no-fixedincludes
658 gcc-no-fixedincludes
:
659 @if
[ -f .
/gcc
/Makefile
]; then \
660 rm -rf gcc
/tmp-include
; \
661 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
663 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
664 touch gcc
/stmp-fixinc gcc
/stmp-fixproto
; \
665 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
666 rootme
=`pwd`; export rootme
; \
667 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
669 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
670 rm -rf gcc
/include; \
671 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
674 # This rule is used to build the modules which use FLAGS_TO_PASS. To
675 # build a target all-X means to cd to X and make all.
676 # all-glob is handled specially because it doesn't actually build.
677 .PHONY
: $(ALL_MODULES
) all-glob
678 $(ALL_MODULES
) all-glob
:
679 @
dir=`echo $@ | sed -e 's/all-//'`; \
680 if
[ -f .
/$${dir}/Makefile
] ; then \
681 rootme
=`pwd`; export rootme
; \
682 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
683 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
688 # This rule is used to check the modules which use FLAGS_TO_PASS. To
689 # build a target check-X means to cd to X and make all.
690 .PHONY
: $(CHECK_MODULES
)
692 @
dir=`echo $@ | sed -e 's/check-//'`; \
693 if
[ -f .
/$${dir}/Makefile
] ; then \
694 rootme
=`pwd`; export rootme
; \
695 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
696 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
701 # This rule is used to install the modules which use FLAGS_TO_PASS.
702 # To build a target install-X means to cd to X and make install.
703 .PHONY
: $(INSTALL_MODULES
)
704 $(INSTALL_MODULES
): install-dirs
705 @
dir=`echo $@ | sed -e 's/install-//'`; \
706 if
[ -f .
/$${dir}/Makefile
] ; then \
707 rootme
=`pwd`; export rootme
; \
708 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
709 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
714 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
715 # To build a target all-X means to cd to X and make all.
716 .PHONY
: $(ALL_TARGET_MODULES
)
717 $(ALL_TARGET_MODULES
):
718 @
dir=`echo $@ | sed -e 's/all-//'`; \
719 if
[ -f .
/$${dir}/Makefile
] ; then \
720 rootme
=`pwd`; export rootme
; \
721 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
722 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
727 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
728 # To build a target install-X means to cd to X and make install.
729 .PHONY
: $(CHECK_TARGET_MODULES
)
730 $(CHECK_TARGET_MODULES
):
731 @
dir=`echo $@ | sed -e 's/check-//'`; \
732 if
[ -f .
/$${dir}/Makefile
] ; then \
733 rootme
=`pwd`; export rootme
; \
734 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
735 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check); \
740 # This rule is used to install the modules which use
741 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
743 .PHONY
: $(INSTALL_TARGET_MODULES
)
744 $(INSTALL_TARGET_MODULES
): install-dirs
745 @
dir=`echo $@ | sed -e 's/install-//'`; \
746 if
[ -f .
/$${dir}/Makefile
] ; then \
747 rootme
=`pwd`; export rootme
; \
748 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
749 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
754 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
755 # To build a target all-X means to cd to X and make all.
756 .PHONY
: $(ALL_X11_MODULES
)
758 @
dir=`echo $@ | sed -e 's/all-//'`; \
759 if
[ -f .
/$${dir}/Makefile
] ; then \
760 rootme
=`pwd`; export rootme
; \
761 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
763 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
768 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
769 # To build a target check-X means to cd to X and make all.
770 .PHONY
: $(CHECK_X11_MODULES
)
771 $(CHECK_X11_MODULES
):
772 @
dir=`echo $@ | sed -e 's/check-//'`; \
773 if
[ -f .
/$${dir}/Makefile
] ; then \
774 rootme
=`pwd`; export rootme
; \
775 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
777 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
782 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
783 # To build a target install-X means to cd to X and make install.
784 .PHONY
: $(INSTALL_X11_MODULES
)
785 $(INSTALL_X11_MODULES
):
786 @
dir=`echo $@ | sed -e 's/install-//'`; \
787 if
[ -f .
/$${dir}/Makefile
] ; then \
788 rootme
=`pwd`; export rootme
; \
789 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
791 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
796 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
799 @if
[ -f .
/gcc
/Makefile
] ; then \
800 rootme
=`pwd`; export rootme
; \
801 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
802 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
809 @if
[ -f .
/gcc
/Makefile
] ; then \
810 rootme
=`pwd`; export rootme
; \
811 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
812 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
819 @if
[ -f .
/gcc
/Makefile
] ; then \
820 rootme
=`pwd`; export rootme
; \
821 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
822 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
827 # This is a list of inter-dependencies among modules.
830 all-binutils
: all-libiberty all-opcodes all-bfd all-flex
832 # start-sanitize-chill
833 all-chillrt
: all-binutils all-gas all-gcc all-newlib
837 all-diff
: all-libiberty
840 all-expect
: all-tcl all-tk
841 all-fileutils
: all-libiberty
843 all-flex
: all-libiberty all-byacc
844 all-gas
: all-libiberty all-opcodes all-bfd
847 all-gcc
: all-libiberty all-byacc all-binutils all-gas all-pagas
848 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-glob all-byacc all-sim
850 all-gprof
: all-libiberty all-bfd
851 all-grep
: all-libiberty
852 all-gzip
: all-libiberty
853 all-hello
: all-libiberty
855 all-ispell
: all-emacs
856 all-ld
: all-libiberty all-bfd all-byacc all-flex
857 all-libg
++: all-gas all-pagas all-ld all-gcc all-xiberty all-newlib all-libio
858 all-libio
: all-gas all-pagas all-ld all-gcc all-xiberty all-newlib
860 all-m4
: all-libiberty
861 all-make
: all-libiberty
863 all-newlib
: all-binutils all-gas all-pagas all-gcc
866 all-prms
: all-libiberty
869 all-recode
: all-libiberty
870 all-sed
: all-libiberty
871 all-send-pr
: all-prms
873 all-sim
: all-libiberty all-bfd
874 all-tar
: all-libiberty
876 all-tclX
: all-tcl all-tk
878 all-texinfo
: all-libiberty
880 all-tgas
: all-libiberty all-bfd
883 all-uudecode
: all-libiberty
884 all-xiberty
: all-gcc all-newlib
886 ### other supporting targets
895 @for i in
$(MAKEDIRS
) ; do \
896 echo Making
$$i...
; \
897 parent
=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
898 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
899 if
[ ! -d
$$i ] ; then \
900 if mkdir
$$i ; then \
911 dir.
info: do-install-info
912 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
913 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
914 mv
-f
dir.
info.new
dir.
info ; \
919 @echo
"Building a full distribution of this tree isn't done"
920 @echo
"via 'make dist'. Check out the etc/ subdirectory"
929 @for i in
$(SUBDIRS
); \
933 wd
=`basename $$pwd`; \
934 for j in
`$(MAKE) ls`; \
940 # with the gnu make, this is done automatically.
942 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
943 $(SHELL
) .
/config.status
946 # Support for building net releases
948 # Files in devo used in any net release.
949 # ChangeLog omitted because it may refer to files which are not in this
950 # distribution (perhaps it would be better to include it anyway).
951 DEVO_SUPPORT
= README Makefile.in configure configure.in \
952 config.guess config.sub config move-if-change \
953 COPYING COPYING.LIB
install.sh
955 # Files in devo/etc used in any net release.
956 # ChangeLog omitted because it may refer to files which are not in this
957 # distribution (perhaps it would be better to include it anyway).
958 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
959 configure.texi standards.texi make-stds.texi
961 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob sim
962 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
964 .PHONY
: setup-dirs-gdb gdb.
tar.gz make-gdb.
tar.gz
969 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
971 gdb.
tar.gz
: setup-dirs-gdb
972 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
973 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-testsuite.
dir)
974 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.gz
976 make-gdb.
tar.gz
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
977 rm -rf proto-toplev
; mkdir proto-toplev
978 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
979 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
982 mkdir proto-toplev
/etc
983 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
984 ln
-s ..
/..
/etc
/$$i .
; \
986 # Put only one copy (four hard links) of COPYING in the tar file.
987 rm proto-toplev
/bfd
/COPYING
988 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
989 rm proto-toplev
/include/COPYING
990 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
991 rm proto-toplev
/readline
/COPYING
992 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
994 # Change the bug reporting address in configure to bug-gdb
995 rm proto-toplev
/configure
996 sed
-e
's/configure@cygnus.com/bug-gdb@prep.ai.mit.edu/' \
997 <configure
>proto-toplev
/configure
998 chmod a
+x proto-toplev
/configure
1000 # Take out texinfo and glob from configurable dirs
1001 rm proto-toplev
/configure.in
1002 sed
-e
'/^host_tools=/s/texinfo //' \
1003 -e
'/^host_libs=/s/glob //' \
1004 <configure.in
>proto-toplev
/configure.in
1006 # Take out texinfo from a few places; make simple BISON=bison line.
1007 rm proto-toplev
/Makefile.in
1008 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1009 -e
'/^ install-texinfo /d' \
1010 -e
'/^BISON = /,/^$$/d' \
1011 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1012 <Makefile.in
>proto-toplev
/Makefile.in
1014 mkdir proto-toplev
/texinfo
1015 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1016 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1017 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1018 chmod og
=u
`find proto-toplev -print`
1019 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1020 echo
"==> Making gdb-$$VER.tar.gz"; \
1021 rm -f gdb-
$$VER; ln
-s proto-toplev gdb-
$$VER; \
1022 tar cfh
- gdb-
$$VER \
1023 |
$(GZIP
) -v
-9 >gdb-
$$VER.
tar.gz
)
1025 # Make the testsuite archive separately.
1026 ln
-s ..
/..
/gdb
/proto-testsuite.
dir/testsuite proto-toplev
/gdb
/testsuite
1027 # Blow away the Chill test that requires a Chill compiled executable,
1028 # since GNU Chill is not yet publically available.
1029 rm -rf proto-toplev
/gdb
/testsuite
/gdb.t31
1031 # Put a copy of COPYING in the tar file.
1032 ln proto-toplev
/gdb
/COPYING proto-toplev
/gdb
/testsuite
/COPYING
1033 chmod og
=u
`find proto-toplev/gdb/testsuite -print`
1034 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1035 echo
"==> Making gdb-$$VER-testsuite.tar.gz"; \
1036 tar cfh
- gdb-
$$VER/configure gdb-
$$VER/config.guess \
1037 gdb-
$$VER/config.sub gdb-
$$VER/move-if-change \
1038 gdb-
$$VER/gdb
/testsuite \
1039 |
$(GZIP
) -v
-9 >gdb-
$$VER-testsuite.
tar.gz
)
1041 # When you use `make setup-dirs' or `make taz' you should always redefine
1043 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1044 # Directories that might want `make diststuff' run.
1045 DISTSTUFFDIRS
= ld gprof gdb libg
++ binutils
1046 # Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
1047 DISTBISONFILES
= binutils
/Makefile.in gas
/Makefile.in gdb
/Makefile.in
1051 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex texinfo
/gpl.texinfo
1052 # Do this first so "diststuff" files get built properly.
1053 for f in
$(DISTBISONFILES
) ; do \
1054 if
[ -r
$$f ]; then \
1055 sed
'/^BISON *=.*$/s/.*/BISON = bison -y/' <$$f >tmp
; \
1061 # Make links, and run "make diststuff" when needed.
1062 # The `echo' for setting `p' is to convert all whitespace to spaces.
1063 # Then the `case' further below should tell whether $$d is in
1065 rm -rf proto-toplev
; mkdir proto-toplev
1066 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1067 p
=" `echo $(DISTSTUFFDIRS)` " ; \
1068 for d in
$$dirs ; do \
1069 if
[ -d
$$d ]; then \
1072 echo making diststuff in
$$d ; \
1073 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ;; \
1075 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1076 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1078 ln
-s ..
/$$d proto-toplev
/$$d ; \
1080 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1084 mkdir proto-toplev
/etc
1085 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1086 ln
-s ..
/..
/etc
/$$i .
; \
1089 # Take out texinfo and glob from configurable dirs
1090 rm proto-toplev
/configure.in
1091 sed
-e
'/^host_tools=/s/texinfo //' \
1092 -e
'/^host_libs=/s/glob //' \
1093 <configure.in
>proto-toplev
/configure.in
1095 # Take out texinfo from a few places; make simple BISON=bison line.
1096 rm proto-toplev
/Makefile.in
1097 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1098 -e
'/^ install-texinfo /d' \
1099 -e
'/^BISON = /,/^$$/d' \
1100 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1101 <Makefile.in
>proto-toplev
/Makefile.in
1103 mkdir proto-toplev
/texinfo
1104 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1105 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1106 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1107 chmod og
=u
`find . -print`
1108 (VER
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1109 echo
"==> Making $(TOOL)-$$VER.tar.gz"; \
1110 rm -f
$(TOOL
)-$$VER; ln
-s proto-toplev
$(TOOL
)-$$VER; \
1111 tar cfh
- $(TOOL
)-$$VER \
1112 |
$(GZIP
) -v
-9 >$(TOOL
)-$$VER.
tar.gz
)
1114 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo
1115 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1118 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes
1119 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1120 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)" TOOL
=gas
1122 # The FSF "binutils" release includes gprof and ld.
1123 .PHONY
: binutils.
tar.gz
1124 BINUTILS_SUPPORT_DIRS
= bfd
include libiberty opcodes
ld gprof
1125 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1126 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS)" TOOL
=binutils
1128 .PHONY
: gas
+binutils.
tar.gz
1129 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1130 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1131 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(GASB_SUPPORT_DIRS)" TOOL
=gas
1133 .PHONY
: libg
++.
tar.gz
1134 LIBGXX_SUPPORT_DIRS
=include libio libiberty xiberty
1135 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1136 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)" TOOL
=libg
++
1141 # start-sanitize-chill
1142 ## This is ugly, but I don't want GNU make to put these variables in
1143 ## the environment. Older makes will see this as a set of targets
1144 ## with no dependencies and no actions.
1145 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1146 # end-sanitize-chill
1148 # end of Makefile.in