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 MAKEINFO
= `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
80 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
81 else echo makeinfo ; fi`
82 # This just becomes part of the MAKEINFO definition passed down to
83 # sub-makes. It lets flags be given on the command line while still
84 # using the makeinfo from the object tree.
87 EXPECT
= `if [ -f $${rootme}/expect/expect ] ; \
88 then echo $${rootme}/expect/expect ; \
89 else echo expect ; fi`
91 RUNTEST
= `if [ -f $${srcroot}/dejagnu/runtest ] ; \
92 then echo $${srcroot}/dejagnu/runtest ; \
93 else echo runtest ; fi`
96 # libraries that may need to be augmented on a system-by-system basis
99 # compilers to use to create programs which must be run in the build
102 CXX_FOR_BUILD
= $(CXX
)
104 SUBDIRS
= "this is set via configure, don't edit this"
108 INSTALL_TARGET
= install-dirs \
110 $(INSTALL_TARGET_MODULES
) \
111 $(INSTALL_X11_MODULES
) \
115 if [ -f $${rootme}/gcc/Makefile ] ; then \
116 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
118 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
121 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
125 # start-sanitize-chill
126 CHILL_FOR_TARGET
= ` \
127 if [ -f $${rootme}/gcc/Makefile ] ; then \
128 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
130 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
133 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
140 if [ -f $${rootme}/gcc/Makefile ] ; then \
141 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
143 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
146 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
151 if [ -f $${rootme}/gas/Makefile ] ; then \
152 echo $${rootme}/gas/as.new ; \
154 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
157 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
162 if [ -f $${rootme}/binutils/Makefile ] ; then \
163 echo $${rootme}/binutils/ar ; \
165 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
168 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
172 RANLIB_FOR_TARGET
= ` \
173 if [ -f $${rootme}/binutils/Makefile ] ; then \
174 echo $${rootme}/binutils/ranlib ; \
176 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
179 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
184 if [ -f $${rootme}/binutils/Makefile ] ; then \
185 echo $${rootme}/binutils/nm ; \
187 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
190 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
194 # FIXME: This is badly named.
196 if [ -f $${rootme}/gcc/Makefile ] ; then \
197 if [ -f $${rootme}/newlib/Makefile ] ; then \
198 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
200 echo -I$${rootme}/gcc/include ; \
208 #### host and target specific makefile fragments come in here.
211 # Flags to pass down to all sub-makes.
212 # Please keep these in alphabetical order.
213 BASE_FLAGS_TO_PASS
= \
214 "AR_FLAGS=$(AR_FLAGS)" \
215 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
216 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
218 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
219 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
221 $(start-sanitize-chill
)\
222 "CHILLFLAGS=$(CHILLFLAGS)" \
223 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
224 "CHILL_LIB=$(CHILL_LIB)" \
225 $(end-sanitize-chill
)\
226 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
227 "CXXFLAGS=$(CXXFLAGS)" \
228 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
229 "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
230 "INSTALL=$(INSTALL)" \
231 "INSTALL_DATA=$(INSTALL_DATA)" \
232 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
233 "INSTALL_XFORM=$(INSTALL_XFORM)" \
234 "LDFLAGS=$(LDFLAGS)" \
236 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
237 "MUNCH_NM=$(MUNCH_NM)" \
238 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
240 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
242 "RUNTEST=$(RUNTEST)" \
243 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
244 "XTRAFLAGS_FOR_TARGET=$(XTRAFLAGS)" \
245 "exec_prefix=$(exec_prefix)" \
249 # Flags to pass down to most sub-makes, in which we're building with
250 # the host environment.
251 # If any variables are added here, they must be added to do-*, below.
261 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
263 # Flags that are concerned with the location of the X11 include files
265 X11_FLAGS_TO_PASS
= \
266 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
267 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
270 # Flags to pass down to makes which are built with the target environment.
271 # The double $ decreases the length of the command line; the variables
272 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
273 # If any variables are added here, they must be added to do-*, below.
274 EXTRA_TARGET_FLAGS
= \
275 'AR=$$(AR_FOR_TARGET)' \
276 'AS=$$(AS_FOR_TARGET)' \
277 'CC=$$(CC_FOR_TARGET)' \
278 'CXX=$$(CXX_FOR_TARGET)' \
279 'NM=$$(NM_FOR_TARGET)' \
280 'RANLIB=$$(RANLIB_FOR_TARGET)' \
281 'XTRAFLAGS=$$(XTRAFLAGS_FOR_TARGET)'
283 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
285 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
286 # unfortunately needs the native compiler and the target ar and
288 # If any variables are added here, they must be added to do-*, below.
289 # The HOST_* variables are a special case, which are used for the gcc
290 # cross-building scheme.
291 HOST_CC
= $(CC_FOR_BUILD
)
293 HOST_PREFIX_1
= loser-
295 'AR=$$(AR_FOR_TARGET)' \
299 'HOST_CC=$(CC_FOR_BUILD)' \
300 'HOST_PREFIX=$(HOST_PREFIX)' \
301 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
303 'RANLIB=$$(RANLIB_FOR_TARGET)' \
306 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
308 # This is a list of the targets for all of the modules which are compiled
309 # using $(FLAGS_TO_PASS).
357 # This is a list of the check targets for all of the modules which are
358 # compiled using $(FLAGS_TO_PASS).
404 # This is a list of the install targets for all of the modules which are
405 # compiled using $(FLAGS_TO_PASS).
452 # This is a list of the targets for all of the modules which are compiled
453 # using $(X11_FLAGS_TO_PASS).
460 # This is a list of the check targets for all of the modules which are
461 # compiled using $(X11_FLAGS_TO_PASS).
462 CHECK_X11_MODULES
= \
468 # This is a list of the install targets for all the modules which are
469 # compiled using $(X11_FLAGS_TO_PASS).
470 INSTALL_X11_MODULES
= \
476 # This is a list of the targets for all of the modules which are compiled
477 # using $(TARGET_FLAGS_TO_PASS).
478 ALL_TARGET_MODULES
= \
479 $(start-sanitize-chill
) \
481 $(end-sanitize-chill
) \
487 # This is a list of the check targets for all of the modules which are
488 # compiled using $(TARGET_FLAGS_TO_PASS).
489 CHECK_TARGET_MODULES
= \
490 $(start-sanitize-chill
) \
492 $(end-sanitize-chill
) \
498 # This is a list of the install targets for all of the modules which are
499 # compiled using $(TARGET_FLAGS_TO_PASS).
500 INSTALL_TARGET_MODULES
= \
501 $(start-sanitize-chill
) \
503 $(end-sanitize-chill
) \
509 # This is a shell case of all modules which are compiled using
510 # $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
511 TARGET_LIBS
= libio | libg
++ | newlib | xiberty
512 # start-sanitize-chill
513 TARGET_LIBS
= chillrt | libio | libg
++ | newlib | xiberty
516 # The first rule in the file had better be this one. Don't put any above it.
520 # The target built for a native build.
524 $(ALL_TARGET_MODULES
) \
528 # Do a target for all the subdirectories. A ``make do-X'' will do a
529 # ``make X'' in all subdirectories (because, in general, there is a
530 # dependency (below) of X upon do-X, a ``make X'' will also do this,
531 # but it may do additional work as well).
532 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
533 # because it is so large that it can easily overflow the command line
534 # length limit on some systems.
546 @target
=`echo $@ | sed -e 's/^do-//'`; \
547 rootme
=`pwd`; export rootme
; \
548 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
549 for i in
$(SUBDIRS
); do \
550 if
[ -f .
/$$i/Makefile
]; then \
553 for flag in
$(EXTRA_TARGET_FLAGS
); do \
554 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
558 for flag in
$(EXTRA_GCC_FLAGS
); do \
559 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
563 for flag in
$(EXTRA_HOST_FLAGS
); do \
564 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
568 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
570 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
571 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
572 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
574 then true
; else exit
1; fi
; \
578 # Here are the targets which correspond to the do-X targets.
580 .PHONY
: info installcheck dvi install-info
581 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
583 installcheck: do-installcheck
586 install-info
: do-install-info
dir.
info
587 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
588 if
[ -f
dir.
info ] ; then \
589 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
593 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
596 -rm -f Makefile config.status
598 clean: do-clean local-clean
599 mostlyclean: do-mostlyclean local-clean
600 distclean: do-distclean local-clean local-distclean
601 realclean: do-realclean local-clean local-distclean
606 check: $(CHECK_MODULES
) \
607 $(CHECK_TARGET_MODULES
) \
608 $(CHECK_X11_MODULES
) \
611 # Installation targets.
613 .PHONY
: install uninstall vault-install
614 install: $(INSTALL_TARGET
)
617 @echo
"the uninstall target is not supported in this tree"
620 @if
[ -f .
/release
/vault-install
] ; then \
621 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
627 install.
all: install-no-fixedincludes
628 @if
[ -f .
/gcc
/Makefile
] ; then \
629 rootme
=`pwd` ; export rootme
; \
631 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
636 # install-no-fixedincludes is used because Cygnus can not distribute
637 # the fixed header files.
638 .PHONY
: install-no-fixedincludes
639 install-no-fixedincludes
: \
642 $(INSTALL_TARGET_MODULES
) \
643 $(INSTALL_X11_MODULES
) \
646 # Install the gcc headers files, but not the fixed include files,
647 # which Cygnus is not allowed to distribute. This rule is very
648 # dependent on the workings of the gcc Makefile.in.
649 .PHONY
: gcc-no-fixedincludes
650 gcc-no-fixedincludes
:
651 @if
[ -f .
/gcc
/Makefile
]; then \
652 rm -rf gcc
/tmp-include
; \
653 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
655 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
656 touch gcc
/stmp-fixinc
; \
657 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
658 rootme
=`pwd`; export rootme
; \
659 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
661 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
662 rm -rf gcc
/include; \
663 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
666 # This rule is used to build the modules which use FLAGS_TO_PASS. To
667 # build a target all-X means to cd to X and make all.
668 # all-glob is handled specially because it doesn't actually build.
669 .PHONY
: $(ALL_MODULES
) all-glob
670 $(ALL_MODULES
) all-glob
:
671 @
dir=`echo $@ | sed -e 's/all-//'`; \
672 if
[ -f .
/$${dir}/Makefile
] ; then \
673 rootme
=`pwd`; export rootme
; \
674 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
675 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
680 # This rule is used to check the modules which use FLAGS_TO_PASS. To
681 # build a target check-X means to cd to X and make all.
682 .PHONY
: $(CHECK_MODULES
)
684 @
dir=`echo $@ | sed -e 's/check-//'`; \
685 if
[ -f .
/$${dir}/Makefile
] ; then \
686 rootme
=`pwd`; export rootme
; \
687 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
688 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
693 # This rule is used to install the modules which use FLAGS_TO_PASS.
694 # To build a target install-X means to cd to X and make install.
695 .PHONY
: $(INSTALL_MODULES
)
696 $(INSTALL_MODULES
): install-dirs
697 @
dir=`echo $@ | sed -e 's/install-//'`; \
698 if
[ -f .
/$${dir}/Makefile
] ; then \
699 rootme
=`pwd`; export rootme
; \
700 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
701 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
706 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
707 # To build a target all-X means to cd to X and make all.
708 .PHONY
: $(ALL_TARGET_MODULES
)
709 $(ALL_TARGET_MODULES
):
710 @
dir=`echo $@ | sed -e 's/all-//'`; \
711 if
[ -f .
/$${dir}/Makefile
] ; then \
712 rootme
=`pwd`; export rootme
; \
713 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
714 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
719 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
720 # To build a target install-X means to cd to X and make install.
721 .PHONY
: $(CHECK_TARGET_MODULES
)
722 $(CHECK_TARGET_MODULES
):
723 @
dir=`echo $@ | sed -e 's/check-//'`; \
724 if
[ -f .
/$${dir}/Makefile
] ; then \
725 rootme
=`pwd`; export rootme
; \
726 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
727 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check); \
732 # This rule is used to install the modules which use
733 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
735 .PHONY
: $(INSTALL_TARGET_MODULES
)
736 $(INSTALL_TARGET_MODULES
): install-dirs
737 @
dir=`echo $@ | sed -e 's/install-//'`; \
738 if
[ -f .
/$${dir}/Makefile
] ; then \
739 rootme
=`pwd`; export rootme
; \
740 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
741 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
746 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
747 # To build a target all-X means to cd to X and make all.
748 .PHONY
: $(ALL_X11_MODULES
)
750 @
dir=`echo $@ | sed -e 's/all-//'`; \
751 if
[ -f .
/$${dir}/Makefile
] ; then \
752 rootme
=`pwd`; export rootme
; \
753 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
755 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
760 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
761 # To build a target check-X means to cd to X and make all.
762 .PHONY
: $(CHECK_X11_MODULES
)
763 $(CHECK_X11_MODULES
):
764 @
dir=`echo $@ | sed -e 's/check-//'`; \
765 if
[ -f .
/$${dir}/Makefile
] ; then \
766 rootme
=`pwd`; export rootme
; \
767 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
769 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
774 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
775 # To build a target install-X means to cd to X and make install.
776 .PHONY
: $(INSTALL_X11_MODULES
)
777 $(INSTALL_X11_MODULES
):
778 @
dir=`echo $@ | sed -e 's/install-//'`; \
779 if
[ -f .
/$${dir}/Makefile
] ; then \
780 rootme
=`pwd`; export rootme
; \
781 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
783 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
788 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
791 @if
[ -f .
/gcc
/Makefile
] ; then \
792 rootme
=`pwd`; export rootme
; \
793 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
794 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
801 @if
[ -f .
/gcc
/Makefile
] ; then \
802 rootme
=`pwd`; export rootme
; \
803 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
804 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
811 @if
[ -f .
/gcc
/Makefile
] ; then \
812 rootme
=`pwd`; export rootme
; \
813 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
814 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
819 # This is a list of inter-dependencies among modules.
822 all-binutils
: all-libiberty all-opcodes all-bfd all-flex
824 # start-sanitize-chill
825 all-chillrt
: all-binutils all-gas all-gcc all-newlib
829 all-diff
: all-libiberty
832 all-expect
: all-tcl all-tk
833 all-fileutils
: all-libiberty
835 all-flex
: all-libiberty all-byacc
836 all-gas
: all-libiberty all-opcodes all-bfd
838 all-gcc
: all-libiberty all-byacc all-binutils all-gas
839 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-glob all-byacc all-sim
841 all-gprof
: all-libiberty all-bfd
842 all-grep
: all-libiberty
843 all-gzip
: all-libiberty
844 all-hello
: all-libiberty
846 all-ispell
: all-emacs
847 all-ld
: all-libiberty all-bfd all-byacc all-flex
848 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio
850 all-m4
: all-libiberty
851 all-make
: all-libiberty
853 all-newlib
: all-binutils all-gas all-gcc
856 all-prms
: all-libiberty
859 all-recode
: all-libiberty
860 all-sed
: all-libiberty
861 all-send-pr
: all-prms
863 all-sim
: all-libiberty all-bfd
864 all-tar
: all-libiberty
866 all-tclX
: all-tcl all-tk
868 all-texinfo
: all-libiberty
870 all-tgas
: all-libiberty all-bfd
873 all-uudecode
: all-libiberty
874 all-xiberty
: all-gcc all-newlib
876 ### other supporting targets
885 @for i in
$(MAKEDIRS
) ; do \
886 echo Making
$$i...
; \
887 parent
=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
888 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
889 if
[ ! -d
$$i ] ; then \
890 if mkdir
$$i ; then \
901 dir.
info: do-install-info
902 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
903 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
904 mv
-f
dir.
info.new
dir.
info ; \
909 @echo
"Building a full distribution of this tree isn't done"
910 @echo
"via 'make dist'. Check out the etc/ subdirectory"
919 @for i in
$(SUBDIRS
); \
923 wd
=`basename $$pwd`; \
924 for j in
`$(MAKE) ls`; \
930 # with the gnu make, this is done automatically.
932 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
933 $(SHELL
) .
/config.status
936 # Support for building net releases
938 # Files in devo used in any net release.
939 # ChangeLog omitted because it may refer to files which are not in this
940 # distribution (perhaps it would be better to include it anyway).
941 DEVO_SUPPORT
= README Makefile.in configure configure.in \
942 config.guess config.sub config move-if-change \
943 COPYING COPYING.LIB
install.sh
945 # Files in devo/etc used in any net release.
946 # ChangeLog omitted because it may refer to files which are not in this
947 # distribution (perhaps it would be better to include it anyway).
948 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
949 configure.texi standards.texi make-stds.texi
951 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob sim
952 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
954 .PHONY
: setup-dirs-gdb gdb.
tar.gz make-gdb.
tar.gz
959 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
961 gdb.
tar.gz
: setup-dirs-gdb
962 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
963 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-testsuite.
dir)
964 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.gz
966 make-gdb.
tar.gz
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
967 rm -rf proto-toplev
; mkdir proto-toplev
968 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
969 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
972 mkdir proto-toplev
/etc
973 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
974 ln
-s ..
/..
/etc
/$$i .
; \
976 # Put only one copy (four hard links) of COPYING in the tar file.
977 rm proto-toplev
/bfd
/COPYING
978 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
979 rm proto-toplev
/include/COPYING
980 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
981 rm proto-toplev
/readline
/COPYING
982 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
984 # Change the bug reporting address in configure to bug-gdb
985 rm proto-toplev
/configure
986 sed
-e
's/configure@cygnus.com/bug-gdb@prep.ai.mit.edu/' \
987 <configure
>proto-toplev
/configure
988 chmod a
+x proto-toplev
/configure
990 # Take out texinfo and glob from configurable dirs
991 rm proto-toplev
/configure.in
992 sed
-e
'/^host_tools=/s/texinfo //' \
993 -e
'/^host_libs=/s/glob //' \
994 <configure.in
>proto-toplev
/configure.in
996 # Take out texinfo from a few places; make simple BISON=bison line.
997 rm proto-toplev
/Makefile.in
998 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
999 -e
'/^ install-texinfo /d' \
1000 -e
'/^BISON = /,/^$$/d' \
1001 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1002 <Makefile.in
>proto-toplev
/Makefile.in
1004 mkdir proto-toplev
/texinfo
1005 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1006 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1007 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1008 chmod og
=u
`find proto-toplev -print`
1009 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1010 echo
"==> Making gdb-$$VER.tar.gz"; \
1011 rm -f gdb-
$$VER; ln
-s proto-toplev gdb-
$$VER; \
1012 tar cfh
- gdb-
$$VER \
1013 |
$(GZIP
) -v
-9 >gdb-
$$VER.
tar.gz
)
1015 # Make the testsuite archive separately.
1016 ln
-s ..
/..
/gdb
/proto-testsuite.
dir/testsuite proto-toplev
/gdb
/testsuite
1017 # Blow away the Chill test that requires a Chill compiled executable,
1018 # since GNU Chill is not yet publically available.
1019 rm -rf proto-toplev
/gdb
/testsuite
/gdb.t31
1021 # Put a copy of COPYING in the tar file.
1022 ln proto-toplev
/gdb
/COPYING proto-toplev
/gdb
/testsuite
/COPYING
1023 chmod og
=u
`find proto-toplev/gdb/testsuite -print`
1024 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1025 echo
"==> Making gdb-$$VER-testsuite.tar.gz"; \
1026 tar cfh
- gdb-
$$VER/configure gdb-
$$VER/config.guess \
1027 gdb-
$$VER/config.sub gdb-
$$VER/move-if-change \
1028 gdb-
$$VER/gdb
/testsuite \
1029 |
$(GZIP
) -v
-9 >gdb-
$$VER-testsuite.
tar.gz
)
1031 # When you use `make setup-dirs' or `make taz' you should always redefine
1033 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1034 # Directories that might want `make diststuff' run.
1035 DISTSTUFFDIRS
= ld gprof gdb libg
++
1039 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex texinfo
/gpl.texinfo
1041 # Make links, and run "make diststuff" when needed.
1042 # The `echo' for setting `p' is to convert all whitespace to spaces.
1043 # Then the `case' further below should tell whether $$d is in
1045 rm -rf proto-toplev
; mkdir proto-toplev
1046 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1047 p
=" `echo $(DISTSTUFFDIRS)` " ; \
1048 for d in
$$dirs ; do \
1049 if
[ -d
$$d ]; then \
1052 echo making diststuff in
$$d ; \
1053 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ;; \
1055 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1056 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1058 ln
-s ..
/$$d proto-toplev
/$$d ; \
1060 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1064 mkdir proto-toplev
/etc
1065 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1066 ln
-s ..
/..
/etc
/$$i .
; \
1069 # Take out texinfo and glob from configurable dirs
1070 rm proto-toplev
/configure.in
1071 sed
-e
'/^host_tools=/s/texinfo //' \
1072 -e
'/^host_libs=/s/glob //' \
1073 <configure.in
>proto-toplev
/configure.in
1075 # Take out texinfo from a few places; make simple BISON=bison line.
1076 rm proto-toplev
/Makefile.in
1077 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1078 -e
'/^ install-texinfo /d' \
1079 -e
'/^BISON = /,/^$$/d' \
1080 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1081 <Makefile.in
>proto-toplev
/Makefile.in
1083 mkdir proto-toplev
/texinfo
1084 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1085 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1086 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1087 chmod og
=u
`find . -print`
1088 (VER
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1089 echo
"==> Making $(TOOL)-$$VER.tar.gz"; \
1090 rm -f
$(TOOL
)-$$VER; ln
-s proto-toplev
$(TOOL
)-$$VER; \
1091 tar cfh
- $(TOOL
)-$$VER \
1092 |
$(GZIP
) -v
-9 >$(TOOL
)-$$VER.
tar.gz
)
1094 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo
1095 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1098 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes
1099 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1100 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)" TOOL
=gas
1102 # The FSF "binutils" release includes gprof and ld.
1103 .PHONY
: binutils.
tar.gz
1104 BINUTILS_SUPPORT_DIRS
= bfd
include libiberty opcodes
ld gprof
1105 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1106 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS)" TOOL
=binutils
1108 .PHONY
: gas
+binutils.
tar.gz
1109 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1110 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1111 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(GASB_SUPPORT_DIRS)" TOOL
=gas
1113 .PHONY
: libg
++.
tar.gz
1114 LIBGXX_SUPPORT_DIRS
=include libiberty xiberty
1115 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1116 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)" TOOL
=libg
++
1121 # start-sanitize-chill
1122 ## This is ugly, but I don't want GNU make to put these variables in
1123 ## the environment. Older makes will see this as a set of targets
1124 ## with no dependencies and no actions.
1125 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1126 # end-sanitize-chill
1128 # end of Makefile.in