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
)
70 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
71 BISON
= `if [ -f $${rootme}/byacc/byacc ] ; \
72 then echo $${rootme}/byacc/byacc ; \
76 LEX
= `if [ -f $${rootme}/flex/flex ] ; \
77 then echo $${rootme}/flex/flex ; \
80 MAKEINFO
= `if [ -f $${rootme}/texinfo/makeinfo/makeinfo ] ; \
81 then echo $${rootme}/texinfo/makeinfo/makeinfo ; \
82 else echo makeinfo ; fi`
83 # This just becomes part of the MAKEINFO definition passed down to
84 # sub-makes. It lets flags be given on the command line while still
85 # using the makeinfo from the object tree.
88 EXPECT
= `if [ -f $${rootme}/expect/expect ] ; \
89 then echo $${rootme}/expect/expect ; \
90 else echo expect ; fi`
92 RUNTEST
= `if [ -f $${srcroot}/dejagnu/runtest ] ; \
93 then echo $${srcroot}/dejagnu/runtest ; \
94 else echo runtest ; fi`
97 # libraries that may need to be augmented on a system-by-system basis
100 # compilers to use to create programs which must be run in the build
103 CXX_FOR_BUILD
= $(CXX
)
105 SUBDIRS
= "this is set via configure, don't edit this"
109 INSTALL_TARGET
= install-dirs \
111 $(INSTALL_TARGET_MODULES
) \
112 $(INSTALL_X11_MODULES
) \
116 if [ -f $${rootme}/gcc/Makefile ] ; then \
117 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
119 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
122 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
126 # start-sanitize-chill
127 CHILL_FOR_TARGET
= ` \
128 if [ -f $${rootme}/gcc/Makefile ] ; then \
129 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/ -L$${rootme}/chillrt/; \
131 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
134 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
141 if [ -f $${rootme}/gcc/Makefile ] ; then \
142 echo $${rootme}/gcc/xgcc -B$${rootme}/gcc/; \
144 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
147 t='$(program_transform_name)'; echo gcc | sed -e '' $$t; \
152 if [ -f $${rootme}/gas/Makefile ] ; then \
153 echo $${rootme}/gas/as.new ; \
155 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
158 t='$(program_transform_name)'; echo as | sed -e '' $$t ; \
163 if [ -f $${rootme}/binutils/Makefile ] ; then \
164 echo $${rootme}/binutils/ar ; \
166 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
169 t='$(program_transform_name)'; echo ar | sed -e '' $$t ; \
173 RANLIB_FOR_TARGET
= ` \
174 if [ -f $${rootme}/binutils/Makefile ] ; then \
175 echo $${rootme}/binutils/ranlib ; \
177 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
180 t='$(program_transform_name)'; echo ranlib | sed -e '' $$t ; \
185 if [ -f $${rootme}/binutils/Makefile ] ; then \
186 echo $${rootme}/binutils/nm ; \
188 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
191 t='$(program_transform_name)'; echo nm | sed -e '' $$t ; \
195 # FIXME: This is badly named.
197 if [ -f $${rootme}/gcc/Makefile ] ; then \
198 if [ -f $${rootme}/newlib/Makefile ] ; then \
199 echo -I$${rootme}/newlib/targ-include -I$${srcroot}/newlib/libc/include -I$${rootme}/gcc/include -nostdinc ; \
201 echo -I$${rootme}/gcc/include ; \
209 #### host and target specific makefile fragments come in here.
212 # Flags to pass down to all sub-makes.
213 # Please keep these in alphabetical order.
214 BASE_FLAGS_TO_PASS
= \
215 "AR_FLAGS=$(AR_FLAGS)" \
216 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
217 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
219 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
220 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
222 $(start-sanitize-chill
)\
223 "CHILLFLAGS=$(CHILLFLAGS)" \
224 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
225 "CHILL_LIB=$(CHILL_LIB)" \
226 $(end-sanitize-chill
)\
227 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
228 "CXXFLAGS=$(CXXFLAGS)" \
229 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
230 "GCC_FOR_TARGET=$$(CC_FOR_TARGET)" \
231 "INSTALL=$(INSTALL)" \
232 "INSTALL_DATA=$(INSTALL_DATA)" \
233 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
234 "INSTALL_XFORM=$(INSTALL_XFORM)" \
235 "LDFLAGS=$(LDFLAGS)" \
237 "LOADLIBES=$(LOADLIBES)" \
238 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
239 "MUNCH_NM=$(MUNCH_NM)" \
240 "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).
358 # This is a list of the check targets for all of the modules which are
359 # compiled using $(FLAGS_TO_PASS).
405 # This is a list of the install targets for all of the modules which are
406 # compiled using $(FLAGS_TO_PASS).
453 # This is a list of the targets for all of the modules which are compiled
454 # using $(X11_FLAGS_TO_PASS).
461 # This is a list of the check targets for all of the modules which are
462 # compiled using $(X11_FLAGS_TO_PASS).
463 CHECK_X11_MODULES
= \
469 # This is a list of the install targets for all the modules which are
470 # compiled using $(X11_FLAGS_TO_PASS).
471 INSTALL_X11_MODULES
= \
477 # This is a list of the targets for all of the modules which are compiled
478 # using $(TARGET_FLAGS_TO_PASS).
479 ALL_TARGET_MODULES
= \
480 $(start-sanitize-chill
) \
482 $(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
) \
497 # This is a list of the install targets for all of the modules which are
498 # compiled using $(TARGET_FLAGS_TO_PASS).
499 INSTALL_TARGET_MODULES
= \
500 $(start-sanitize-chill
) \
502 $(end-sanitize-chill
) \
507 # This is a shell case of all modules which are compiled using
508 # $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
509 TARGET_LIBS
= libg
++ | newlib | xiberty
510 # start-sanitize-chill
511 TARGET_LIBS
= chillrt | libg
++ | newlib | xiberty
514 # The first rule in the file had better be this one. Don't put any above it.
518 # The target built for a native build.
522 $(ALL_TARGET_MODULES
) \
526 # Do a target for all the subdirectories. A ``make do-X'' will do a
527 # ``make X'' in all subdirectories (because, in general, there is a
528 # dependency (below) of X upon do-X, a ``make X'' will also do this,
529 # but it may do additional work as well).
530 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
531 # because it is so large that it can easily overflow the command line
532 # length limit on some systems.
544 @target
=`echo $@ | sed -e 's/^do-//'`; \
545 rootme
=`pwd`; export rootme
; \
546 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
547 for i in
$(SUBDIRS
); do \
548 if
[ -f .
/$$i/Makefile
]; then \
551 for flag in
$(EXTRA_TARGET_FLAGS
); do \
552 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
556 for flag in
$(EXTRA_GCC_FLAGS
); do \
557 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
561 for flag in
$(EXTRA_HOST_FLAGS
); do \
562 eval
`echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
566 export AR AS CC CXX NM RANLIB XTRAFLAGS
; \
568 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
569 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
570 "RANLIB=$${RANLIB}" "XTRAFLAGS=$${XTRAFLAGS}" \
572 then true
; else exit
1; fi
; \
576 # Here are the targets which correspond to the do-X targets.
578 .PHONY
: info installcheck dvi install-info
579 .PHONY
: clean distclean mostlyclean realclean local-clean local-distclean
581 installcheck: do-installcheck
584 install-info
: do-install-info
dir.
info
585 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
586 if
[ -f
dir.
info ] ; then \
587 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
591 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
594 -rm -f Makefile config.status
596 clean: do-clean local-clean
597 mostlyclean: do-mostlyclean local-clean
598 distclean: do-distclean local-clean local-distclean
599 realclean: do-realclean local-clean local-distclean
604 check: $(CHECK_MODULES
) \
605 $(CHECK_TARGET_MODULES
) \
606 $(CHECK_X11_MODULES
) \
609 # Installation targets.
611 .PHONY
: install uninstall vault-install
612 install: $(INSTALL_TARGET
)
615 @echo
"the uninstall target is not supported in this tree"
618 @if
[ -f .
/release
/vault-install
] ; then \
619 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
625 install.
all: install-no-fixedincludes
626 @if
[ -f .
/gcc
/Makefile
] ; then \
627 rootme
=`pwd` ; export rootme
; \
629 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
634 # install-no-fixedincludes is used because Cygnus can not distribute
635 # the fixed header files.
636 .PHONY
: install-no-fixedincludes
637 install-no-fixedincludes
: \
640 $(INSTALL_TARGET_MODULES
) \
641 $(INSTALL_X11_MODULES
) \
644 # Install the gcc headers files, but not the fixed include files,
645 # which Cygnus is not allowed to distribute. This rule is very
646 # dependent on the workings of the gcc Makefile.in.
647 .PHONY
: gcc-no-fixedincludes
648 gcc-no-fixedincludes
:
649 @if
[ -f .
/gcc
/Makefile
]; then \
650 rm -rf gcc
/tmp-include
; \
651 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
653 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
654 touch gcc
/stmp-fixinc
; \
655 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
656 rootme
=`pwd`; export rootme
; \
657 srcroot
=`cd $(srcdir); pwd` ; export srcroot
; \
659 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
660 rm -rf gcc
/include; \
661 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
664 # This rule is used to build the modules which use FLAGS_TO_PASS. To
665 # build a target all-X means to cd to X and make all.
666 # all-glob is handled specially because it doesn't actually build.
667 .PHONY
: $(ALL_MODULES
) all-glob
668 $(ALL_MODULES
) all-glob
:
669 @
dir=`echo $@ | sed -e 's/all-//'`; \
670 if
[ -f .
/$${dir}/Makefile
] ; then \
671 rootme
=`pwd`; export rootme
; \
672 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
673 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
678 # This rule is used to check the modules which use FLAGS_TO_PASS. To
679 # build a target check-X means to cd to X and make all.
680 .PHONY
: $(CHECK_MODULES
)
682 @
dir=`echo $@ | sed -e 's/check-//'`; \
683 if
[ -f .
/$${dir}/Makefile
] ; then \
684 rootme
=`pwd`; export rootme
; \
685 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
686 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
691 # This rule is used to install the modules which use FLAGS_TO_PASS.
692 # To build a target install-X means to cd to X and make install.
693 .PHONY
: $(INSTALL_MODULES
)
694 $(INSTALL_MODULES
): install-dirs
695 @
dir=`echo $@ | sed -e 's/install-//'`; \
696 if
[ -f .
/$${dir}/Makefile
] ; then \
697 rootme
=`pwd`; export rootme
; \
698 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
699 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
704 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
705 # To build a target all-X means to cd to X and make all.
706 .PHONY
: $(ALL_TARGET_MODULES
)
707 $(ALL_TARGET_MODULES
):
708 @
dir=`echo $@ | sed -e 's/all-//'`; \
709 if
[ -f .
/$${dir}/Makefile
] ; then \
710 rootme
=`pwd`; export rootme
; \
711 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
712 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
717 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
718 # To build a target install-X means to cd to X and make install.
719 .PHONY
: $(CHECK_TARGET_MODULES
)
720 $(CHECK_TARGET_MODULES
):
721 @
dir=`echo $@ | sed -e 's/check-//'`; \
722 if
[ -f .
/$${dir}/Makefile
] ; then \
723 rootme
=`pwd`; export rootme
; \
724 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
725 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) check); \
730 # This rule is used to install the modules which use
731 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
733 .PHONY
: $(INSTALL_TARGET_MODULES
)
734 $(INSTALL_TARGET_MODULES
): install-dirs
735 @
dir=`echo $@ | sed -e 's/install-//'`; \
736 if
[ -f .
/$${dir}/Makefile
] ; then \
737 rootme
=`pwd`; export rootme
; \
738 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
739 (cd
$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
744 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
745 # To build a target all-X means to cd to X and make all.
746 .PHONY
: $(ALL_X11_MODULES
)
748 @
dir=`echo $@ | sed -e 's/all-//'`; \
749 if
[ -f .
/$${dir}/Makefile
] ; then \
750 rootme
=`pwd`; export rootme
; \
751 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
753 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
758 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
759 # To build a target check-X means to cd to X and make all.
760 .PHONY
: $(CHECK_X11_MODULES
)
761 $(CHECK_X11_MODULES
):
762 @
dir=`echo $@ | sed -e 's/check-//'`; \
763 if
[ -f .
/$${dir}/Makefile
] ; then \
764 rootme
=`pwd`; export rootme
; \
765 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
767 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
772 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
773 # To build a target install-X means to cd to X and make install.
774 .PHONY
: $(INSTALL_X11_MODULES
)
775 $(INSTALL_X11_MODULES
):
776 @
dir=`echo $@ | sed -e 's/install-//'`; \
777 if
[ -f .
/$${dir}/Makefile
] ; then \
778 rootme
=`pwd`; export rootme
; \
779 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
781 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
786 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
789 @if
[ -f .
/gcc
/Makefile
] ; then \
790 rootme
=`pwd`; export rootme
; \
791 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
792 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
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
) check); \
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
) install); \
817 # This is a list of inter-dependencies among modules.
820 all-binutils
: all-libiberty all-opcodes all-bfd all-flex
822 # start-sanitize-chill
823 all-chillrt
: all-binutils all-gas all-gcc all-newlib
827 all-diff
: all-libiberty
830 all-expect
: all-tcl all-tk
831 all-fileutils
: all-libiberty
833 all-flex
: all-libiberty all-byacc
834 all-gas
: all-libiberty all-opcodes all-bfd
836 all-gcc
: all-libiberty all-byacc all-binutils all-gas
837 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-glob all-byacc all-sim
839 all-gprof
: all-libiberty all-bfd
841 all-gzip
: all-libiberty
842 all-hello
: all-libiberty
844 all-ispell
: all-emacs
845 all-ld
: all-libiberty all-bfd all-byacc all-flex
846 all-libg
++: all-gas all-ld all-gcc all-xiberty all-newlib
848 all-m4
: all-libiberty
849 all-make
: all-libiberty
851 all-newlib
: all-binutils all-gas all-gcc
857 all-recode
: all-libiberty
861 all-sim
: all-libiberty all-bfd
862 all-tar
: all-libiberty
864 all-tclX
: all-tcl all-tk
866 all-texinfo
: all-libiberty
868 all-tgas
: all-libiberty all-bfd
871 all-uudecode
: all-libiberty
872 all-xiberty
: all-gcc all-newlib
874 ### other supporting targets
883 @for i in
$(MAKEDIRS
) ; do \
884 echo Making
$$i...
; \
885 parent
=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
886 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
887 if
[ ! -d
$$i ] ; then \
888 if mkdir
$$i ; then \
899 dir.
info: do-install-info
900 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
901 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
902 mv
-f
dir.
info.new
dir.
info ; \
907 @echo
"Building a full distribution of this tree isn't done"
908 @echo
"via 'make dist'. Check out the etc/ subdirectory"
917 @for i in
$(SUBDIRS
); \
921 wd
=`basename $$pwd`; \
922 for j in
`$(MAKE) ls`; \
928 # with the gnu make, this is done automatically.
930 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
931 $(SHELL
) .
/config.status
934 # Support for building net releases
936 # Files in devo used in any net release.
937 # ChangeLog omitted because it may refer to files which are not in this
938 # distribution (perhaps it would be better to include it anyway).
939 DEVO_SUPPORT
= README Makefile.in configure configure.in \
940 config.guess config.sub config move-if-change \
941 COPYING COPYING.LIB
install.sh
943 # Files in devo/etc used in any net release.
944 # ChangeLog omitted because it may refer to files which are not in this
945 # distribution (perhaps it would be better to include it anyway).
946 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
947 configure.texi standards.texi make-stds.texi
949 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob sim
950 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
952 .PHONY
: setup-dirs-gdb gdb.
tar.Z make-gdb.
tar.Z
957 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
959 gdb.
tar.Z
: setup-dirs-gdb
960 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
961 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-testsuite.
dir)
962 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.Z
964 make-gdb.
tar.Z
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
965 rm -rf proto-toplev
; mkdir proto-toplev
966 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
967 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
970 mkdir proto-toplev
/etc
971 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
972 ln
-s ..
/..
/etc
/$$i .
; \
974 # Put only one copy (four hard links) of COPYING in the tar file.
975 rm proto-toplev
/bfd
/COPYING
976 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
977 rm proto-toplev
/include/COPYING
978 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
979 rm proto-toplev
/readline
/COPYING
980 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
982 # Take out texinfo and glob from configurable dirs
983 rm proto-toplev
/configure.in
984 sed
-e
'/^host_tools=/s/texinfo //' \
985 -e
'/^host_libs=/s/glob //' \
986 <configure.in
>proto-toplev
/configure.in
988 # Take out texinfo from a few places; make simple BISON=bison line.
989 rm proto-toplev
/Makefile.in
990 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
991 -e
'/^ install-texinfo /d' \
992 -e
'/^BISON = /,/^$$/d' \
993 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
994 <Makefile.in
>proto-toplev
/Makefile.in
996 mkdir proto-toplev
/texinfo
997 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
998 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
999 chmod og
=u
`find proto-toplev -print`
1000 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1001 ln
-s proto-toplev gdb-
$$VER; \
1002 echo
"==> Making gdb-$$VER.tar.Z"; \
1003 tar cfh
- gdb-
$$VER |
$(COMPRESS
) -v
>gdb-
$$VER.
tar.Z
; \
1004 echo
"==> Making gdb-$$VER.tar.gz"; \
1005 tar cfh
- gdb-
$$VER |
$(GZIP
) -v
-9 >gdb-
$$VER.
tar.gz
)
1007 # Make the testsuite archive separately.
1008 ln
-s ..
/..
/gdb
/proto-testsuite.
dir/testsuite proto-toplev
/gdb
/testsuite
1009 # Blow away the Chill test that requires a Chill compiled executable,
1010 # since GNU Chill is not yet publically available.
1011 rm -rf proto-toplev
/gdb
/testsuite
/gdb.t31
1013 # Put a copy of COPYING in the tar file.
1014 ln proto-toplev
/gdb
/COPYING proto-toplev
/gdb
/testsuite
/COPYING
1015 chmod og
=u
`find proto-toplev/gdb/testsuite -print`
1016 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1017 echo
"==> Making gdb-$$VER-testsuite.tar.Z"; \
1018 tar cfh
- gdb-
$$VER/configure gdb-
$$VER/config.guess \
1019 gdb-
$$VER/config.sub gdb-
$$VER/move-if-change \
1020 gdb-
$$VER/gdb
/testsuite | \
1021 $(COMPRESS
) -v
>gdb-
$$VER-testsuite.
tar.Z
; \
1022 echo
"==> Making gdb-$$VER-testsuite.tar.gz"; \
1023 tar cfh
- gdb-
$$VER/configure gdb-
$$VER/config.guess \
1024 gdb-
$$VER/config.sub gdb-
$$VER/move-if-change \
1025 gdb-
$$VER/gdb
/testsuite | \
1026 $(GZIP
) -v
-9 >gdb-
$$VER-testsuite.
tar.gz
)
1028 # When you use `make setup-dirs' or `make taz' you should always redefine
1030 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1031 # Directories that might want `make diststuff' run.
1032 DISTSTUFFDIRS
= ld gprof gdb libg
++
1036 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) texinfo
/texinfo.
tex texinfo
/gpl.texinfo
1038 # Make links, and run "make diststuff" when needed.
1039 # The `echo' for setting `p' is to convert all whitespace to spaces.
1040 # Then the `case' further below should tell whether $$d is in
1042 rm -rf proto-toplev
; mkdir proto-toplev
1043 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1044 p
=" `echo $(DISTSTUFFDIRS)` " ; \
1045 for d in
$$dirs ; do \
1046 if
[ -d
$$d ]; then \
1049 echo making diststuff in
$$d ; \
1050 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ;; \
1052 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1053 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1055 ln
-s ..
/$$d proto-toplev
/$$d ; \
1057 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1061 mkdir proto-toplev
/etc
1062 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1063 ln
-s ..
/..
/etc
/$$i .
; \
1066 # Take out texinfo and glob from configurable dirs
1067 rm proto-toplev
/configure.in
1068 sed
-e
'/^host_tools=/s/texinfo //' \
1069 -e
'/^host_libs=/s/glob //' \
1070 <configure.in
>proto-toplev
/configure.in
1072 # Take out texinfo from a few places; make simple BISON=bison line.
1073 rm proto-toplev
/Makefile.in
1074 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1075 -e
'/^ install-texinfo /d' \
1076 -e
'/^BISON = /,/^$$/d' \
1077 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1078 <Makefile.in
>proto-toplev
/Makefile.in
1080 mkdir proto-toplev
/texinfo
1081 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1082 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1083 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1084 chmod og
=u
`find . -print`
1085 (VER
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1086 echo
"==> Making $(TOOL)-$$VER.tar.gz"; \
1087 rm -f
$(TOOL
)-$$VER; ln
-s proto-toplev
$(TOOL
)-$$VER; \
1088 tar cfh
- $(TOOL
)-$$VER \
1089 |
$(GZIP
) -v
-9 >$(TOOL
)-$$VER.
tar.gz
)
1091 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo
1092 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1095 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes
1096 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1097 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)" TOOL
=gas
1099 # The FSF "binutils" release includes gprof and ld.
1100 .PHONY
: binutils.
tar.gz
1101 BINUTILS_SUPPORT_DIRS
= bfd
include libiberty opcodes
ld gprof
1102 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1103 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS)" TOOL
=binutils
1105 .PHONY
: gas
+binutils.
tar.gz
1106 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1107 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1108 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(GASB_SUPPORT_DIRS)" TOOL
=gas
1110 .PHONY
: libg
++.
tar.gz
1111 LIBGXX_SUPPORT_DIRS
=include libiberty xiberty
1112 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1113 $(MAKE
) -f Makefile.in taz SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)" TOOL
=libg
++
1118 # start-sanitize-chill
1119 ## This is ugly, but I don't want GNU make to put these variables in
1120 ## the environment. Older makes will see this as a set of targets
1121 ## with no dependencies and no actions.
1122 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1123 # end-sanitize-chill
1125 # end of Makefile.in