2 # Makefile for directory with subdirs to build.
3 # Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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)/share
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
48 INSTALL
= $$s/install-sh
-c
49 INSTALL_PROGRAM
= $(INSTALL
)
50 INSTALL_DATA
= $(INSTALL
) -m
644
52 INSTALL_DOSREL
= install-dosrel-fake
59 # Special variables passed down in EXTRA_GCC_FLAGS. They are defined
60 # here so that they can be overridden by Makefile fragments.
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 CFLAGS_FOR_TARGET
= $(CFLAGS
)
71 LIBCFLAGS_FOR_TARGET
= $(CFLAGS_FOR_TARGET
)
75 # start-sanitize-chill
76 CHILLFLAGS
= $(CFLAGS
)
81 # Use -O2 to stress test the compiler.
83 LIBCXXFLAGS
= $(CXXFLAGS
) -fno-implicit-templates
84 CXXFLAGS_FOR_TARGET
= $(CXXFLAGS
)
85 LIBCXXFLAGS_FOR_TARGET
= $(CXXFLAGS_FOR_TARGET
) -fno-implicit-templates
92 # Not plain GZIP, since gzip looks there for extra command-line options.
95 # These values are substituted by configure.
99 # BISON: This line sed'ed to BISON = bison -y for FSF releases, don't remove.
100 BISON
= `if [ -f $$r/byacc/byacc ] ; \
101 then echo $$r/byacc/byacc ; \
102 else echo ${DEFAULT_YACC} ; \
105 LEX
= `if [ -f $$r/flex/flex ] ; \
106 then echo $$r/flex/flex ; \
107 else echo ${DEFAULT_LEX} ; fi`
109 M4
= `if [ -f $$r/m4/m4 ] ; \
110 then echo $$r/m4/m4 ; \
113 MAKEINFO
= `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
114 then echo $$r/texinfo/makeinfo/makeinfo ; \
115 else echo makeinfo ; fi`
117 # This just becomes part of the MAKEINFO definition passed down to
118 # sub-makes. It lets flags be given on the command line while still
119 # using the makeinfo from the object tree.
122 EXPECT
= `if [ -f $$r/expect/expect ] ; \
123 then echo $$r/expect/expect ; \
124 else echo expect ; fi`
126 RUNTEST
= `if [ -f $$s/dejagnu/runtest ] ; \
127 then echo $$s/dejagnu/runtest ; \
128 else echo runtest ; fi`
131 # compilers to use to create programs which must be run in the build
134 CXX_FOR_BUILD
= $(CXX
)
136 SUBDIRS
= "this is set via configure, don't edit this"
139 # This is set by the configure script to the list of directories which
140 # should be built using the target tools.
141 TARGET_CONFIGDIRS
= libiberty libgloss newlib libio librx libstdc
++ libg
++ winsup
143 # Target libraries are put under this directory:
144 # Changed by configure to $(target_alias) if cross.
147 # This is set by the configure script to the arguments passed to configure.
150 # This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
154 # This is the name of the environment variable used for the path to
155 # the libraries. This may be changed by configure.in.
156 RPATH_ENVVAR
= LD_LIBRARY_PATH
158 # configure.in sets SET_LIB_PATH to this if --enable-shared was used.
159 REALLY_SET_LIB_PATH
= \
160 $(RPATH_ENVVAR
)=$$r/bfd
:$$r/opcodes
:$$$(RPATH_ENVVAR
); \
161 export $(RPATH_ENVVAR
);
164 INSTALL_TARGET
= installdirs \
166 $(INSTALL_TARGET_MODULES
) \
167 $(INSTALL_X11_MODULES
) \
173 if [ -f $$r/gcc/xgcc ] ; then \
174 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
175 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
176 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
178 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
181 echo $$r/gcc/xgcc -B$$r/gcc/; \
184 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
187 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
191 # If CC_FOR_TARGET is not overriden on the command line, then this
192 # variable is passed down to the gcc Makefile, where it is used to
193 # build libgcc2.a. We define it here so that it can itself be
194 # overridden on the command line.
195 GCC_FOR_TARGET
= $$r/gcc
/xgcc
-B
$$r/gcc
/
197 # start-sanitize-chill
198 CHILL_FOR_TARGET
= ` \
199 if [ -f $$r/gcc/xgcc ] ; then \
200 echo $$r/gcc/xgcc -B$$r/gcc/ -L$$r/gcc/ch/runtime/; \
202 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
205 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
212 if [ -f $$r/gcc/xgcc ] ; then \
213 if [ -f $$r/$(TARGET_SUBDIR)/newlib/Makefile ] ; then \
214 if [ -f $$r/$(TARGET_SUBDIR)/winsup/Makefile ] ; then \
215 echo $$r/gcc/xgcc -B$$r/gcc/ -B$$r/newlib/ -L$$r/winsup -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
217 echo $$r/gcc/xgcc -B$$r/gcc/ -idirafter $$r/$(TARGET_SUBDIR)/newlib/targ-include -idirafter $$s/newlib/libc/include -nostdinc; \
220 echo $$r/gcc/xgcc -B$$r/gcc/; \
223 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
226 t='$(program_transform_name)'; echo gcc | sed -e 's/x/x/' $$t; \
231 if [ -f $$r/gas/as.new ] ; then \
232 echo $$r/gas/as.new ; \
234 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
237 t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
242 if [ -f $$r/ld/ld.new ] ; then \
243 echo $$r/ld/ld.new ; \
245 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
248 t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
252 DLLTOOL_FOR_TARGET
= ` \
253 if [ -f $$r/binutils/dlltool ] ; then \
254 echo $$r/binutils/dlltool ; \
256 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
259 t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
264 if [ -f $$r/binutils/ar ] ; then \
265 echo $$r/binutils/ar ; \
267 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
270 t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
274 RANLIB_FOR_TARGET
= ` \
275 if [ -f $$r/binutils/ranlib ] ; then \
276 echo $$r/binutils/ranlib ; \
278 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
281 t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
286 if [ -f $$r/binutils/nm.new ] ; then \
287 echo $$r/binutils/nm.new ; \
289 if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
292 t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
296 #### host and target specific makefile fragments come in here.
299 # Flags to pass down to all sub-makes.
300 # Please keep these in alphabetical order.
301 BASE_FLAGS_TO_PASS
= \
302 "AR_FLAGS=$(AR_FLAGS)" \
303 "AR_FOR_TARGET=$(AR_FOR_TARGET)" \
304 "AS_FOR_TARGET=$(AS_FOR_TARGET)" \
306 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
307 "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
309 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
310 $(start-sanitize-chill
)\
311 "CHILLFLAGS=$(CHILLFLAGS)" \
312 "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
313 "CHILL_LIB=$(CHILL_LIB)" \
314 $(end-sanitize-chill
)\
315 "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
316 "CXXFLAGS=$(CXXFLAGS)" \
317 "CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
318 "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
319 "DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \
320 "INSTALL=$(INSTALL)" \
321 "INSTALL_DATA=$(INSTALL_DATA)" \
322 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
323 "LDFLAGS=$(LDFLAGS)" \
325 "LD_FOR_TARGET=$(LD_FOR_TARGET)" \
326 "LIBCFLAGS=$(LIBCFLAGS)" \
327 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
328 "LIBCXXFLAGS=$(LIBCXXFLAGS)" \
329 "LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
332 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
333 "NM_FOR_TARGET=$(NM_FOR_TARGET)" \
334 "PICFLAG=$(PICFLAG)" \
335 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
336 "RANLIB_FOR_TARGET=$(RANLIB_FOR_TARGET)" \
339 "RUNTEST=$(RUNTEST)" \
340 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
342 "exec_prefix=$(exec_prefix)" \
346 # Flags to pass down to most sub-makes, in which we're building with
347 # the host environment.
348 # If any variables are added here, they must be added to do-*, below.
354 'DLLTOOL=$(DLLTOOL)' \
359 FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_HOST_FLAGS
)
361 # Flags that are concerned with the location of the X11 include files
364 # NOTE: until the top-level is getting the values via autoconf, it only
365 # causes problems to have this top-level Makefile overriding the autoconf-set
366 # values in child directories. Only variables that don't conflict with
367 # autoconf'ed ones should be passed by X11_FLAGS_TO_PASS for now.
369 X11_FLAGS_TO_PASS
= \
370 'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
371 'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
373 # Flags to pass down to makes which are built with the target environment.
374 # The double $ decreases the length of the command line; the variables
375 # are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them.
376 # If any variables are added here, they must be added to do-*, below.
377 EXTRA_TARGET_FLAGS
= \
378 'AR=$$(AR_FOR_TARGET)' \
379 'AS=$$(AS_FOR_TARGET)' \
380 'CC=$$(CC_FOR_TARGET)' \
381 'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
382 'CXX=$$(CXX_FOR_TARGET)' \
383 'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
384 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
385 'LD=$$(LD_FOR_TARGET)' \
386 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
387 'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
388 'NM=$$(NM_FOR_TARGET)' \
389 'PICFLAG=$$(PICFLAG_FOR_TARGET)' \
390 'RANLIB=$$(RANLIB_FOR_TARGET)'
392 TARGET_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_TARGET_FLAGS
)
394 # Flags to pass down to gcc. gcc builds a library, libgcc.a, so it
395 # unfortunately needs the native compiler and the target ar and
397 # If any variables are added here, they must be added to do-*, below.
398 # The HOST_* variables are a special case, which are used for the gcc
399 # cross-building scheme.
401 'AR=$$(AR_FOR_TARGET)' \
405 'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
406 'HOST_CC=$(CC_FOR_BUILD)' \
407 'HOST_PREFIX=$(HOST_PREFIX)' \
408 'HOST_PREFIX_1=$(HOST_PREFIX_1)' \
410 'RANLIB=$$(RANLIB_FOR_TARGET)' \
411 "GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
412 `if test x"$(LANGUAGES)" != x; then echo "LANGUAGES=$(LANGUAGES)"; fi` \
413 `if test x"$(STMP_FIXPROTO)" != x; then echo "STMP_FIXPROTO=$(STMP_FIXPROTO)"; fi` \
414 `if test x"$(LIMITS_H_TEST)" != x; then echo "LIMITS_H_TEST=$(LIMITS_H_TEST)"; fi` \
415 `if test x"$(LIBGCC1_TEST)" != x; then echo "LIBGCC1_TEST=$(LIBGCC1_TEST)"; fi` \
416 `if test x"$(LIBGCC2_CFLAGS)" != x; then echo "LIBGCC2_CFLAGS=$(LIBGCC2_CFLAGS)"; fi` \
417 `if test x"$(LIBGCC2_DEBUG_CFLAGS)" != x; then echo "LIBGCC2_DEBUG_CFLAGS=$(LIBGCC2_DEBUG_CFLAGS)"; fi` \
418 `if test x"$(LIBGCC2_INCLUDES)" != x; then echo "LIBGCC2_INCLUDES=$(LIBGCC2_INCLUDES)"; fi` \
419 `if test x"$(ENQUIRE)" != x; then echo "ENQUIRE=$(ENQUIRE)"; fi` \
420 `if test x"$(BOOT_CFLAGS)" != x; then echo "BOOT_CFLAGS=$(BOOT_CFLAGS)"; fi`
422 GCC_FLAGS_TO_PASS
= $(BASE_FLAGS_TO_PASS
) $(EXTRA_GCC_FLAGS
)
424 # This is a list of the targets for all of the modules which are compiled
425 # using $(FLAGS_TO_PASS).
456 $(start-sanitize-ide
) \
458 $(end-sanitize-ide
) \
482 $(start-sanitize-ide
) \
484 $(end-sanitize-ide
) \
487 # This is a list of the check targets for all of the modules which are
488 # compiled using $(FLAGS_TO_PASS).
490 # The list is in two parts. The first lists those tools which
491 # are tested as part of the host's native tool-chain, and not
492 # tested in a cross configuration.
493 NATIVE_CHECK_MODULES
= \
497 CROSS_CHECK_MODULES
= \
523 $(start-sanitize-ide
) \
525 $(end-sanitize-ide
) \
548 $(start-sanitize-ide
) \
550 $(end-sanitize-ide
) \
553 CHECK_MODULES
=$(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
555 # This is a list of the install targets for all of the modules which are
556 # compiled using $(FLAGS_TO_PASS).
587 $(start-sanitize-ide
) \
589 $(end-sanitize-ide
) \
612 $(start-sanitize-ide
) \
614 $(end-sanitize-ide
) \
617 # This is a list of the targets for all of the modules which are compiled
618 # using $(X11_FLAGS_TO_PASS).
629 # This is a list of the check targets for all of the modules which are
630 # compiled using $(X11_FLAGS_TO_PASS).
631 CHECK_X11_MODULES
= \
639 # This is a list of the install targets for all the modules which are
640 # compiled using $(X11_FLAGS_TO_PASS).
641 INSTALL_X11_MODULES
= \
651 # This is a list of the targets for all of the modules which are compiled
652 # using $(TARGET_FLAGS_TO_PASS).
653 ALL_TARGET_MODULES
= \
655 all-target-libstdc
++ \
660 all-target-libgloss \
661 all-target-libiberty \
664 # This is a list of the configure targets for all of the modules which
665 # are compiled using the target tools.
666 CONFIGURE_TARGET_MODULES
= \
667 configure-target-libio \
668 configure-target-libstdc
++ \
669 configure-target-librx \
670 configure-target-libg
++ \
671 configure-target-newlib \
672 configure-target-winsup \
673 configure-target-libgloss \
674 configure-target-libiberty \
675 configure-target-examples
677 # This is a list of the check targets for all of the modules which are
678 # compiled using $(TARGET_FLAGS_TO_PASS).
679 CHECK_TARGET_MODULES
= \
681 check-target-libstdc
++ \
682 check-target-libg
++ \
683 check-target-newlib \
684 check-target-winsup \
685 check-target-libiberty
687 # This is a list of the install targets for all of the modules which are
688 # compiled using $(TARGET_FLAGS_TO_PASS).
689 INSTALL_TARGET_MODULES
= \
690 install-target-libio \
691 install-target-libstdc
++ \
692 install-target-libg
++ \
693 install-target-newlib \
694 install-target-winsup \
695 install-target-libgloss \
696 install-target-libiberty
698 # This is a list of the targets for which we can do a clean-{target}.
729 $(start-sanitize-ide
) \
731 $(end-sanitize-ide
) \
755 $(start-sanitize-ide
) \
757 $(end-sanitize-ide
) \
760 # All of the target modules that can be cleaned
761 CLEAN_TARGET_MODULES
= \
763 clean-target-libstdc
++ \
765 clean-target-libg
++ \
766 clean-target-newlib \
767 clean-target-winsup \
768 clean-target-libgloss \
769 clean-target-libiberty \
770 clean-target-examples
772 # All of the x11 modules that can be cleaned
773 CLEAN_X11_MODULES
= \
783 # The first rule in the file had better be this one. Don't put any above it.
787 # The target built for a native build.
792 $(ALL_TARGET_MODULES
) \
795 # Do a target for all the subdirectories. A ``make do-X'' will do a
796 # ``make X'' in all subdirectories (because, in general, there is a
797 # dependency (below) of X upon do-X, a ``make X'' will also do this,
798 # but it may do additional work as well).
799 # This target ensures that $(BASE_FLAGS_TO_PASS) appears only once,
800 # because it is so large that it can easily overflow the command line
801 # length limit on some systems.
810 do-maintainer-clean \
814 @target
=`echo $@ | sed -e 's/^do-//'`; \
816 s
=`cd $(srcdir); pwd`; export s
; \
818 for i in
$(SUBDIRS
) -dummy-
; do \
819 if
[ -f .
/$$i/Makefile
]; then \
822 for flag in
$(EXTRA_GCC_FLAGS
); do \
823 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
827 for flag in
$(EXTRA_HOST_FLAGS
); do \
828 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
832 export AR AS CC CXX NM RANLIB DLLTOOL
; \
834 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
835 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
836 "RANLIB=$${RANLIB}" \
837 "DLLTOOL=$${DLLTOOL}" \
839 then true
; else exit
1; fi
; \
842 @target
=`echo $@ | sed -e 's/^do-//'`; \
844 s
=`cd $(srcdir); pwd`; export s
; \
846 for i in
$(TARGET_CONFIGDIRS
) -dummy-
; do \
847 if
[ -f
$(TARGET_SUBDIR
)/$$i/Makefile
]; then \
848 for flag in
$(EXTRA_TARGET_FLAGS
); do \
849 eval
`echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
851 export AR AS CC CXX NM RANLIB DLLTOOL
; \
852 if
(cd
$(TARGET_SUBDIR
)/$$i; \
853 $(MAKE
) $(BASE_FLAGS_TO_PASS
) "AR=$${AR}" "AS=$${AS}" \
854 "CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
855 "RANLIB=$${RANLIB}" \
856 "DLLTOOL=$${DLLTOOL}" \
858 then true
; else exit
1; fi
; \
862 # Here are the targets which correspond to the do-X targets.
864 .PHONY
: info installcheck dvi install-info
865 .PHONY
: clean distclean mostlyclean maintainer-clean
realclean
866 .PHONY
: local-clean local-distclean local-maintainer-clean
868 installcheck: do-installcheck
871 # Make sure makeinfo is built before we do a `make info'.
874 install-info
: do-install-info
dir.
info
875 s
=`cd $(srcdir); pwd`; export s
; \
876 if
[ -f
dir.
info ] ; then \
877 $(INSTALL_DATA
) dir.
info $(infodir)/dir.
info ; \
881 -rm -f
*.a TEMP errs core
*.o
*~ \
#* TAGS *.E
884 -rm -f Makefile config.status config.cache
885 -if
[ "$(TARGET_SUBDIR)" != "." ]; then \
886 rm -rf
$(TARGET_SUBDIR
); \
889 local-maintainer-clean
:
890 @echo
"This command is intended for maintainers to use;"
891 @echo
"it deletes files that may require special tools to rebuild."
893 clean: do-clean local-clean
894 mostlyclean: do-mostlyclean local-clean
895 distclean: do-distclean local-clean local-distclean
896 maintainer-clean
: local-maintainer-clean do-maintainer-clean local-clean
897 maintainer-clean
: local-distclean
898 realclean: maintainer-clean
900 # This rule is used to clean specific modules.
901 .PHONY
: $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
902 $(CLEAN_MODULES
) $(CLEAN_X11_MODULES
) clean-gcc
:
903 @
dir=`echo $@ | sed -e 's/clean-//'`; \
904 if
[ -f .
/$${dir}/Makefile
] ; then \
906 s
=`cd $(srcdir); pwd`; export s
; \
908 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) clean); \
913 .PHONY
: $(CLEAN_TARGET_MODULES
)
914 $(CLEAN_TARGET_MODULES
):
915 @
dir=`echo $@ | sed -e 's/clean-target-//'`; \
916 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
917 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
919 s
=`cd $(srcdir); pwd`; export s
; \
921 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) clean); \
926 clean-target
: $(CLEAN_TARGET_MODULES
)
931 check: $(CHECK_MODULES
) \
932 $(CHECK_TARGET_MODULES
) \
933 $(CHECK_X11_MODULES
) \
936 # Installation targets.
938 .PHONY
: install uninstall source-vault binary-vault vault-install
939 install: $(INSTALL_TARGET
)
942 @echo
"the uninstall target is not supported in this tree"
945 $(MAKE
) -f .
/release
/Build-A-Release \
946 host
=$(host_alias
) source-vault
949 $(MAKE
) -f .
/release
/Build-A-Release \
950 host
=$(host_alias
) target
=$(target_alias
)
953 @if
[ -f .
/release
/vault-install
] ; then \
954 .
/release
/vault-install
$(host_alias
) $(target_alias
) ; \
960 install.
all: install-no-fixedincludes
961 @if
[ -f .
/gcc
/Makefile
] ; then \
962 r
=`pwd` ; export r
; \
965 $(MAKE
) $(FLAGS_TO_PASS
) install-headers
) ; \
970 # inet-install is used because the I*Net wants DejaGNU installed but
971 # not built. Similarly, gzip is built but not installed.
973 $(MAKE
) INSTALL_MODULES
="`echo $(INSTALL_MODULES) | sed -e 's/install-dejagnu//' -e 's/install-gzip//'`" install
975 # install-no-fixedincludes is used because Cygnus can not distribute
976 # the fixed header files.
977 .PHONY
: install-no-fixedincludes
978 install-no-fixedincludes
: \
981 $(INSTALL_TARGET_MODULES
) \
982 $(INSTALL_X11_MODULES
) \
985 # Install the gcc headers files, but not the fixed include files,
986 # which Cygnus is not allowed to distribute. This rule is very
987 # dependent on the workings of the gcc Makefile.in.
988 .PHONY
: gcc-no-fixedincludes
989 gcc-no-fixedincludes
:
990 @if
[ -f .
/gcc
/Makefile
]; then \
991 rm -rf gcc
/tmp-include
; \
992 mv gcc
/include gcc
/tmp-include
2>/dev
/null
; \
994 cp
$(srcdir)/gcc
/gsyslimits.h gcc
/include/syslimits.h
; \
995 touch gcc
/stmp-fixinc gcc
/include/fixed
; \
996 rm -f gcc
/stmp-headers gcc
/stmp-int-hdrs
; \
998 s
=`cd $(srcdir); pwd` ; export s
; \
1001 $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1002 rm -rf gcc
/include; \
1003 mv gcc
/tmp-include gcc
/include 2>/dev
/null
; \
1006 # This rule is used to build the modules which use FLAGS_TO_PASS. To
1007 # build a target all-X means to cd to X and make all.
1009 # all-gui, and all-libproc are handled specially because
1010 # they are still experimental, and if they fail to build, that
1011 # shouldn't stop "make all".
1012 .PHONY
: $(ALL_MODULES
) all-gui all-libproc
1013 $(ALL_MODULES
) all-gui all-libproc
:
1014 @
dir=`echo $@ | sed -e 's/all-//'`; \
1015 if
[ -f .
/$${dir}/Makefile
] ; then \
1016 r
=`pwd`; export r
; \
1017 s
=`cd $(srcdir); pwd`; export s
; \
1019 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) all); \
1024 # These rules are used to check the modules which use FLAGS_TO_PASS.
1025 # To build a target check-X means to cd to X and make check. Some
1026 # modules are only tested in a native toolchain.
1028 .PHONY
: $(CHECK_MODULES
) $(NATIVE_CHECK_MODULES
) $(CROSS_CHECK_MODULES
)
1029 $(NATIVE_CHECK_MODULES
):
1030 @if
[ "$(host_canonical)" = "$(target_canonical)" ] ; then \
1031 dir=`echo $@ | sed -e 's/check-//'`; \
1032 if
[ -f .
/$${dir}/Makefile
] ; then \
1033 r
=`pwd`; export r
; \
1034 s
=`cd $(srcdir); pwd`; export s
; \
1036 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1042 $(CROSS_CHECK_MODULES
):
1043 @
dir=`echo $@ | sed -e 's/check-//'`; \
1044 if
[ -f .
/$${dir}/Makefile
] ; then \
1045 r
=`pwd`; export r
; \
1046 s
=`cd $(srcdir); pwd`; export s
; \
1048 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) check); \
1053 # This rule is used to install the modules which use FLAGS_TO_PASS.
1054 # To build a target install-X means to cd to X and make install.
1055 .PHONY
: $(INSTALL_MODULES
)
1056 $(INSTALL_MODULES
): installdirs
1057 @
dir=`echo $@ | sed -e 's/install-//'`; \
1058 if
[ -f .
/$${dir}/Makefile
] ; then \
1059 r
=`pwd`; export r
; \
1060 s
=`cd $(srcdir); pwd`; export s
; \
1062 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1067 # This rule is used to configure the modules which are built with the
1069 .PHONY
: $(CONFIGURE_TARGET_MODULES
)
1070 $(CONFIGURE_TARGET_MODULES
):
1071 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1072 if
[ -d
$(TARGET_SUBDIR
)/$${dir} ]; then \
1073 r
=`pwd`; export r
; \
1074 $(CC_FOR_TARGET
) --print-multi-lib
> $(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
2> /dev
/null
; \
1075 if
[ -s
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
]; then \
1076 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
]; then \
1077 if cmp
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
> /dev
/null
; then \
1078 rm -f
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
; \
1080 echo
"Multilibs changed for $${dir}, reconfiguring"; \
1081 rm -f
$(TARGET_SUBDIR
)/$${dir}/multilib.out
$(TARGET_SUBDIR
)/$${dir}/Makefile
; \
1082 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1085 mv
$(TARGET_SUBDIR
)/$${dir}/tmpmulti.out
$(TARGET_SUBDIR
)/$${dir}/multilib.out
; \
1088 fi
; exit
0 # break command into two pieces
1089 @
dir=`echo $@ | sed -e 's/configure-target-//'`; \
1090 if
[ ! -d
$(TARGET_SUBDIR
) ]; then \
1092 elif
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1094 elif echo
" $(TARGET_CONFIGDIRS) " | grep
" $${dir} " >/dev
/null
2>&1; then \
1095 if
[ -d
$(srcdir)/$${dir} ]; then \
1096 [ -d
$(TARGET_SUBDIR
)/$${dir} ] || mkdir
$(TARGET_SUBDIR
)/$${dir};\
1097 r
=`pwd`; export r
; \
1098 s
=`cd $(srcdir); pwd`; export s
; \
1100 AR
="$(AR_FOR_TARGET)"; export AR
; \
1101 AS
="$(AS_FOR_TARGET)"; export AS
; \
1102 CC
="$(CC_FOR_TARGET)"; export CC
; \
1103 CFLAGS
="$(CFLAGS_FOR_TARGET)"; export CFLAGS
; \
1104 CXX
="$(CXX_FOR_TARGET)"; export CXX
; \
1105 CXXFLAGS
="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS
; \
1106 DLLTOOL
="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL
; \
1107 LD
="$(LD_FOR_TARGET)"; export LD
; \
1108 LDFLAGS
="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS
; \
1109 NM
="$(NM_FOR_TARGET)"; export NM
; \
1110 RANLIB
="$(RANLIB_FOR_TARGET)"; export RANLIB
; \
1111 echo Configuring in
$(TARGET_SUBDIR
)/$${dir}; \
1112 cd
$(TARGET_SUBDIR
)/$${dir}; \
1115 topdir
=$(srcdir) ;; \
1117 case
"$(TARGET_SUBDIR)" in \
1118 .
) topdir
="../$(srcdir)" ;; \
1119 *) topdir
="../../$(srcdir)" ;; \
1122 if
[ "$(srcdir)" = "." ] ; then \
1123 if
[ "$(TARGET_SUBDIR)" != "." ] ; then \
1124 if
$(SHELL
) $$s/symlink-tree
$${topdir}/$${dir} "no-such-file" ; then \
1125 if
[ -f Makefile
]; then \
1126 if
$(MAKE
) distclean; then \
1140 srcdiroption
="--srcdir=."; \
1143 srcdiroption
="--srcdir=$${topdir}/$${dir}"; \
1144 libsrcdir
="$$s/$${dir}"; \
1146 if
[ -f
$${libsrcdir}/configure
] ; then \
1147 $(SHELL
) $${libsrcdir}/configure \
1148 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1149 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1151 $(SHELL
) $$s/configure \
1152 $(CONFIG_ARGUMENTS
) $${srcdiroption} \
1153 --with-target-subdir
="$(TARGET_SUBDIR)"; \
1162 # This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
1163 # To build a target all-X means to cd to X and make all.
1164 .PHONY
: $(ALL_TARGET_MODULES
)
1165 $(ALL_TARGET_MODULES
):
1166 @
dir=`echo $@ | sed -e 's/all-target-//'`; \
1167 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1168 r
=`pwd`; export r
; \
1169 s
=`cd $(srcdir); pwd`; export s
; \
1171 (cd
$(TARGET_SUBDIR
)/$${dir}; $(MAKE
) $(TARGET_FLAGS_TO_PASS
) all); \
1176 # This rule is used to check the modules which use TARGET_FLAGS_TO_PASS.
1177 # To build a target install-X means to cd to X and make install.
1178 .PHONY
: $(CHECK_TARGET_MODULES
)
1179 $(CHECK_TARGET_MODULES
):
1180 @
dir=`echo $@ | sed -e 's/check-target-//'`; \
1181 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1182 r
=`pwd`; export r
; \
1183 s
=`cd $(srcdir); pwd`; export s
; \
1185 (cd
$(TARGET_SUBDIR
)/$${dir};$(MAKE
) $(TARGET_FLAGS_TO_PASS
) check);\
1190 # This rule is used to install the modules which use
1191 # TARGET_FLAGS_TO_PASS. To build a target install-X means to cd to X
1193 .PHONY
: $(INSTALL_TARGET_MODULES
)
1194 $(INSTALL_TARGET_MODULES
): installdirs
1195 @
dir=`echo $@ | sed -e 's/install-target-//'`; \
1196 if
[ -f
$(TARGET_SUBDIR
)/$${dir}/Makefile
] ; then \
1197 r
=`pwd`; export r
; \
1198 s
=`cd $(srcdir); pwd`; export s
; \
1200 (cd
$(TARGET_SUBDIR
)/$${dir}; \
1201 $(MAKE
) $(TARGET_FLAGS_TO_PASS
) install); \
1206 # This rule is used to build the modules which use X11_FLAGS_TO_PASS.
1207 # To build a target all-X means to cd to X and make all.
1208 .PHONY
: $(ALL_X11_MODULES
)
1210 @
dir=`echo $@ | sed -e 's/all-//'`; \
1211 if
[ -f .
/$${dir}/Makefile
] ; then \
1212 r
=`pwd`; export r
; \
1213 s
=`cd $(srcdir); pwd`; export s
; \
1216 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) all); \
1221 # This rule is used to check the modules which use X11_FLAGS_TO_PASS.
1222 # To build a target check-X means to cd to X and make all.
1223 .PHONY
: $(CHECK_X11_MODULES
)
1224 $(CHECK_X11_MODULES
):
1225 @
dir=`echo $@ | sed -e 's/check-//'`; \
1226 if
[ -f .
/$${dir}/Makefile
] ; then \
1227 r
=`pwd`; export r
; \
1228 s
=`cd $(srcdir); pwd`; export s
; \
1231 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) check); \
1236 # This rule is used to install the modules which use X11_FLAGS_TO_PASS.
1237 # To build a target install-X means to cd to X and make install.
1238 .PHONY
: $(INSTALL_X11_MODULES
)
1239 $(INSTALL_X11_MODULES
):
1240 @
dir=`echo $@ | sed -e 's/install-//'`; \
1241 if
[ -f .
/$${dir}/Makefile
] ; then \
1242 r
=`pwd`; export r
; \
1243 s
=`cd $(srcdir); pwd`; export s
; \
1246 $(MAKE
) $(FLAGS_TO_PASS
) $(X11_FLAGS_TO_PASS
) install); \
1251 # gcc is the only module which uses GCC_FLAGS_TO_PASS.
1254 @if
[ -f .
/gcc
/Makefile
] ; then \
1255 r
=`pwd`; export r
; \
1256 s
=`cd $(srcdir); pwd`; export s
; \
1258 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) all); \
1263 .PHONY
: all-bootstrap
1265 @if
[ -f .
/gcc
/Makefile
] ; then \
1266 r
=`pwd`; export r
; \
1267 s
=`cd $(srcdir); pwd`; export s
; \
1269 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) bootstrap
); \
1276 @if
[ -f .
/gcc
/Makefile
] ; then \
1277 r
=`pwd`; export r
; \
1278 s
=`cd $(srcdir); pwd`; export s
; \
1280 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) check); \
1287 @if
[ -f .
/gcc
/Makefile
] ; then \
1288 r
=`pwd`; export r
; \
1289 s
=`cd $(srcdir); pwd`; export s
; \
1291 (cd gcc
; $(MAKE
) $(GCC_FLAGS_TO_PASS
) install); \
1297 # EXPERIMENTAL STUFF
1298 # This rule is used to install the modules which use FLAGS_TO_PASS.
1299 # To build a target install-X means to cd to X and make install.
1300 .PHONY
: install-dosrel
1301 install-dosrel
: installdirs info
1302 @
dir=`echo $@ | sed -e 's/install-//'`; \
1303 if
[ -f .
/$${dir}/Makefile
] ; then \
1304 r
=`pwd`; export r
; \
1305 s
=`cd $(srcdir); pwd`; export s
; \
1307 (cd
$${dir}; $(MAKE
) $(FLAGS_TO_PASS
) install); \
1312 install-dosrel-fake
:
1315 # This is a list of inter-dependencies among modules.
1317 all-autoconf
: all-m4
1320 all-binutils
: all-libiberty all-opcodes all-bfd all-flex all-byacc
1324 all-dejagnu
: all-tcl all-expect all-tk
1325 all-diff
: all-libiberty
1327 all-emacs19
: all-byacc
1329 configure-target-examples
: $(ALL_GCC
)
1330 all-target-examples
: configure-target-examples
1331 all-expect
: all-tcl all-tk
1332 all-fileutils
: all-libiberty
1335 all-flex
: all-libiberty all-byacc
1336 all-gas
: all-libiberty all-opcodes all-bfd
1340 all-gcc
: all-libiberty all-byacc all-binutils all-gas all-ld
1341 all-bootstrap
: all-libiberty all-byacc all-binutils all-gas all-ld
1342 GDB_TK
= all-tk all-tcl
1343 all-gdb
: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim
$(gdbnlmrequirements
) $(GDB_TK
)
1344 all-gprof
: all-libiberty all-bfd all-opcodes
1345 all-grep
: all-libiberty
1346 all-grez
: all-libiberty all-bfd all-opcodes
1347 all-gui
: all-gdb all-libproc all-target-librx
1349 all-gzip
: all-libiberty
1350 all-hello
: all-libiberty
1352 all-inet
: all-tcl all-send-pr all-perl
1353 all-ispell
: all-emacs19
1354 all-itcl
: all-tcl all-tk
1355 all-ld
: all-libiberty all-bfd all-opcodes all-byacc all-flex
1356 configure-target-libg
++: $(ALL_GCC
) configure-target-librx
1357 all-target-libg
++: configure-target-libg
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc
++
1358 configure-target-libgloss
: $(ALL_GCC
)
1359 all-target-libgloss
: configure-target-libgloss configure-target-newlib
1360 configure-target-libio
: $(ALL_GCC
)
1361 all-target-libio
: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
1363 # start-sanitize-ide
1364 all-libide
: all-tcl all-tk all-itcl
1366 configure-target-librx
: $(ALL_GCC
) configure-target-newlib
1367 all-target-librx
: configure-target-librx
1368 configure-target-libstdc
++: $(ALL_GCC
)
1369 all-target-libstdc
++: configure-target-libstdc
++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
1370 all-m4
: all-libiberty
1371 all-make
: all-libiberty
1373 configure-target-newlib
: $(ALL_GCC
)
1374 all-target-newlib
: configure-target-newlib all-binutils all-gas all-gcc
1375 all-opcodes
: all-bfd all-libiberty
1376 all-patch
: all-libiberty
1378 all-prms
: all-libiberty
1381 all-recode
: all-libiberty
1382 all-sed
: all-libiberty
1383 all-send-pr
: all-prms
1385 all-sim
: all-libiberty all-bfd all-opcodes
1386 all-sn
: all-tcl all-tk all-itcl all-db
1387 all-tar
: all-libiberty
1389 all-tclX
: all-tcl all-tk
1391 all-texinfo
: all-libiberty
1393 all-tgas
: all-libiberty all-bfd all-opcodes
1395 # start-sanitize-ide
1396 all-vmake
: all-tcl all-tk all-itcl all-libide
1399 all-target-winsup
: all-target-newlib all-target-libiberty all-target-librx all-target-libio configure-target-winsup
1400 configure-target-winsup
: configure-target-newlib
1401 all-uudecode
: all-libiberty
1402 configure-target-libiberty
: $(ALL_GCC
)
1403 all-target-libiberty
: configure-target-libiberty all-gcc all-ld all-target-newlib
1404 all-target
: $(ALL_TARGET_MODULES
)
1405 install-target
: $(INSTALL_TARGET_MODULES
)
1407 ### other supporting targets
1413 installdirs: mkinstalldirs
1414 $(SHELL
) $(srcdir)/mkinstalldirs
$(MAKEDIRS
)
1416 dir.
info: do-install-info
1417 if
[ -f
$(srcdir)/texinfo
/gen-info-dir
] ; then \
1418 $(srcdir)/texinfo
/gen-info-dir
$(infodir) $(srcdir)/texinfo
/dir.info-template
> dir.
info.new
; \
1419 mv
-f
dir.
info.new
dir.
info ; \
1424 @echo
"Building a full distribution of this tree isn't done"
1425 @echo
"via 'make dist'. Check out the etc/ subdirectory"
1429 # Right now this just builds TAGS in each subdirectory. emacs19 has the
1430 # ability to use several tags files at once, so there is probably no need
1431 # to combine them into one big TAGS file (like CVS 1.3 does). We could
1432 # (if we felt like it) have this Makefile write a piece of elisp which
1433 # the user could load to tell emacs19 where all the TAGS files we just
1437 # with the gnu make, this is done automatically.
1439 Makefile
: Makefile.in configure.in
$(host_makefile_frag
) $(target_makefile_frag
)
1440 $(SHELL
) .
/config.status
1443 # Support for building net releases
1445 # Files in devo used in any net release.
1446 # ChangeLog omitted because it may refer to files which are not in this
1447 # distribution (perhaps it would be better to include it anyway).
1448 DEVO_SUPPORT
= README Makefile.in configure configure.in \
1449 config.guess config.sub config move-if-change \
1450 mpw-README mpw-build.in mpw-config.in mpw-configure \
1451 COPYING COPYING.LIB install-sh config-ml.in symlink-tree \
1454 # Files in devo/etc used in any net release.
1455 # ChangeLog omitted because it may refer to files which are not in this
1456 # distribution (perhaps it would be better to include it anyway).
1457 ETC_SUPPORT
= Makefile.in configure configure.in standards.texi \
1458 make-stds.texi standards.
info*
1460 # When you use `make setup-dirs' or `make taz' you should always redefine
1462 SUPPORT_FILES
= list-of-support-files-for-tool-in-question
1463 # Files where "byacc" (Cygnus version) should be changed to "bison -y" (FSF).
1464 DISTBISONFILES
= binutils
/Makefile.in gas
/Makefile.in gdb
/Makefile.in
1468 taz
: $(DEVO_SUPPORT
) $(SUPPORT_FILES
) \
1469 texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1470 # Make sure "diststuff" files get built properly.
1471 for f in
$(DISTBISONFILES
) ; do \
1472 if
[ -r
$$f ]; then \
1473 sed
'/^BISON *=.*$$/s/.*/BISON = bison -y/' <$$f >tmp
; \
1477 # Take out texinfo from a few places; make simple BISON=bison line.
1478 sed
-e
'/^all\.normal: /s/\all-texinfo //' \
1479 -e
'/^ install-texinfo /d' \
1480 -e
'/^BISON = /,/^$$/d' \
1481 -e
'/^# BISON:/s/.*/BISON = bison -y/' \
1483 mv
-f tmp Makefile.in
1485 $(start-sanitize-Sanitize
)
1486 @if
[ -f .Sanitize
] ; then echo
"RUN Sanitize FIRST!" ; false
; fi
;
1487 $(end-sanitize-Sanitize
)
1489 [ -z
"$(CONFIGURE_TARGET_MODULES)" ] \
1490 ||
$(MAKE
) $(CONFIGURE_TARGET_MODULES
) ALL_GCC
="" \
1491 CC_FOR_TARGET
="$(CC)" CXX_FOR_TARGET
="$(CXX)"
1492 # Make links, and run "make diststuff" or "make info" when needed.
1493 rm -rf proto-toplev
; mkdir proto-toplev
1494 set
-e
; dirs
="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
1495 for d in
$$dirs ; do \
1496 if
[ -d
$$d ]; then \
1497 if
[ ! -f
$$d/Makefile
] ; then true
; \
1498 elif grep
'^diststuff:' $$d/Makefile
>/dev
/null
; then \
1499 (cd
$$d ; $(MAKE
) diststuff
) || exit
1 ; \
1500 elif grep
'^info:' $$d/Makefile
>/dev
/null
; then \
1501 (cd
$$d ; $(MAKE
) info ) || exit
1 ; \
1503 if
[ -d
$$d/proto-
$$d.
dir ]; then \
1504 ln
-s ..
/$$d/proto-
$$d.
dir proto-toplev
/$$d ; \
1506 ln
-s ..
/$$d proto-toplev
/$$d ; \
1508 else ln
-s ..
/$$d proto-toplev
/$$d ; fi
; \
1510 cd etc
; $(MAKE
) info
1513 mkdir proto-toplev
/etc
1514 (cd proto-toplev
/etc
; \
1515 for i in
$(ETC_SUPPORT
); do \
1516 ln
-s ..
/..
/etc
/$$i .
; \
1519 # Take out texinfo from configurable dirs
1520 rm proto-toplev
/configure.in
1521 sed
-e
'/^host_tools=/s/texinfo //' \
1522 <configure.in
>proto-toplev
/configure.in
1524 mkdir proto-toplev
/texinfo
1525 ln
-s ..
/..
/texinfo
/texinfo.
tex proto-toplev
/texinfo
/
1526 ln
-s ..
/..
/texinfo
/gpl.texinfo proto-toplev
/texinfo
/
1527 ln
-s ..
/..
/texinfo
/lgpl.texinfo proto-toplev
/texinfo
/
1528 if
test -r texinfo
/util
/tex3patch
; then \
1529 mkdir proto-toplev
/texinfo
/util
&& \
1530 ln
-s ..
/..
/..
/texinfo
/util
/tex3patch proto-toplev
/texinfo
/util
; \
1532 chmod og
=u
`find . -print`
1533 $(MAKE
) -f Makefile.in do-tar-gz TOOL
=$(TOOL
) \
1534 VER
=`sed <$(TOOL)/Makefile.in -n 's/^VERSION *= *//p'`
1537 echo
"==> Making $(TOOL)-$(VER).tar.gz"
1538 -rm -f
$(TOOL
)-$(VER
)
1539 ln
-s proto-toplev
$(TOOL
)-$(VER
)
1540 tar cfh
$(TOOL
)-$(VER
).
tar $(TOOL
)-$(VER
)
1541 $(GZIPPROG
) -v
-9 $(TOOL
)-$(VER
).
tar
1543 TEXINFO_SUPPORT
= texinfo
/texinfo.
tex texinfo
/gpl.texinfo texinfo
/lgpl.texinfo
1544 DIST_SUPPORT
= $(DEVO_SUPPORT
) $(TEXINFO_SUPPORT
)
1547 GAS_SUPPORT_DIRS
= bfd
include libiberty opcodes setup.com makefile.vms
1548 gas.
tar.gz
: $(DIST_SUPPORT
) $(GAS_SUPPORT_DIRS
) gas
1549 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1550 SUPPORT_FILES
="$(GAS_SUPPORT_DIRS)"
1552 # The FSF "binutils" release includes gprof and ld.
1553 .PHONY
: binutils.
tar.gz
1554 BINUTILS_SUPPORT_DIRS
= bfd gas
include libiberty opcodes
ld gprof setup.com makefile.vms
1555 binutils.
tar.gz
: $(DIST_SUPPORT
) $(BINUTILS_SUPPORT_DIRS
) binutils
1556 $(MAKE
) -f Makefile.in taz TOOL
=binutils \
1557 SUPPORT_FILES
="$(BINUTILS_SUPPORT_DIRS) makeall.bat configure.bat"
1559 .PHONY
: gas
+binutils.
tar.gz
1560 GASB_SUPPORT_DIRS
= $(GAS_SUPPORT_DIRS
) binutils
ld gprof
1561 gas
+binutils.
tar.gz
: $(DIST_SUPPORT
) $(GASB_SUPPORT_DIRS
) gas
1562 $(MAKE
) -f Makefile.in taz TOOL
=gas \
1563 SUPPORT_FILES
="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
1565 .PHONY
: libg
++.
tar.gz
1566 LIBGXX_SUPPORT_DIRS
=include libstdc
++ libio librx libiberty
1567 libg
++.
tar.gz
: $(DIST_SUPPORT
) libg
++
1568 $(MAKE
) -f Makefile.in taz TOOL
=libg
++ \
1569 SUPPORT_FILES
="$(LIBGXX_SUPPORT_DIRS)"
1571 GNATS_SUPPORT_DIRS
=include libiberty send-pr
1572 gnats.
tar.gz
: $(DIST_SUPPORT
) $(GNATS_SUPPORT_DIRS
) gnats
1573 $(MAKE
) -f Makefile.in taz TOOL
=gnats \
1574 SUPPORT_FILES
="$(GNATS_SUPPORT_DIRS)"
1577 GDB_SUPPORT_DIRS
= bfd
include libiberty mmalloc opcodes readline sim utils
1578 GDBTK_SUPPORT_DIRS
= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
1579 gdb.
tar.gz
: $(DIST_SUPPORT
) $(GDB_SUPPORT_DIRS
) gdb
1580 $(MAKE
) -f Makefile.in taz TOOL
=gdb \
1581 SUPPORT_FILES
="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
1583 .PHONY
: newlib.
tar.gz
1584 NEWLIB_SUPPORT_DIRS
=libgloss
1585 # taz configures for the sun4 target which won't configure newlib.
1586 # We need newlib configured so that the .info files are made.
1587 # Unfortunately, it is not enough to just configure newlib separately:
1588 # taz will build the .info files but since SUBDIRS won't contain newlib,
1589 # distclean won't be run (leaving Makefile, config.status, and the tmp files
1590 # used in building the .info files, eg: *.def, *.ref).
1591 # The problem isn't solvable however without a lot of extra work because
1592 # target libraries are built in subdir $(target_alias) which gets nuked during
1593 # the make distclean. For now punt on the issue of shipping newlib info files
1594 # with newlib net releases and wait for a day when some native target (sun4?)
1595 # supports newlib (if only minimally).
1596 newlib.
tar.gz
: $(DIST_SUPPORT
) $(NEWLIB_SUPPORT_DIRS
) newlib
1597 $(MAKE
) -f Makefile.in taz TOOL
=newlib \
1598 SUPPORT_FILES
="$(NEWLIB_SUPPORT_DIRS)" \
1599 DEVO_SUPPORT
="$(DEVO_SUPPORT) COPYING.NEWLIB" newlib
1604 # start-sanitize-chill
1605 ## This is ugly, but I don't want GNU make to put these variables in
1606 ## the environment. Older makes will see this as a set of targets
1607 ## with no dependencies and no actions.
1608 unexport CHILLFLAGS CHILL_LIB CHILL_FOR_TARGET
:
1609 # end-sanitize-chill
1611 # end of Makefile.in