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 # We don't specify -g -O because many compilers don't support -g -O,
59 # and/or -O is broken in and of itself.
62 # start-sanitize-chill
63 CHILLFLAGS
= $(CFLAGS
)
68 # Use -O to stress test the compiler.
76 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
77 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
78 then echo $${rootme}/byacc/byacc ; \
82 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
83 then echo $${rootme}/flex/flex ; \
86 M4
= `if [ -f $${rootme}/m4/m4 ] ; \
87 then echo $${rootme}/m4/m4 ; \
90 MAKEINFO
= `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
91 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
92 else echo makeinfo ; fi`
94 # This just becomes part of the MAKEINFO definition passed down to
95 # sub-makes. It lets flags be given on the command line while still
96 # using the makeinfo from the object tree.
99 EXPECT
= `if [ -f $${rootme}/expect/expect ] ; \
100 then echo $${rootme}/expect/expect ; \
101 else echo expect ; fi`
103 RUNTEST
= `if [ -f $${srcroot}/dejagnu/runtest ] ; \
104 then echo $${srcroot}/dejagnu/runtest ; \
105 else echo runtest ; fi`
108 # libraries that may need to be augmented on a system-by-system basis
111 # compilers to use to create programs which must be run in the build
114 CXX_FOR_BUILD
= $(CXX
)
116 SUBDIRS
= "this is set via configure, don't edit this"
120 INSTALL_TARGET
= install-dirs \
122 $(INSTALL_TARGET_MODULES
) \
123 $(INSTALL_X11_MODULES
) \
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; \
137 # start-sanitize-chill
138 CHILL_FOR_TARGET
= ` \
139 if [ -f $${rootme}/gcc/Makefile ] ; then \
140 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
142 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
145 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
152 if [ -f $${rootme}/gcc/Makefile ] ; then \
153 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
155 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
158 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
163 if [ -f $${rootme}/gas/Makefile ] ; then \
164 echo $${rootme}/gas/as.new ; \
166 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
169 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
174 if [ -f $${rootme}/binutils/ar ] ; then \
175 echo $${rootme}/binutils/ar ; \
177 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
180 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
184 RANLIB_FOR_TARGET
= ` \
185 if [ -f $${rootme}/binutils/ranlib ] ; then \
186 echo $${rootme}/binutils/ranlib ; \
188 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
191 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
196 if [ -f $${rootme}/binutils/Makefile ] ; then \
197 echo $${rootme}/binutils/nm ; \
199 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
202 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
206 # FIXME: This is badly named.
208 if [ -f $${rootme}/gcc/Makefile ] ; then \
209 if [ -f $${rootme}/newlib/Makefile ] ; then \
210 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
212 echo -I$${rootme}/gcc/include ; \
218 #### host and target specific makefile fragments come in here.
221 # Flags to pass down to all sub-makes.
222 # Please keep these in alphabetical order.
223 BASE_FLAGS_TO_PASS
= \
224 "AR_FLAGS=$(AR_FLAGS)" \
225 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
226 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
228 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
229 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
231 $(start-sanitize-chill
)\
232 "CHILLFLAGS=$(CHILLFLAGS)" \
233 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
234 "CHILL_LIB=$(CHILL_LIB)" \
235 $(end-sanitize-chill
)\
236 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
237 "CXXFLAGS=$(CXXFLAGS)" \
238 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
239 "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
240 "INSTALL=$(INSTALL)" \
241 "INSTALL_DATA=$(INSTALL_DATA)" \
242 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
243 "INSTALL_XFORM=$(INSTALL_XFORM)" \
244 "LDFLAGS=$(LDFLAGS)" \
247 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
248 "MUNCH_NM=$(MUNCH_NM)" \
249 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
250 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
252 "RUNTEST=$(RUNTEST)" \
253 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
254 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
255 "exec_prefix=$(exec_prefix)" \
259 # Flags to pass down to most sub-makes, in which we're building with
260 # the host environment.
261 # If any variables are added here, they must be added to do-*, below.
271 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
273 # Flags that are concerned with the location of the X11 include files
275 X11_FLAGS_TO_PASS
= \
276 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
277 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
280 # Flags to pass down to makes which are built with the target environment.
281 # The double $ decreases the length of the command line; the variables
282 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
283 # If any variables are added here, they must be added to do-*, below.
284 EXTRA_TARGET_FLAGS
= \
285 'AR=$$(AR_FOR_TARGET)' \
286 'AS=$$(AS_FOR_TARGET)' \
287 'CC=$$(CC_FOR_TARGET)' \
288 'CXX=$$(CXX_FOR_TARGET)' \
289 'NM=$$(NM_FOR_TARGET)' \
290 'RANLIB=$$(RANLIB_FOR_TARGET)' \
291 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
293 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
295 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
296 # unfortunately needs the native compiler and the target ar and
298 # If any variables are added here, they must be added to do-*, below.
299 # The HOST_* variables are a special case, which are used for the gcc
300 # cross-building scheme.
301 HOST_CC
= $(CC_FOR_BUILD
)
303 HOST_PREFIX_1
= loser-
305 'AR=$$(AR_FOR_TARGET)' \
309 'HOST_CC=$(CC_FOR_BUILD)' \
310 'HOST_PREFIX=$(HOST_PREFIX)' \
311 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
313 'RANLIB=$$(RANLIB_FOR_TARGET)' \
316 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
318 # This is a list of the targets for all of the modules which are compiled
319 # using $(FLAGS_TO_PASS).
368 # This is a list of the check targets for all of the modules which are
369 # compiled using $(FLAGS_TO_PASS).
416 # This is a list of the install targets for all of the modules which are
417 # compiled using $(FLAGS_TO_PASS).
465 # This is a list of the targets for all of the modules which are compiled
466 # using $(X11_FLAGS_TO_PASS).
474 # This is a list of the check targets for all of the modules which are
475 # compiled using $(X11_FLAGS_TO_PASS).
476 CHECK_X11_MODULES
= \
483 # This is a list of the install targets for all the modules which are
484 # compiled using $(X11_FLAGS_TO_PASS).
485 INSTALL_X11_MODULES
= \
492 # This is a list of the targets for all of the modules which are compiled
493 # using $(TARGET_FLAGS_TO_PASS).
494 ALL_TARGET_MODULES
= \
495 $(start-sanitize-chill
) \
497 $(end-sanitize-chill
) \
503 # This is a list of the check targets for all of the modules which are
504 # compiled using $(TARGET_FLAGS_TO_PASS).
505 CHECK_TARGET_MODULES
= \
506 $(start-sanitize-chill
) \
508 $(end-sanitize-chill
) \
514 # This is a list of the install targets for all of the modules which are
515 # compiled using $(TARGET_FLAGS_TO_PASS).
516 INSTALL_TARGET_MODULES
= \
517 $(start-sanitize-chill
) \
519 $(end-sanitize-chill
) \
525 # This is a shell case of all modules which are compiled using
526 # $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
527 TARGET_LIBS
= libio | libg
++ | newlib | xiberty
528 # start-sanitize-chill
529 TARGET_LIBS
= chillrt | libio | libg
++ | newlib | xiberty
532 # The first rule in the file had better be this one. Don't put any above it.
536 # The target built for a native build.
540 $(ALL_TARGET_MODULES
) \
544 # Do a target for all the subdirectories. A ``make do-X'' will do a
545 # ``make X'' in all subdirectories (because, in general, there is a
546 # dependency (below) of X upon do-X, a ``make X'' will also do this,
547 # but it may do additional work as well).
548 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
549 # because it is so large that it can easily overflow the command line
550 # length limit on some systems.
562 @target
=`echo $@ | sed -e 's/^do-//'`; \
563 rootme
=`pwd`; export rootme
; \
564 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
565 for i in
$(SUBDIRS
); do \
566 if
[ -f .
/$$i/Makefile
]; then \
569 for flag in
$(EXTRA_TARGET_FLAGS
); do \
570 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
574 for flag in
$(EXTRA_GCC_FLAGS
); do \
575 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
579 for flag in
$(EXTRA_HOST_FLAGS
); do \
580 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
584 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
586 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
587 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
588 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
590 then true
; else exit
1; fi
; \
594 # Here are the targets which correspond to the do-X targets.
596 .PHONY
: info installcheck dvi install-info
597 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
599 installcheck: do-installcheck
602 install-info
: do-install-info
dir.
info
603 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
604 if
[ -f
dir.
info ] ; then \
605 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
609 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
612 -rm -f Makefile config.status
614 clean: do-clean local-clean
615 mostlyclean: do-mostlyclean local-clean
616 distclean: do-distclean local-clean local-distclean
617 realclean: do-realclean local-clean local-distclean
622 check: $(CHECK_MODULES
) \
623 $(CHECK_TARGET_MODULES
) \
624 $(CHECK_X11_MODULES
) \
627 # Installation targets.
629 .PHONY
: install uninstall vault-install
630 install: $(INSTALL_TARGET
)
633 @echo
"the uninstall target is not supported in this tree"
636 @if
[ -f .
/release
/vault-install
] ; then \
637 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
643 install.
all: install-no-fixedincludes
644 @if
[ -f .
/gcc
/Makefile
] ; then \
645 rootme
=`pwd` ; export rootme
; \
647 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
652 # install-no-fixedincludes is used because Cygnus can not distribute
653 # the fixed header files.
654 .PHONY
: install-no-fixedincludes
655 install-no-fixedincludes
: \
658 $(INSTALL_TARGET_MODULES
) \
659 $(INSTALL_X11_MODULES
) \
662 # Install the gcc headers files, but not the fixed include files,
663 # which Cygnus is not allowed to distribute. This rule is very
664 # dependent on the workings of the gcc Makefile.in.
665 .PHONY
: gcc-no-fixedincludes
666 gcc-no-fixedincludes
:
667 @if
[ -f .
/gcc
/Makefile
]; then \
668 rm -rf gcc
/tmp-include
; \
669 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
671 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
672 touch gcc
/stmp-fixinc gcc
/stmp-fixproto
; \
673 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
674 rootme
=`pwd`; export rootme
; \
675 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
677 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
678 rm -rf gcc
/include; \
679 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
682 # This rule is used to build the modules which use FLAGS_TO_PASS. To
683 # build a target all-X means to cd to X and make all.
684 # all-glob is handled specially because it doesn't actually build.
685 .PHONY
: $(ALL_MODULES
) all-glob
686 $(ALL_MODULES
) all-glob
:
687 @
dir=`echo $@ | sed -e 's/all-//'`; \
688 if
[ -f .
/$${dir}/Makefile
] ; then \
689 rootme
=`pwd`; export rootme
; \
690 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
691 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
696 # This rule is used to check the modules which use FLAGS_TO_PASS. To
697 # build a target check-X means to cd to X and make all.
698 .PHONY
: $(CHECK_MODULES
)
700 @
dir=`echo $@ | sed -e 's/check-//'`; \
701 if
[ -f .
/$${dir}/Makefile
] ; then \
702 rootme
=`pwd`; export rootme
; \
703 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
704 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
709 # This rule is used to install the modules which use FLAGS_TO_PASS.
710 # To build a target install-X means to cd to X and make install.
711 .PHONY
: $(INSTALL_MODULES
)
712 $(INSTALL_MODULES
): install-dirs
713 @
dir=`echo $@ | sed -e 's/install-//'`; \
714 if
[ -f .
/$${dir}/Makefile
] ; then \
715 rootme
=`pwd`; export rootme
; \
716 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
717 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
722 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
723 # To build a target all-X means to cd to X and make all.
724 .PHONY
: $(ALL_TARGET_MODULES
)
725 $(ALL_TARGET_MODULES
):
726 @
dir=`echo $@ | sed -e 's/all-//'`; \
727 if
[ -f .
/$${dir}/Makefile
] ; then \
728 rootme
=`pwd`; export rootme
; \
729 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
730 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
735 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
736 # To build a target install-X means to cd to X and make install.
737 .PHONY
: $(CHECK_TARGET_MODULES
)
738 $(CHECK_TARGET_MODULES
):
739 @
dir=`echo $@ | sed -e 's/check-//'`; \
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
) check); \
748 # This rule is used to install the modules which use
749 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
751 .PHONY
: $(INSTALL_TARGET_MODULES
)
752 $(INSTALL_TARGET_MODULES
): install-dirs
753 @
dir=`echo $@ | sed -e 's/install-//'`; \
754 if
[ -f .
/$${dir}/Makefile
] ; then \
755 rootme
=`pwd`; export rootme
; \
756 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
757 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
762 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
763 # To build a target all-X means to cd to X and make all.
764 .PHONY
: $(ALL_X11_MODULES
)
766 @
dir=`echo $@ | sed -e 's/all-//'`; \
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
) all); \
776 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
777 # To build a target check-X means to cd to X and make all.
778 .PHONY
: $(CHECK_X11_MODULES
)
779 $(CHECK_X11_MODULES
):
780 @
dir=`echo $@ | sed -e 's/check-//'`; \
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
) check); \
790 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
791 # To build a target install-X means to cd to X and make install.
792 .PHONY
: $(INSTALL_X11_MODULES
)
793 $(INSTALL_X11_MODULES
):
794 @
dir=`echo $@ | sed -e 's/install-//'`; \
795 if
[ -f .
/$${dir}/Makefile
] ; then \
796 rootme
=`pwd`; export rootme
; \
797 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
799 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
804 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
807 @if
[ -f .
/gcc
/Makefile
] ; then \
808 rootme
=`pwd`; export rootme
; \
809 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
810 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
817 @if
[ -f .
/gcc
/Makefile
] ; then \
818 rootme
=`pwd`; export rootme
; \
819 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
820 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
827 @if
[ -f .
/gcc
/Makefile
] ; then \
828 rootme
=`pwd`; export rootme
; \
829 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
830 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
835 # This is a list of inter-dependencies among modules.
838 all-binutils
: all-libiberty all-opcodes all-bfd all-flex
840 # start-sanitize-chill
841 all-chillrt
: all-binutils all-gas all-gcc all-newlib
845 all-diff
: all-libiberty
848 all-expect
: all-tcl all-tk
849 all-fileutils
: all-libiberty
851 all-flex
: all-libiberty all-byacc
852 all-gas
: all-libiberty all-opcodes all-bfd
855 all-gcc
: all-libiberty all-byacc all-binutils all-gas all-pagas
856 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-glob all-byacc all-sim
858 all-gprof
: all-libiberty all-bfd
859 all-grep
: all-libiberty
860 all-gzip
: all-libiberty
861 all-hello
: all-libiberty
863 all-ispell
: all-emacs
864 all-ld
: all-libiberty all-bfd all-byacc all-flex
865 all-libg
++: all-gas all-pagas all-ld all-gcc all-xiberty all-newlib all-libio
866 all-libio
: all-gas all-pagas all-ld all-gcc all-xiberty all-newlib
868 all-m4
: all-libiberty
869 all-make
: all-libiberty
871 all-newlib
: all-binutils all-gas all-pagas all-gcc
874 all-prms
: all-libiberty
877 all-recode
: all-libiberty
878 all-sed
: all-libiberty
879 all-send-pr
: all-prms
881 all-sim
: all-libiberty all-bfd
882 all-tar
: all-libiberty
884 all-tclX
: all-tcl all-tk
886 all-texinfo
: all-libiberty
888 all-tgas
: all-libiberty all-bfd
891 all-uudecode
: all-libiberty
892 all-xiberty
: all-gcc all-newlib
894 ### other supporting targets
903 @for i in
$(MAKEDIRS
) ; do \
904 echo Making
$$i...
; \
905 parent
=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
906 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
907 if
[ ! -d
$$i ] ; then \
908 if mkdir
$$i ; then \
919 dir.
info: do-install-info
920 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
921 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
922 mv
-f
dir.
info.new
dir.
info ; \
927 @echo
"Building a full distribution of this tree isn't done"
928 @echo
"via 'make dist'. Check out the etc/ subdirectory"
937 @for i in
$(SUBDIRS
); \
941 wd
=`basename $$pwd`; \
942 for j in
`$(MAKE) ls`; \
948 # with the gnu make, this is done automatically.
950 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
951 $(SHELL
) .
/config.status
954 # Support for building net releases
956 # Files in devo used in any net release.
957 # ChangeLog omitted because it may refer to files which are not in this
958 # distribution (perhaps it would be better to include it anyway).
959 DEVO_SUPPORT
= README Makefile.in configure configure.in \
960 config.guess config.sub config move-if-change \
961 COPYING COPYING.LIB
install.sh
963 # Files in devo/etc used in any net release.
964 # ChangeLog omitted because it may refer to files which are not in this
965 # distribution (perhaps it would be better to include it anyway).
966 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
967 configure.texi standards.texi make-stds.texi
969 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob sim
970 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
972 .PHONY
: setup-dirs-gdb gdb.
tar.gz make-gdb.
tar.gz
977 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
979 gdb.
tar.gz
: setup-dirs-gdb
980 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
981 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-testsuite.
dir)
982 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.gz
984 make-gdb.
tar.gz
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
985 rm -rf proto-toplev
; mkdir proto-toplev
986 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
987 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
990 mkdir proto-toplev
/etc
991 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
992 ln
-s ..
/..
/etc
/$$i .
; \
994 # Put only one copy (four hard links) of COPYING in the tar file.
995 rm proto-toplev
/bfd
/COPYING
996 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
997 rm proto-toplev
/include/COPYING
998 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
999 rm proto-toplev
/readline
/COPYING
1000 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1002 # Change the bug reporting address in configure to bug-gdb
1003 rm proto-toplev
/configure
1004 sed
-e
's/configure@cygnus.com/bug-gdb@prep.ai.mit.edu/' \
1005 <configure
>proto-toplev
/configure
1006 chmod a
+x proto-toplev
/configure
1008 # Take out texinfo and glob from configurable dirs
1009 rm proto-toplev
/configure.in
1010 sed
-e
'/^host_tools=/s/texinfo //' \
1011 -e
'/^host_libs=/s/glob //' \
1012 <configure.in
>proto-toplev
/configure.in
1014 # Take out texinfo from a few places; make simple BISON=bison line.
1015 rm proto-toplev
/Makefile.in
1016 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1017 -e
'/^ install-texinfo /d' \
1018 -e
'/^BISON = /,/^$$/d' \
1019 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1020 <Makefile.in
>proto-toplev
/Makefile.in
1022 mkdir proto-toplev
/texinfo
1023 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1024 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1025 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1026 chmod og
=u
`find proto-toplev -print`
1027 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1028 echo
"==> Making gdb-$$VER.tar.gz"; \
1029 rm -f gdb-
$$VER; ln
-s proto-toplev gdb-
$$VER; \
1030 tar cfh
- gdb-
$$VER \
1031 |
$(GZIP
) -v
-9 >gdb-
$$VER.
tar.gz
)
1033 # Make the testsuite archive separately.
1034 ln
-s ..
/..
/gdb
/proto-testsuite.
dir/testsuite proto-toplev
/gdb
/testsuite
1035 # Blow away the Chill test that requires a Chill compiled executable,
1036 # since GNU Chill is not yet publically available.
1037 rm -rf proto-toplev
/gdb
/testsuite
/gdb.t31
1039 # Put a copy of COPYING in the tar file.
1040 ln proto-toplev
/gdb
/COPYING proto-toplev
/gdb
/testsuite
/COPYING
1041 chmod og
=u
`find proto-toplev/gdb/testsuite -print`
1042 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1043 echo
"==> Making gdb-$$VER-testsuite.tar.gz"; \
1044 tar cfh
- gdb-
$$VER/configure gdb-
$$VER/config.guess \
1045 gdb-
$$VER/config.sub gdb-
$$VER/move-if-change \
1046 gdb-
$$VER/gdb
/testsuite \
1047 |
$(GZIP
) -v
-9 >gdb-
$$VER-testsuite.
tar.gz
)
1049 # When you use `make setup-dirs' or `make taz' you should always redefine
1051 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1052 # Directories that might want `make diststuff' run.
1053 DISTSTUFFDIRS
= ld gprof gdb libg
++ binutils
1054 # Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
1055 DISTBISONFILES
= binutils
/Makefile.in gas
/Makefile.in gdb
/Makefile.in
1056 # Directories where "info" should be built.
1057 DISTDOCDIRS
= ld gprof binutils gas bfd
1061 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1062 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1063 # Make sure "diststuff" files get built properly.
1064 for f in
$(DISTBISONFILES
) ; do \
1065 if
[ -r
$$f ]; then \
1066 sed
'/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp
; \
1070 # Take out texinfo from a few places; make simple BISON=bison line.
1071 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1072 -e
'/^ install-texinfo /d' \
1073 -e
'/^BISON = /,/^$$/d' \
1074 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1076 mv
-f tmp Makefile.in
1079 # Doc files don't change; include them in distribution.
1080 for f in
$(DISTDOCDIRS
) ; do \
1081 if
[ -r
$$f/Makefile
]; then \
1082 (cd
$$f ; $(MAKE
) info) || exit
1 ; \
1085 # Make links, and run "make diststuff" when needed.
1086 # The `echo' for setting `p' is to convert all whitespace to spaces.
1087 # Then the `case' further below should tell whether $$d is in
1089 rm -rf proto-toplev
; mkdir proto-toplev
1090 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1091 p
=" `echo $(DISTSTUFFDIRS)` " ; \
1092 for d in
$$dirs ; do \
1093 if
[ -d
$$d ]; then \
1096 echo making diststuff in
$$d ; \
1097 (cd
$$d ; pwd
; $(MAKE
) diststuff
) || exit
1 ;; \
1099 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1100 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1102 ln
-s ..
/$$d proto-toplev
/$$d ; \
1104 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1108 mkdir proto-toplev
/etc
1109 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1110 ln
-s ..
/..
/etc
/$$i .
; \
1113 # Take out texinfo and glob from configurable dirs
1114 rm proto-toplev
/configure.in
1115 sed
-e
'/^host_tools=/s/texinfo //' \
1116 -e
'/^host_libs=/s/glob //' \
1117 <configure.in
>proto-toplev
/configure.in
1119 mkdir proto-toplev
/texinfo
1120 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1121 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1122 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1123 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1124 chmod og
=u
`find . -print`
1125 (VER
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1126 echo
"==> Making $(TOOL)-$$VER.tar.gz"; \
1127 rm -f
$(TOOL
)-$$VER; ln
-s proto-toplev
$(TOOL
)-$$VER; \
1128 tar cfh
- $(TOOL
)-$$VER \
1129 |
$(GZIP
) -v
-9 >$(TOOL
)-$$VER.
tar.gz
)
1131 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1132 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1135 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes
1136 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1137 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1138 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1140 # The FSF "binutils" release includes gprof and ld.
1141 .PHONY
: binutils.
tar.gz
1142 BINUTILS_SUPPORT_DIRS
= bfd
include libiberty opcodes
ld gprof
1143 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1144 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1145 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS)"
1147 .PHONY
: gas
+binutils.
tar.gz
1148 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1149 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1150 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1151 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS)"
1153 .PHONY
: libg
++.
tar.gz
1154 LIBGXX_SUPPORT_DIRS
=include libio libiberty xiberty
1155 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1156 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1157 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1162 # start-sanitize-chill
1163 ## This is ugly, but I don't want GNU make to put these variables in
1164 ## the environment. Older makes will see this as a set of targets
1165 ## with no dependencies and no actions.
1166 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1167 # end-sanitize-chill
1169 # end of Makefile.in