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
) -m
644
51 INSTALL_XFORM
= $(INSTALL
) -t
='$(program_transform_name)'
58 # If any variables are added here, they must be added to do-*, below.
59 # The HOST_* variables are a special case, which are used for the gcc
60 # cross-building scheme.
61 HOST_CC
= $(CC_FOR_BUILD
)
63 HOST_PREFIX_1
= loser-
65 # We don't specify -g -O because many compilers don't support -g -O,
66 # and/or -O is broken in and of itself.
69 # start-sanitize-chill
70 CHILLFLAGS
= $(CFLAGS
)
75 # Use -O to stress test the compiler.
76 CXXFLAGS
= -g
-O
-fexternal-templates
80 # Not plain GZIP, since gzip looks there for extra command-line options.
83 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
84 BISON
= `if [ -f $$r/byacc/byacc ] ; \
85 then echo $$r/byacc/byacc ; \
89 LEX
= `if [ -f $$r/flex/flex ] ; \
90 then echo $$r/flex/flex ; \
93 M4
= `if [ -f $$r/m4/m4 ] ; \
94 then echo $$r/m4/m4 ; \
97 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/makeinfo ] ; \
98 then echo $$r/texinfo/makeinfo/makeinfo ; \
99 else echo makeinfo ; fi`
101 # This just becomes part of the MAKEINFO definition passed down to
102 # sub-makes. It lets flags be given on the command line while still
103 # using the makeinfo from the object tree.
106 EXPECT
= `if [ -f $$r/expect/expect ] ; \
107 then echo $$r/expect/expect ; \
108 else echo expect ; fi`
110 RUNTEST
= `if [ -f $${srcroot}/dejagnu/runtest ] ; \
111 then echo $${srcroot}/dejagnu/runtest ; \
112 else echo runtest ; fi`
115 # libraries that may need to be augmented on a system-by-system basis
118 # compilers to use to create programs which must be run in the build
121 CXX_FOR_BUILD
= $(CXX
)
123 SUBDIRS
= "this is set via configure, don't edit this"
127 INSTALL_TARGET
= install-dirs \
129 $(INSTALL_TARGET_MODULES
) \
130 $(INSTALL_X11_MODULES
) \
136 if [ -f $$r/gcc/Makefile ] ; then \
137 if [ -f $$r/newlib/Makefile ] ; then \
138 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
140 echo $$r/gcc/xgcc -B$$r/gcc/; \
143 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
146 t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \
150 # start-sanitize-chill
151 CHILL_FOR_TARGET
= ` \
152 if [ -f $$r/gcc/Makefile ] ; then \
153 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/chillrt/; \
155 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
158 t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \
165 if [ -f $$r/gcc/Makefile ] ; then \
166 if [ -f $$r/newlib/Makefile ] ; then \
167 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/newlib/targ-include -idirafter $${srcroot}/newlib/libc/include -nostdinc; \
169 echo $$r/gcc/xgcc -B$$r/gcc/; \
172 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
175 t='$(program_transform_name)'; echo gcc | sed -e 's/brokensed/brokensed/' $$t; \
180 if [ -f $$r/gas/Makefile ] ; then \
181 echo $$r/gas/as.new ; \
183 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
186 t='$(program_transform_name)'; echo as | sed -e 's/brokensed/brokensed/' $$t ; \
191 if [ -f $$r/binutils/ar ] ; then \
192 echo $$r/binutils/ar ; \
194 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
197 t='$(program_transform_name)'; echo ar | sed -e 's/brokensed/brokensed/' $$t ; \
201 RANLIB_FOR_TARGET
= ` \
202 if [ -f $$r/binutils/ranlib ] ; then \
203 echo $$r/binutils/ranlib ; \
205 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
208 t='$(program_transform_name)'; echo ranlib | sed -e 's/brokensed/brokensed/' $$t ; \
213 if [ -f $$r/binutils/Makefile ] ; then \
214 echo $$r/binutils/nm.new ; \
216 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
219 t='$(program_transform_name)'; echo nm | sed -e 's/brokensed/brokensed/' $$t ; \
223 #### host and target specific makefile fragments come in here.
226 # Flags to pass down to all sub-makes.
227 # Please keep these in alphabetical order.
228 BASE_FLAGS_TO_PASS
= \
229 "AR_FLAGS=$(AR_FLAGS)" \
230 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
231 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
233 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
234 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
236 $(start-sanitize-chill
)\
237 "CHILLFLAGS=$(CHILLFLAGS)" \
238 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
239 "CHILL_LIB=$(CHILL_LIB)" \
240 $(end-sanitize-chill
)\
241 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
242 "CXXFLAGS=$(CXXFLAGS)" \
243 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
244 "GCC_FOR_TARGET=$(CC_FOR_TARGET)" \
245 "INSTALL=$(INSTALL)" \
246 "INSTALL_DATA=$(INSTALL_DATA)" \
247 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
248 "INSTALL_XFORM=$(INSTALL_XFORM)" \
249 "LDFLAGS=$(LDFLAGS)" \
252 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
253 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
254 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
257 "RUNTEST=$(RUNTEST)" \
258 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
260 "exec_prefix=$(exec_prefix)" \
264 # Flags to pass down to most sub-makes, in which we're building with
265 # the host environment.
266 # If any variables are added here, they must be added to do-*, below.
275 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
277 # Flags that are concerned with the location of the X11 include files
279 X11_FLAGS_TO_PASS
= \
280 "X11_INCLUDE_FLAGS=$(X11_INCLUDE_FLAGS)" \
281 "X11_LIB_FLAGS=$(X11_LIB_FLAGS)" \
284 # Flags to pass down to makes which are built with the target environment.
285 # The double $ decreases the length of the command line; the variables
286 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
287 # If any variables are added here, they must be added to do-*, below.
288 EXTRA_TARGET_FLAGS
= \
289 'AR=$$(AR_FOR_TARGET)' \
290 'AS=$$(AS_FOR_TARGET)' \
291 'CC=$$(CC_FOR_TARGET)' \
292 'CXX=$$(CXX_FOR_TARGET)' \
293 'NM=$$(NM_FOR_TARGET)' \
294 'RANLIB=$$(RANLIB_FOR_TARGET)'
296 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
298 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
299 # unfortunately needs the native compiler and the target ar and
303 'AR=$$(AR_FOR_TARGET)' \
307 'HOST_CC=$(CC_FOR_BUILD)' \
308 'HOST_PREFIX=$(HOST_PREFIX)' \
309 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
311 'RANLIB=$$(RANLIB_FOR_TARGET)'
313 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
315 # This is a list of the targets for all of the modules which are compiled
316 # using $(FLAGS_TO_PASS).
366 # This is a list of the check targets for all of the modules which are
367 # compiled using $(FLAGS_TO_PASS).
414 # This is a list of the install targets for all of the modules which are
415 # compiled using $(FLAGS_TO_PASS).
464 # This is a list of the targets for all of the modules which are compiled
465 # using $(X11_FLAGS_TO_PASS).
473 # This is a list of the check targets for all of the modules which are
474 # compiled using $(X11_FLAGS_TO_PASS).
475 CHECK_X11_MODULES
= \
482 # This is a list of the install targets for all the modules which are
483 # compiled using $(X11_FLAGS_TO_PASS).
484 INSTALL_X11_MODULES
= \
491 # This is a list of the targets for all of the modules which are compiled
492 # using $(TARGET_FLAGS_TO_PASS).
493 ALL_TARGET_MODULES
= \
494 $(start-sanitize-chill
) \
496 $(end-sanitize-chill
) \
502 # This is a list of the check targets for all of the modules which are
503 # compiled using $(TARGET_FLAGS_TO_PASS).
504 CHECK_TARGET_MODULES
= \
505 $(start-sanitize-chill
) \
507 $(end-sanitize-chill
) \
513 # This is a list of the install targets for all of the modules which are
514 # compiled using $(TARGET_FLAGS_TO_PASS).
515 INSTALL_TARGET_MODULES
= \
516 $(start-sanitize-chill
) \
518 $(end-sanitize-chill
) \
524 # This is a shell case of all modules which are compiled using
525 # $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
526 TARGET_LIBS
= libio | libg
++ | newlib | xiberty
527 # start-sanitize-chill
528 TARGET_LIBS
= chillrt | libio | libg
++ | newlib | xiberty
531 # The first rule in the file had better be this one. Don't put any above it.
535 # The target built for a native build.
539 $(ALL_TARGET_MODULES
) \
543 # Do a target for all the subdirectories. A ``make do-X'' will do a
544 # ``make X'' in all subdirectories (because, in general, there is a
545 # dependency (below) of X upon do-X, a ``make X'' will also do this,
546 # but it may do additional work as well).
547 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
548 # because it is so large that it can easily overflow the command line
549 # length limit on some systems.
562 @target
=`echo $@ | sed -e 's/^do-//'`; \
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
; \
586 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
587 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
588 "RANLIB=$${RANLIB}" \
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 r
=`pwd` ; export r
; \
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
/include/fixed
; \
673 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
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 \
809 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
810 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
817 @if
[ -f .
/gcc
/Makefile
] ; then \
819 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
820 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
827 @if
[ -f .
/gcc
/Makefile
] ; then \
829 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
830 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
837 # This rule is used to install the modules which use FLAGS_TO_PASS.
838 # To build a target install-X means to cd to X and make install.
839 .PHONY
: $(INSTALL_LAST
)
840 $(INSTALL_LAST
): install-dirs
841 @
dir=`echo $@ | sed -e 's/install-//'`; \
842 if
[ -f .
/$${dir}/Makefile
] ; then \
844 srcroot
=`cd $(srcdir); pwd`; export srcroot
; \
845 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
851 # This is a list of inter-dependencies among modules.
854 all-binutils
: all-libiberty all-opcodes all-bfd all-flex
856 # start-sanitize-chill
857 all-chillrt
: all-binutils all-gas all-gcc all-newlib
861 all-diff
: all-libiberty
864 all-expect
: all-tcl all-tk
865 all-fileutils
: all-libiberty
867 all-flex
: all-libiberty all-byacc
868 all-gas
: all-libiberty all-opcodes all-bfd
871 all-gcc
: all-libiberty all-byacc all-binutils all-gas all-pagas
872 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-glob all-byacc all-sim
874 all-gprof
: all-libiberty all-bfd
875 all-grep
: all-libiberty
876 all-gzip
: all-libiberty
877 all-hello
: all-libiberty
879 all-ispell
: all-emacs
880 all-ld
: all-libiberty all-bfd all-byacc all-flex
881 all-libg
++: all-gas all-pagas all-ld all-gcc all-xiberty all-newlib all-libio
882 all-libio
: all-gas all-pagas all-ld all-gcc all-xiberty all-newlib
884 all-m4
: all-libiberty
885 all-make
: all-libiberty
887 all-newlib
: all-binutils all-gas all-pagas all-gcc
890 all-prms
: all-libiberty
893 all-recode
: all-libiberty
894 all-sed
: all-libiberty
895 all-send-pr
: all-prms
897 all-sim
: all-libiberty all-bfd
898 all-tar
: all-libiberty
900 all-tclX
: all-tcl all-tk
902 all-texinfo
: all-libiberty
904 all-tgas
: all-libiberty all-bfd
907 all-uudecode
: all-libiberty
908 all-xiberty
: all-gcc all-newlib
910 ### other supporting targets
919 @for i in
$(MAKEDIRS
) ; do \
920 echo Making
$$i...
; \
921 parent
=`echo $$i | sed -e 's@/[^/]*$$@@' | sed -e 's@^$$@/@'`; \
922 if
[ -d
$$parent ] ; then true
; else mkdir
$$parent ; fi
; \
923 if
[ ! -d
$$i ] ; then \
924 if mkdir
$$i ; then \
935 dir.
info: do-install-info
936 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
937 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
938 mv
-f
dir.
info.new
dir.
info ; \
943 @echo
"Building a full distribution of this tree isn't done"
944 @echo
"via 'make dist'. Check out the etc/ subdirectory"
948 # Right now this just builds TAGS in each subdirectory. emacs19 has the
949 # ability to use several tags files at once, so there is probably no need
950 # to combine them into one big TAGS file (like CVS 1.3 does). We could
951 # (if we felt like it) have this Makefile write a piece of elisp which
952 # the user could load to tell emacs19 where all the TAGS files we just
956 # with the gnu make, this is done automatically.
958 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
959 $(SHELL
) .
/config.status
962 # Support for building net releases
964 # Files in devo used in any net release.
965 # ChangeLog omitted because it may refer to files which are not in this
966 # distribution (perhaps it would be better to include it anyway).
967 DEVO_SUPPORT
= README Makefile.in configure configure.in \
968 config.guess config.sub config move-if-change \
969 COPYING COPYING.LIB
install.sh
971 # Files in devo/etc used in any net release.
972 # ChangeLog omitted because it may refer to files which are not in this
973 # distribution (perhaps it would be better to include it anyway).
974 ETC_SUPPORT
= Makefile.in cfg-paper.texi configure.in configure.man \
975 configure.texi standards.texi make-stds.texi
977 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline glob sim
978 GDB_SUPPORT_FILES
= $(GDB_SUPPORT_DIRS
)
980 .PHONY
: setup-dirs-gdb gdb.
tar.gz make-gdb.
tar.gz
982 $(start-sanitize-Sanitize
)
983 @if
[ -f .Sanitize
] ; then echo
"RUN Sanitize FIRST!" ; false
; fi
;
984 $(end-sanitize-Sanitize
)
988 chmod og
=u
`find etc $(DEVO_SUPPORT) $(GDB_SUPPORT_FILES) -print`
990 gdb.
tar.gz
: setup-dirs-gdb
991 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-gdb.
dir BISON
="byacc")
992 (cd gdb
; $(MAKE
) -f Makefile.in make-proto-testsuite.
dir)
993 $(MAKE
) $(MFLAGS
) -f Makefile.in make-gdb.
tar.gz
995 make-gdb.
tar.gz
: $(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb texinfo
/texinfo.
tex
996 rm -rf proto-toplev
; mkdir proto-toplev
997 ln
-s ..
/gdb
/proto-gdb.
dir proto-toplev
/gdb
998 (cd proto-toplev
; for i in
$(DEVO_SUPPORT
) $(GDB_SUPPORT_DIRS
); do \
1001 mkdir proto-toplev
/etc
1002 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1003 ln
-s ..
/..
/etc
/$$i .
; \
1005 # Put only one copy (four hard links) of COPYING in the tar file.
1006 rm proto-toplev
/bfd
/COPYING
1007 ln proto-toplev
/gdb
/COPYING proto-toplev
/bfd
/COPYING
1008 rm proto-toplev
/include/COPYING
1009 ln proto-toplev
/gdb
/COPYING proto-toplev
/include/COPYING
1010 rm proto-toplev
/readline
/COPYING
1011 ln proto-toplev
/gdb
/COPYING proto-toplev
/readline
/COPYING
1013 # Change the bug reporting address in configure to bug-gdb
1014 rm proto-toplev
/configure
1015 sed
-e
's/configure@cygnus.com/bug-gdb@prep.ai.mit.edu/' \
1016 <configure
>proto-toplev
/configure
1017 chmod a
+x proto-toplev
/configure
1019 # Take out texinfo and glob from configurable dirs
1020 rm proto-toplev
/configure.in
1021 sed
-e
'/^host_tools=/s/texinfo //' \
1022 -e
'/^host_libs=/s/glob //' \
1023 <configure.in
>proto-toplev
/configure.in
1025 # Take out texinfo from a few places; make simple BISON=bison line.
1026 rm proto-toplev
/Makefile.in
1027 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1028 -e
'/^ install-texinfo /d' \
1029 -e
'/^BISON = /,/^$$/d' \
1030 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1031 <Makefile.in
>proto-toplev
/Makefile.in
1033 mkdir proto-toplev
/texinfo
1034 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1035 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1036 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1037 chmod og
=u
`find proto-toplev -print`
1038 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1039 echo
"==> Making gdb-$$VER.tar.gz"; \
1040 rm -f gdb-
$$VER; ln
-s proto-toplev gdb-
$$VER; \
1041 tar cfh
- gdb-
$$VER \
1042 |
$(GZIPPROG
) -v
-9 >gdb-
$$VER.
tar.gz
)
1044 # Make the testsuite archive separately.
1045 ln
-s ..
/..
/gdb
/proto-testsuite.
dir/testsuite proto-toplev
/gdb
/testsuite
1046 # Blow away the Chill test that requires a Chill compiled executable,
1047 # since GNU Chill is not yet publically available.
1048 rm -rf proto-toplev
/gdb
/testsuite
/gdb.t31
1050 # Put a copy of COPYING in the tar file.
1051 ln proto-toplev
/gdb
/COPYING proto-toplev
/gdb
/testsuite
/COPYING
1052 chmod og
=u
`find proto-toplev/gdb/testsuite -print`
1053 (VER
=`sed <gdb/Makefile.in -n 's/VERSION = //p'`; \
1054 echo
"==> Making gdb-$$VER-testsuite.tar.gz"; \
1055 tar cfh
- gdb-
$$VER/configure gdb-
$$VER/config.guess \
1056 gdb-
$$VER/config.sub gdb-
$$VER/move-if-change \
1057 gdb-
$$VER/gdb
/testsuite \
1058 |
$(GZIPPROG
) -v
-9 >gdb-
$$VER-testsuite.
tar.gz
)
1060 # When you use `make setup-dirs' or `make taz' you should always redefine
1062 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1063 # Directories that might want `make diststuff' run.
1064 DISTSTUFFDIRS
= ld gprof gdb libg
++ binutils gnats
1065 # Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
1066 DISTBISONFILES
= binutils
/Makefile.in gas
/Makefile.in gdb
/Makefile.in
1067 # Directories where "info" should be built.
1068 DISTDOCDIRS
= ld gprof binutils gas bfd libg
++ libio gdb gnats send-pr
1072 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1073 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1074 # Make sure "diststuff" files get built properly.
1075 for f in
$(DISTBISONFILES
) ; do \
1076 if
[ -r
$$f ]; then \
1077 sed
'/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp
; \
1081 # Take out texinfo from a few places; make simple BISON=bison line.
1082 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1083 -e
'/^ install-texinfo /d' \
1084 -e
'/^BISON = /,/^$$/d' \
1085 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1087 mv
-f tmp Makefile.in
1090 # Doc files don't change; include them in distribution.
1091 for f in
$(DISTDOCDIRS
) ; do \
1092 if
[ -r
$$f/Makefile
]; then \
1093 (cd
$$f ; $(MAKE
) info) || exit
1 ; \
1096 # Make links, and run "make diststuff" when needed.
1097 # The `echo' for setting `p' is to convert all whitespace to spaces.
1098 # Then the `case' further below should tell whether $$d is in
1100 rm -rf proto-toplev
; mkdir proto-toplev
1101 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1102 p
=" `echo $(DISTSTUFFDIRS)` " ; \
1103 for d in
$$dirs ; do \
1104 if
[ -d
$$d ]; then \
1107 echo making diststuff in
$$d ; \
1108 (cd
$$d ; pwd
; $(MAKE
) diststuff
) || exit
1 ;; \
1110 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1111 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1113 ln
-s ..
/$$d proto-toplev
/$$d ; \
1115 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1119 mkdir proto-toplev
/etc
1120 (cd proto-toplev
/etc
; for i in
$(ETC_SUPPORT
); do \
1121 ln
-s ..
/..
/etc
/$$i .
; \
1124 # Take out texinfo and glob from configurable dirs
1125 rm proto-toplev
/configure.in
1126 sed
-e
'/^host_tools=/s/texinfo //' \
1127 -e
'/^host_libs=/s/glob //' \
1128 <configure.in
>proto-toplev
/configure.in
1130 mkdir proto-toplev
/texinfo
1131 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1132 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1133 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1134 ln
-s ..
/..
/texinfo
/tex3patch proto-toplev
/texinfo
/
1135 chmod og
=u
`find . -print`
1136 (VER
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`; \
1137 echo
"==> Making $(TOOL)-$$VER.tar.gz"; \
1138 rm -f
$(TOOL
)-$$VER; ln
-s proto-toplev
$(TOOL
)-$$VER; \
1139 tar cfh
- $(TOOL
)-$$VER \
1140 |
$(GZIPPROG
) -v
-9 >$(TOOL
)-$$VER.
tar.gz
)
1142 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1143 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1146 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes
1147 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1148 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1149 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1151 # The FSF "binutils" release includes gprof and ld.
1152 .PHONY
: binutils.
tar.gz
1153 BINUTILS_SUPPORT_DIRS
= bfd
include libiberty opcodes
ld gprof
1154 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1155 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1156 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS)"
1158 .PHONY
: gas
+binutils.
tar.gz
1159 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1160 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1161 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1162 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS)"
1164 .PHONY
: libg
++.
tar.gz
1165 LIBGXX_SUPPORT_DIRS
=include libio libiberty xiberty
1166 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1167 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1168 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1170 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1171 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1172 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1173 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1178 # start-sanitize-chill
1179 ## This is ugly, but I don't want GNU make to put these variables in
1180 ## the environment. Older makes will see this as a set of targets
1181 ## with no dependencies and no actions.
1182 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1183 # end-sanitize-chill
1185 # end of Makefile.in